cancel
Showing results for 
Search instead for 
Did you mean: 

Migration to NW7.11

0 Kudos

Hi,

Maybe you can help me.

I am migration RWBS application based on WD for Java to NW7.11 and I am facing some copiling errors:

For example:

Code in NW7.0:

import com.sap.tc.webdynpro.services.sal.datatransport.core.IInputMassDatasource;

import com.sap.tc.webdynpro.services.sal.datatransport.core.InternalMassDataTransport;

Cannot longer be resolved and therefore the statement:

IInputMassDatasource source = InternalMassDataTransport.addInputMassDatasource(htmlSrc, WDWebResourceType.HTML);

Cannot be compiled.

I guess this has to be replaced by import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDInputMassDatasource;

However IWDInputMassDatasource is an interface and I don't know how to get an instance implemeting this interface and how to replace the statement above.

I also didn't find any documentation is the portal except JAVADOC which is not helpful.

Thank you and best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (1)

Answers (1)

0 Kudos

Hi Armin,

Thank you so much for your quick answer.

I would like to confirm with you if the changes below are correct as I don't yet have J2EE installed for testing.

OLD CODE:

import com.sap.tc.webdynpro.services.sal.datatransport.core.IInputMassDatasource;

import com.sap.tc.webdynpro.services.sal.datatransport.core.InternalMassDataTransport;

public void print( java.lang.String pContent, java.lang.String pTitle ) {

ByteArrayInputStream htmlSrc = new ByteArrayInputStream(pContent.getBytes());

IInputMassDatasource source = InternalMassDataTransport.addInputMassDatasource(htmlSrc, WDWebResourceType.HTML);

String url = source.getUrl();

IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,pTitle);

win.show();

}

NEW CODE:

public void print( java.lang.String pContent, java.lang.String pTitle ) {

ByteArrayInputStream htmlSrc = new ByteArrayInputStream(pContent.getBytes());

IWDResource source = WDResourceFactory.createMassDataResource(htmlSrc, WDWebResourceType.HTML);

String url = source.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());

IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,pTitle);

win.show();

}

Best regards,

Hassane.