cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a synchronous SOAP web service within a Java Mapping

Former Member
0 Kudos

Hello! Everyone

We have requirement in which we need to get the response payload from a synchronous response message - which needs to be passed on in the target message - the SOAP request need to be triggered within a Java Mapping.

Can you please let me know how we can configure the SOAP TARGET URL (there is no authentication) - however, we need to go through a proxy sever.

We need help with how to configure a SOAP Target URL, Proxy Server Name & Proxy server Port in the Java mapping for a synchronous request & response. Thank you so much for your valuable guidance & help!!

Thank you,

Rithvik

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Rithvik,

You can also use the Java API for calling URLs. This might be needed if:

1. other HTTP methods will be used e.g GET, PUT, DELETE

2. you need to add HTTP headers/dynamic URL. Dynamic config is not available for lookups

3. Lookups by definition should not cause side effects. Meaning, it is not intended by SAP to be used other than retrieving information

Regards,

Mark

Former Member
0 Kudos

Thank you!! Mark, Evgeniy, Manoj

I would like to NOT use the SOAP Adapter communication channel and directly go from the Java Mapping - the reason being the expected MTOM settings are not available on the SOAP adapter.

Hence, we are planning to call the service directly from the JAVA mapping.

Has anyone had experience developing a Java mapping which calls a web service (similar to a SOAP look up). However, without using the communication channel.

Additionally, we have to have Proxy serve we need to provide apart from the target SOAP URL in the java mapping.

Please, let us know if anyone can give some info on how to call webserivce without SOAP channel in a Java mapping.

Thank you!!

Rithvik

former_member190293
Active Contributor
0 Kudos

Hi Rithvik!

You could try to use SAAJ API for Java in your case.

http://scn.sap.com/people/james.wood/blog/2011/05/12/dealing-with-those-pesky-synchronous-web-servic...

Regards, Evgeniy.

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi Rithvik!

Since you use predefined communication channel in SOAP lookup

Channel channel = LookupService.getChannel(<Business System>, <Communication Channel>);

SystemAccessor accessor = LookupService.getSystemAccessor(channel);

you can set service URL and proxy parameters in SOAP receiver communication channel:

For example of java code for performing SOAP lookup please refer to Manoj's answer above.

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor
0 Kudos

Check these links: