cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Synchronous Restful Service in PI 7.3.1

Former Member
0 Kudos

Hi Experts,

We are working on Synchronous  Proxy to Restful Service

Interface. Connecting to RestService through SOAP Axis Adapter as per the below blog.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/11/calling-synchronous-restful-web-s...

But we are facing below issues. Could you please help us regarding the steps what needs to done

Error from Axis Adapter :

Axis: error in invocation: java.lang.IllegalArgumentException: object type invalid: class com.sap.aii.adapter.xi.ms.XIMessage

Exception caught by Adapter framework: Object Type Invalid: class com.sap.aii..adapter.xi.ms.XiMessage

Delivery of the message to the application using the connection  SOAP_http://sap.com/xi/XISystem failed, due to com.sap.engine.interfaces.message.api exception. Messaging exception:java.lang.illegalArgument:object type invalid class com.sap.aii.adapter.xi.ms.XIMessage .

Thanks

reyaz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

The Issue Got Resolved.

we did Added Accept Header Parameter in the Receiver SOAP Axis Adapter. Given the Value for Accept header is "/*/". So PI can able to accept any header format.

Thanks

Reyaz

Former Member
0 Kudos

Hi Hussain,

How exactly did you achieve it?

I added those entries to the Module tab:

But I think it still filters out the messages.

Regards,

Hubert    

Answers (4)

Answers (4)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Reyaz,

                   SOAP axis adapter is suitable for small payloads when used for REST webservice.

You can see this thread http://scn.sap.com/thread/3239003 . Did you check the response from the webservice using other external tools or code ?

Regards

Anupam

Former Member
0 Kudos

HI All,

We identified the root casue for the issue with the help of TCPMON.

When the Rest Service sending the Response to the Post method, they are sending the ACCEPT Header parameter in the below format.

Accept: image/jpeg, application/x-ms-application, image/gif,application/xaml+xml, image/pjpeg, application/x-ms-xbap,application/x-shockwave-flash, application/msword, */*

because of this Accept Header parameter, Data is coming in the html format with inproper ending tags.

when i open the target url its xml data only.

could you please suggest how to achive this issue.

Thanks

Reyaz

nabendu_sen
Active Contributor
0 Kudos

Hi Reyaz,

This means your WSDL Response structure does not have this <ACCEPT> tag. Please let us know why this Header <ACCEPT> notation is not mentioned in the WSDL Response structure. It should be there.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Nabendu,

                    If this is a REST webservice, then there will be no WSDL to define the Response structure.

Regards

Anupam

anupam_ghosh2
Active Contributor
0 Kudos

Hi Reyaz,

                   Please ask for the API guide from the Webservice team.

In case you already have it,please check the request XML/JSON strructure and that you are sending the correct one.

Regards

Anupam

nabendu_sen
Active Contributor
0 Kudos

Hi Anupam,

You are right. Got confused with SOAP. REST response would be dynamic.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Nabendu,

                     Although the response from REST webservice is dynamic , still it maintains a specific format. This format remains constant. Programmer needs to know this format and decide on how to accept the response. Whatever REST webservices I worked with, there was no WSDL but according to this link http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/  description of REST webservice is possible with WSDL 2.0. Thus the corrrect statement would be WSDL is not mandatory for REST webservices. Please ignore my previous comment. You might have been right when you refferred WSDL for REST webservices earlier and depends on whether Reyaz is using one or not.

Regards

Anupam

nabendu_sen
Active Contributor
0 Kudos

Hi Reyaz,

As mentioned by Baskar, it may be the issue with missing libraries.

I assume you have mentioned correct Module names with correct module key with its corresponding value. Adapter is not getting able identify the value of the argument and throwing this error.

Former Member
0 Kudos

Hi Reyaz,

If selected the connection parameters - Authentication as None, then please check the XI parameoers given in Module tab.

please assign the handlers as given in below url

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/45/a3c48c87cd0039e10000000a11466f/frameset.htm

Regards,

Prasanth

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I guess you are  missing some libraries.  Please check the link http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/11/calling-synchronous-restful-web-s...

and I see similar problem over there.  Post a question to the blog owner and see if that helps.

Former Member
0 Kudos

Hi Bhaskar,

I am using Pi 7.31. Will SAP Note: 1039369 support for the PI 7.31 version or do i need to refer any other SAP Note.

when i had discussion with basis he said that sap note 1039369 supports till PI 7.1. But in PI 7.3 he installed latest patch even though we are getting the error as mentioned in the initial thread.

Thanks

Reyaz