cancel
Showing results for 
Search instead for 
Did you mean: 

RFC -> XI -> WebService

Shabarish_Nair
Active Contributor
0 Kudos

Details :

1. I have created a RFC with import as fromZip and toZip and the export as distance.

2. I found a free webservice at this link http://webservices.imacination.com/distance/index.jsp?fromZip=22222&toZip=12222&x=29&y=12

and i have imported the wsdl file into my ED.

3. i will be using the messages getDistanceRequest and getDistanceResponse of the WSDL in my scenario.

Problem.

I have developed my scenario. i execute the RFC and the mapping is done and the getDistanceRequest is sent to the SOAP receiver adapter.But i get a error message com.sap.aii.af.ra.ms.api.DeliveryException: webservices.imacination.com in SXMB_MONI.

The parameters i have provided in my adpater is

Target URL : http://webservices.imacination.com/distance/Distance.jws

Can someone throw light on this !!!

I tested the same via XMLSPY and i get a response back from the WebService.

Regards,

Shabarish

PS: Since my browser involves a proxy setting i even tried to configure the proxy in the adapter but then the error comes as com.sap.aii.af.ra.ms.api.DeliveryException: <my proxy address> .

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi,

Try giving soapAction as <b>getDistance</b>...

Regards

Suraj

Shabarish_Nair
Active Contributor
0 Kudos

No Luck

Just posting my log from the message monitoring ...

2006-03-22 19:18:30 Success The message was successfully received by the messaging system. Profile: XI URL: <my server address>

2006-03-22 19:18:30 Success Using connection AFW. Trying to put the message into the request queue.

2006-03-22 19:18:30 Success The message was successfully retrieved from the request queue.

2006-03-22 19:18:30 Success The message status set to DLNG.

2006-03-22 19:18:30 Success Delivering to channel: CC_SOAP_Distance_WebService

2006-03-22 19:18:30 Success SOAP: request message entering the adapter

2006-03-22 19:18:30 Success Message successfully put into the queue.

2006-03-22 19:18:30 Error SOAP: error occured: java.net.UnknownHostException: webservices.imacination.com

2006-03-22 19:18:30 Error Exception caught by adapter framework: webservices.imacination.com

2006-03-22 19:18:30 Error Delivery of the message to the application using connection AFW failed, due to: webservices.imacination.com. Setting message to status failed.

Former Member
0 Kudos

ShaBZ,

I guess your error log is self explanatory!!!

<i>2006-03-22 19:18:30 Error SOAP: error occured: java.net.UnknownHostException: webservices.imacination.com</i>

XI server is not able to get through to the host

<b>webservices.imacination.com</b>.

Is it possible for your XI server to connect to internet?? and reach this webservice?

Regards,

Amol

Shabarish_Nair
Active Contributor
0 Kudos

Yes !!! I have been having that in the back of the mind ... but how do i check if my server can connect to the internet ?

I am clueless !!!

Former Member
0 Kudos

Your network administrator / basis guys should be able to tell you that!!

Shabarish_Nair
Active Contributor
0 Kudos

Lemme C if they can be of help !!!

Former Member
0 Kudos

Hi Shabarish,

Please go through this blog on <a href="/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi Webservices using SAPXI</a> and see if it helps you......Probably you can compare what you have done with what is given in the blog step by step and see if it helps you.The blog explains the same Scenario that you are trying.

I hope it helps you solve your problem.

Regards,

abhy

Shabarish_Nair
Active Contributor
0 Kudos

Thanx Abhy but my scenario is different from this.

In the case of the weblog, the webservice is deployed on the XI server itself. It works for me that way but here my webservice is hosted on the internet (http://webservices.imacination.com/distance/index.jsp?fromZip=22230&toZip=22222&x=28&y=6)

I guess it might be something to do with the XI server setting (or something) as Amol suggested !!

Former Member
0 Kudos

Hi Shabarish,

The target URL what you have provided is correct...You need to configure the proxy in your SOAP adapter. This should be provided with the port and also your LAN user id and pwd.

Once that is done you need check the use query string option and provide SOAP action as getDistance.

Cheers

JK

PS: Award points if this helps you

Shabarish_Nair
Active Contributor
0 Kudos

hi JK,

as i said in my first post

>> PS: Since my browser involves a proxy setting i even tried to configure the proxy in the adapter but then the error comes as com.sap.aii.af.ra.ms.api.DeliveryException: <my proxy address> .

My proxy server has no authentication so no need for the password. But now something came to my crazy mind

I did a ping on my proxy address and took the ip of the destination and put it in my place of the proxy string.

and guess what now i get a new error

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Call Adapter

-->

<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapter</SAP:Category>

<SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText><b>soap fault: No such operation 'getDistanceRequest'</b></SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

and yes i have checked the use query string option and provided the SOAP action as getDistance.

Hmmm .. at least now i see a progress

Former Member
0 Kudos

<i>I did a ping on my proxy address and took the ip of the destination and put it in my place of the proxy string.</i>

Shabarish,

This wont help. Note that most of the <i>servers</i> inside a corporate boundry would never be connected to Internet.So specifying proxy settings & whatever would not help certainly. The only issue in your case is YOUR XI SERVER CAN NOT CONNECT TO THE WEBSERVER WHICH IS HOSTING THE WEBSERVICE. Its an issue with internet connectivity only.

Why dont you try one thing?

1. Create a java class having 1 method say 'getDistanceRequest' in NDS.

2. This method should accept your input zip codes and return distance so signature could be like

public int getDistanceRequest(int fromZip,int toZip)

3. once you create this java class, switch to the webservice perspective--> Java explorer.

4. select your class and select New --> Web Service

5. after this completes, select the project and right click --> Build EAR.

6. Deploy the ear on your XI (WebAS)using SDM and go to this link.

http://hostname:port/wsnavigator/

you can download WSDL for your web service and continue with the same

Shabarish_Nair
Active Contributor
0 Kudos

Ok here i go ....

First, JK thanks for mailing me and generating the scenario at your end considering the time constraints.... but then what are buddies for aint it ?

Actually it seems there was a need to tweak the WSDL the webservice site hosted.

I had used the messages getDistanceRequest and getDistanceResponse (from the WSDL i imported in my ED) in my mapping but seems the WebService doesnt understand the operation getDistanceRequest (as the error thrown in MONI shows)

.... and i made an adjustment by creating a new DT with getDistance as the node (so literally no use of the WSDL)

So now it WORKS !!! (JK it was your hint that you mailed me that worked)

Thnx All .... i can get a good sleep now that it works !!

Moral: Nothing is impossible !!

Answers (1)

Answers (1)

Former Member
0 Kudos

For the response, is it necessary to create a Receiver RFC adapter and a sender SOAP adapter?

Thanks

Paul