on 05-09-2008 1:17 PM
Hi ,
I am working with webservices. I am trying to open a PDF window, I am getting the following exception.
"at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)"
java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)
at com.sap.tc.webdynpro.services.sal.util.cache.ResourcePool$PublicResourcePoolElement.<init>(ResourcePool.java:322)
at com.sap.tc.webdynpro.services.sal.util.cache.ResourcePool$PublicResourcePoolElement.<init>(ResourcePool.java:312)
at com.sap.tc.webdynpro.services.sal.util.cache.ResourcePool.add(ResourcePool.java:190)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.url.PublicCachedWebResource.<init>(PublicCachedWebResource.java:59)
at com.sap.tc.webdynpro.serverimpl.wdc.url.WebResourceFactory.getPublicCachedWebResource(WebResourceFactory.java:145)
at com.sap.tc.webdynpro.services.sal.url.api.WDWebResource.getPublicCachedWebResource(WDWebResource.java:115)
Everything is fine. I don knw why iam getting this exception.
Anyone has idea on this..
GS
Hi,
Can you send me the code snippet , which you are using to open window..
Regards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
byte[] pdfContent = wdContext.currentChnnode().getPdf_Data();
String pdfFileName = Constants.PdfName;
WDDeployableObjectPart objPart=wdThis.wdGetAPI().getComponent().getDeployableObjectPart();
IWDCachedWebResource pdfResource= WDWebResource.getPublicCachedWebResource(pdfContent,WDWebResourceType.PDF,WDScopeType.APPLICATION_SCOPE,objPart,Constants.page1);
try
{
wdComponentAPI.getWindowManager().createNonModalExternalWindow(pdfResource.getURL(),pdfFileName).show();
}
catch (WDURLException e)
{
wdComponentAPI.getMessageManager().reportException(e.getMessage(),false);
}
GS
Hi,
Sorry for it... My code is this one
data=wdContext.currentcontextElement().getPdfsource();
IWDResource resource = WDResourceFactory.createCachedResource(data , "PDF Report", WDWebResourceType.PDF);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getUrl(0), "PDF Report");
window.show();
Try this way
LakshmiNarayana
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.