cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service to Web Service Error

Former Member
0 Kudos

First, I am new to PI but have successfully completed 3 basic tutorials. But now, with a more realistic test and no tutorial I have hit a wall. The scenario, I want to receive a very simple structure with only a person’s id. Map that ID into an export request structure for a look-up web service. Get the user record back, map out just the full name and return that name to the requestor. The look up web service requires authentication which I’ve included on the SOAP adapter. I have SOAP 1.1 adapters on both sides. I’ve imported my WSDL and the more complex request and response structures for the look up service as XSDs for data types. But when I test this, I get generally unhelpful errors. In SoapUI, the response is

<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

               <context>XIAdapter</context>

               <code>ADAPTER.JAVA_EXCEPTION</code>

               <text>See log trace with id: n/a</text>

  </s:SystemError>

Checking the log I see this error...

x Inside All part of swcv ... needs to be removed

x

x

x Deprecated scope of type SERVERSESSION_AT_LEAST_ONE_APP_SCOPE is used! Please replace the usage of scopes with new mechanism based on "Cross application session communication API".

Any help or pointers to how to find and resolve this are greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm not sure if this is related, but it looks like the authentication is in the soap header with specific user name/password elements. I'm looking for a way to populate these now. It seems reasonable this could cause the error I'm seeing. I looked at modules to add to the header but none seem to be exactly what I need, as simple as my need is. So how do I include the custom user name/pw elements in the header?

former_member182412
Active Contributor
0 Kudos

Hi Carlton,

Check this blog to add the username and password in the soap header using soap with axis adapter.

or using XSLT mapping.

[SAP PI] &amp;#8211; Customize Message with XSLT Mapping | Simon Les Flex&amp;#039;s Blog

Regards,

Praveen.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks everyone for all the great help. I got past posting my request to the web service. The main issues where (1) having the wsdl where the endpoint was needed and (2) including custom user name/pass word in the header. I learned lots about how to debug these scenarios in the process. I do still have a major issue with processing the response but there are other threads I am exploring to resolve this. I will post a new thread if I need help with it but to just let you know, the payload of the response is xml but it is wrapped in a CDATA so PI sees it only as a big string. I need to see this payload as xml. But, I have found threads here and am chasing this to the ground. Once I get this I think I will have this thing working, the rest should be very simple. Thank you guys many times over for the help!!!!

former_member182412
Active Contributor
0 Kudos

Hi Carton,

Can you make sure you are not calling WSDL URL, http://host:port/Service?wsdl at the end, this is only retrieve the wsdl for that web service not for calling the web service, You need to use the url for endpoint without ?wsdl , I think this is the reason for getting 405 method not allowed.

Regards,

Praveen.

Former Member
0 Kudos

Praveen, I'll correct the endpoint. It may take a little longer to do the user name/pw in the header as I have another project starting up very soon. I wanted to have this working before that project but it is not looking good. Thanks for the pointers. I'll post back when I have these two things updated.

UPDATE: I changed the URL and now the message log is clear this is a user log in error. So I need to get the authentication in the header. Good catch!

But for the XSL I have some questions. (1) When I zip and import the xsl into Imported Archives, then try to add it as an xsl type mapping, my xsl zip never shows up? and (2) it's not clear exactly where I use this xsl. On the message map or operation map. Thanks again!

former_member186851
Active Contributor
0 Kudos

Hello Carlton,

XSL mapping should be used in operation mapping ,not in message mapping.

Below links give the details about XSLT mapping.

XSLT Mapping in SAP PI – An Introduction and How to Guide

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/000ee4d0-be91-2d10-8aaf-ff8045bdd...

engswee
Active Contributor
0 Kudos

Hi Carlton

You can also try the following module to add custom headers to the SOAP message.

If it fits your requirement, it might take less effort than going down the SOAP Axis or XSL approach.

Regards

Eng Swee

engswee
Active Contributor
0 Kudos

Hi Carlton

Instead of checking the Log Viewer in NWA, have you tried looking at the Message/Audit Log of the respective message in Message Monitor? There might be more descriptive error messages there.

Regards

Eng Swee

Former Member
0 Kudos

Thanks for the pointer, that helped. It looks like I am calling a method the service doesn't like. Would be nice if it showed that service name in the audit log. I'll post back once I find the issue but here is what I see in the log....

2/17/2016 10:45:22.952 AM Information XISOAP: XI message received for processing

2/17/2016 10:45:22.952 AM Information Validation for message with message ID 74abffc0-d58d-11e5-b28c-0000006fa7ca successful

2/17/2016 10:45:22.983 AM Error SOAP: Call failed: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 405 Method Not Allowed

2/17/2016 10:45:22.983 AM Error Exception caught by adapter framework: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 405 Method Not Allowed

2/17/2016 10:45:22.983 AM Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 405 Method Not Allowed

former_member186851
Active Contributor
0 Kudos

Hello Carlton,

Can you post the Soap channel config to assist futher.

Former Member
0 Kudos

Here is the channel I think is causing the problem. I think maybe Im reading the wsdl wrong for the method. But here is the method I am trying to call, ExportData...

<binding name="MyCompWS_Binding" type="wsdlns:MyCompWS_PortType">

  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

  <operation name="ExportData">

  <soap:operation soapAction="ExportData"/>

  <input name="MyCompWS_In">

  <soap:header wsdl:required="false" message="wsdlns:AuthIn" part="UserInfo" use="literal"/>

  <soap:body namespace="MyComp" parts="Table FolderId Fields Filter CSVSeparator FormatOptions FormatType ExportOptions" use="literal"/>

  </input>

  <output name="MyCompWS_Out">

  <soap:body namespace="MyComp" parts="Data" use="literal"/>

  </output>

  </operation>

engswee
Active Contributor
0 Kudos

Hi Carlton

A few more tips.

1. When testing SOAP web service, it'd be useful to test the behaviour using an external tool like SOAP UI. That will enable you to compare the behaviour and tweak your design accordingly.

2. Adding the TraceHTTP parameter in the SOAP receiver channel as mentioned in the blog below will provide more details on the SOAP call.

Regards

Eng Swee

former_member182412
Active Contributor
0 Kudos

Hi Carlton,

Did you see my reply below, you are using wsdl url for endpoint url which is not correct, you must use correct url for endpoint url which is location attribute in the wsdl.

Regards,

Praveen.

Former Member
0 Kudos

Eng Swee, thanks I have been useing Soap UI and know that the service works and I've tested my very simple mappings inside XI and they also work. I'll look into useing TraceHTTP. Thanks for the help.

JaySchwendemann
Active Contributor
0 Kudos

At the risk of being a nuisance, I'll throw in my all purpose debugging weapon when it comes to PI (HTTP) troubleshooting: XPI Inspector http://service.sap.com/sap/support/notes/1514898

However, I think Praveen and Eng Swee already put you on the right track to succeed on this.

Cheers

Jens