cancel
Showing results for 
Search instead for 
Did you mean: 

Sharepoint has problems consuming webservice provided by XI/PI

kimmo_sirpoma
Participant
0 Kudos

Are there sharepoint experts reading this forum?

We have implemented a webservice in XI 7.0, which uses RFC-adapter and connect to SAP ERP (and calls an RFC function there). We generated the XSD out of RFC function module in XI and used same XSD to generate SOAP adapter interface. Thus the interface are the same in both sides in XI and there is no field-to-field mapping. Consequently we generated the WSDL from XI .

As a result, XI expects that incoming webservice call must have root tag in format:

<urn:yourfunctionmodulename xmlns=:urn="urn:sap-com:document:sap:rfc_functions" xmlns:soapenv="......">

However, when sharepoint calls this webservice the root tag is wrong (seen in sxmb_moni inbound payload):

<yourfunctionmodulename xmlns="urn:sap-com:document:sap:rfc_functions" xmlns:soapenv="......">

Thus the urn: notation is missing from root tag.

As a result the message runs to error in XI when sending data to RFC-adapter and the RFC function in the backend will never get called. The error message in SXMB_MONI is the famous "functiontemplate from repository was <null>", where the <null> clearly indicates it never got the function module name ripped from the message.

Please note, that we have read OSS note 730870 and especially the question 16. There is nothing wrong with the interface implementation itself, because it works from SOAPUI test tool. When using SOAPUI (using the generated WSDL) the payload after SOAP adapter is according to requirements e.g. <urn:yourfunctionmodulename xmlns=:urn="urn:sap-com:document:sap:rfc_functions" xmlns:soapenv="......">

So we assume this is an issue in sharepoint. It does not generate the call according to WSDL.

It this a typical problem in Sharepoint-XI scenarios that messages are not XI compliant?

Do they have tools in Sharepoint in order to manually format the message to be XI compliant?

If not, I assume we have to handle the missing tag in message mapping (XSLT)?

In my own mind I came to alternative conclusion - maybe it is not wise to generate webservice interface from XSD generated from RFC function. Maybe instead, define a separate XSD for the soap interface part (maybe still use same element names) and just define normal mapping between soap interface and rfc-interface. By doing this, I assume the URN: namespace issue in root element no longer exists for any type of caller including Sharepoint. What do you think?

FYI: we are not the partner that implements the sharepoint part.

br: Kimmo

Accepted Solutions (0)

Answers (2)

Answers (2)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Kimmo,

Please paste here first 6 lines of success message and failure message. So that we can compare them.

I still believe, absence of u201Curn:u201D in message coming from SharePoint is not the reason for error.

FYI, if channel permits you can use XMLAnonymizerBean [Link|http://help.sap.com/saphelp_nwpi711/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm], to remove or add namespace reference u201Curn:u201D.

Regards,

Raghu_Vamsee

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Kimmo,

Both root tags are equal. First one is explicit namespace, second one is default namespace. Please check this [Link|http://www.w3schools.com/xml/xml_namespaces.asp].

<urn:yourfunctionmodulename xmlns:urn="urn:sap-com:document:sap:rfc_functions" xmlns:soapenv="......">
=Equal=
<yourfunctionmodulename xmlns="urn:sap-com:document:sap:rfc_functions" xmlns:soapenv="......">

As your are able to call the XI web service from SOAPUI, (so the web service is fine)

1. Take the entire SOAP message from SXI_MONITOR which is sent from SOAPUI to XI. u2013 success message

2. Take the entire SOAP message from SXI_MONITOR which is send from SharePoint. u2013 failure message

3. Compare them.

I think, we need pay attention to details of SOAP message coming from SharePoint.

Regards,

Raghu_Vamsee

kimmo_sirpoma
Participant
0 Kudos

When using SOAPUI, by default the root tag is <urn:yourfunctionmodule xmlnr:urn="urn.....>" as it should be. And it works as already stated.

If I manually in SOAPUI testcase window delete the urn: notation from the root tag (e.g. use instead <yourfunctionmodule xmlns=....> and run the test case, I get similar error in XI as it was called from Sharepoint (""functiontemplate from repository was <null>").

I still wonder that would it be always more safe to offer webservices from XI by using a custom interface rather than using xsd from RFC function module. Just to avoid these root-tag URN namespace issues.

br: Kimmo