cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming XI Web Service from Java Client

Former Member
0 Kudos

Hi All,

I'm trying to consume a web service in XI using a Java client (Sun Java Studio). I'm using the WSDL generated using the Define Web Service in the Integraton Directory. However the Java client is not connecting to XI. I feel something is wrong with the URL because everything else is quite simple and straight forward. Has anyone tried this and faced a similar problem with any Java clients? If you have some information please help.

Many Thanks,

Sandeep

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

See SAP Note 856597 FAQ: XI 3.0 SOAP Adapter

Also see

/people/michal.krawczyk2/blog/2005/09/07/xi-why-dont-start-searching-for-all-errors-from-one-place

Troubleshooting SOAP Message - XI - /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi

Troubleshooting - RFC and SOAP scenarios-/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

Regards

Chilla.

Former Member
0 Kudos

Hi Sandeep,

Hey you have mentioned that you are Consuming webservices..If at all if you are consuming the webservice..you need to get the WSDL for that particular webservice and the same you need to imported in to XI.

If at all if you are using webserivce as Consuming you no need to create any url for any thing in ID.

I Hope you know the difference between Consuming of werbservice and Expose of webservice.

Please let me know if you have any clarifications regarding this..!

Thanks and Regards,

Chandu.

Former Member
0 Kudos

Hi Chandu,

I'm consuming a web service using a java program. The WSDL is downloaded from XI (Using the Define Web Service option). The service provider is XI and the consumer is the Java application.

Thanks,

Sandeep

Former Member
0 Kudos

what kind of error you are getting ?

Are you setting the credentials to access this in your Java client?

Former Member
0 Kudos

Hi Amol,

I'm not getting any error as such. This is an asynchronous message. The applcation waits for sometime and then continues. But I dont see any messages in XI. The username and password are supplied along with the URL. Is there some other credentials that are to be supplied? from the same application I'm able to access the Google web service.

Thanks,

Sandeep

Former Member
0 Kudos

Yes , because you will be sending the data thro' a sender SOAP into XI pipeline, you most probably need to make use of XIAPPLUSER credentials...not very sure about this...but yes..you need to set the credentials..

Former Member
0 Kudos

Hi Amol,

This is not using a SOAP adapter. In this case the message is directly sent to the Integration engine.

Thanks,

Sandeep

Former Member
0 Kudos

Hi,

See this..

SOAP webservice directly to IE - /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine

Regards

Chilla.

Former Member
0 Kudos

Sandeep,

In url you need to pinot to ABAP Port.

check ur url

http://<server>:<ABAP-port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<YourService>&Interf...;

The namespace must be written with escaped characters. (%5E stands for "^")

Regards

sreeram.g.reddy

bhavesh_kantilal
Active Contributor
0 Kudos

Sandeep,

Even if you are sending the SOAP message directly to the Integration Engine, you need to provice the crenedtials with the role of PIAPPLUSER like correctly pointed by Amol.

Also as this is an Asynch call, have you made the QOS as Evactly once in the URL of the WSDL?

Add the crentials(sap-user and sap-password ) and the Exactly Once QOS in the URL and then check whether it works.

Regards

Bhavesh

Former Member
0 Kudos

Hi,

The below information is in above said blog

<b>http://<server>:<ABAP-port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<YourService>&Interface=<YourNamespace>%5E<YourInterface>

The namespace must be written with escaped characters. (%5E stands for "^")

Note: The WSDL wizard creates an address with the escape sequence &amp; instead of &. Some SOAP clients (for example XPLSpy) do not automatically restore the character and you have to do this manually.

By default the SOAP call is treated as a synchronous call. If you want an asynchronous call, you have to add &QualityOfService=ExactlyOnce to the URL.

Additionally your web service client must provide the HTTP header parameter "SOAP action" = http://sap.com/xi/WebService/soap1.1

The Web Service Wizard of the Integration Repository creates a WSDL concerning this URL and this SOAP action automatically. Only for asynchronous calls you need to change the URL inside the WSDL file with an editor and add &QualityOfService=ExactlyOnce.

Advantage

When you send SOAP messages directly to the Integration Server, you reduce the message load on the adapter engine. This can improve the performance.

Restrictions

The SOAP inbound channel of the Integration Server does not support attachments. SOAP messages with content type "multipart" are rejected.</b>

Regards

Chilla..

Former Member
0 Kudos

Hi Bhavesh,

This is all done and it works with a test tool which is supplied by SAP. But the problem is when it is used from a Java application. So this seems to be a URL incompatibility. Problem could be because of the many escape charaters used in the URL.

Thanks,

Sandeep

Former Member
0 Kudos

Sandeep,

replace & with &amp and try

bhavesh_kantilal
Active Contributor
0 Kudos

hmm.. have never used a WSDL from a Java Application and so I have reached a dead end here. maybe somebody who has used the same can help you on how to go ahead with this.

Regards

Bhavesh