cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice to RFC Scenario - Through Java Mapping

Former Member
0 Kudos

Hello All,

In my integration scenario, I will receive a request from a webservice consumer. The webservice is my outbound interface.

Now I have to write a Java Mapping for it because a similar interface (file to RFC) has been implemented using it and the customer wants minimum deviation from that functionality.

One question, that I have at this point in time is:

I must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods, one of them is:

public void execute(java.io.InputStream in, java.io.OutputStream out). In the existing interface the InputStream object say 'input' has been initialized to FileInputStream:

InputStream in = new FileInputStream(new File("Sample7.xml"));

What shall I initialize it to in my case? One probable is a InputSource, but does the execute method accept an InputSource?

Please help,

Regards,

Varun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You do not need initialize it, because "in" contains the payload of the message.

Regards

Ivan

Former Member
0 Kudos

Hello Jose,

Thanks for your reply, but what I have mentioned above is how it is being done in a similar interface. That being a file to RFC interface, it makes sense to initialize 'in' with the file name.

But if you mean that I do not need to initialize in my case (Webservice to RFC), then I'll surely give it a try and if useful, will get back to you.

Thanks again,

Varun

former_member187339
Active Contributor
0 Kudos

Hi Varun,

The current (one used in File to RFC) Java mapping will work for Webservice interface too.

When the File adapter picks the XML file the payload is available in the 'in' . When the file adapter us replaced by Webservice then also the Request payload will be available for the 'in' of Java mapping

Regards

Suraj

Answers (0)