cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with the communication between .Net 4.0 client application to PI web service

0 Kudos

Dear Experts,

We are facing an issue where in a .Net client application is not able to call and post a message to the PI web service exposed via Sender SOAP adapter. We are able to successfully post the message to the PI web service using the SOAP UI Tool.

It is throwing the following error.

HTTP/1.1 500 Internal Server Error

server: SAP NetWeaver Application Server 7.11 / AS Java 7.11

content-type: text/xml; charset=utf-8

date: Wed, 06 Jun 2012 09:45:51 GMT

set-cookie: saplb_*=(pd97di00_D97_00)7916751; Version=1; Path=/

set-cookie: JSESSIONID=QSj3r-tTJKCtD9nky1gH8rqTmi_BNwHPzHgA_SAPBW1fzCu4O9a1ZlCs8LSemDIZ; Version=1; Path=/

set-cookie: JSESSIONMARKID=VCXcFgsQEU7CcdpP82paUb_iD915tra6CI_8_MeAA; Version=1; Path=/

Content-Length: 5061

<?xml version='1.0'?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>

  <SOAP:Body>

    <SOAP:Fault>

      <faultcode>SOAP:Server</faultcode>

      <faultstring>Server Error</faultstring>

      <detail>

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

          <context>XIAdapter</context>

          <code>ADAPTER.JAVA_EXCEPTION</code>

          <text><![CDATA[

com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=HR_CH_ASEBIS_D;TS=;AN=SI_ReqHRMasterData_oa;ANS=null;”

Below is the screenshot of the sender SOAP channel.

The URL used to post the message is as below:

http://<host>:<port>/XISOAPAdapter/MessageServlet?senderParty=&;senderService=<senderBusinessSystem>... interfaceNameSpace>

Client application is hosted on .Net 4.0 Framework. Below is the Binding and Endpoint configuration set on it.

<basicHttpBinding>

                <binding name="TransportWithMessageCredential2" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">

                                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>

                                <security mode="None">

                                                <message clientCredentialType="UserName" />

                                </security>

                </binding>

</basicHttpBinding>

                                                 

                                                 

<endpoint

                address=”<URL from Sender Agreement>”

                binding="basicHttpBinding" bindingConfiguration="TransportWithMessageCredential2" contract="ServiceReferenceSAP.<interfaceName>" name="TransportWithMessageCredential2">

</endpoint>

Any help is appreciated on this issue.

Regards

Sudhir Kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudhir,

Check with the .Net Client applilcation, if they are using exactly the same URL that was shared by you.

Also we need to verify that No additional translation has taken place in the URL provided and nor some Characters are being truncated within  the URL while posting the Message to PI

Thanks,

    Suji   

0 Kudos

Thank you all !

Your suggestion were bang on !

The error was exactly in the URL. Interface Namespace  in the URL genrated through sender agreement is as  urn%3Aabc.com%3Api%3Auk%3Act%3AAB_DD_999_ABC_PQR_XYZ%3ATendulkar ,  but in the client side some additional translation had taken place in the URL provided and the Characters %3A got translated to  '-' within  the URL. This is working fine now.

Best Regards,

Sudhir Kumar

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sudhir,

Greg is correct, i got stuck with the same Error today "Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=" and after long Struggle i got a Solution for this,

As per your above comments you are using URL,

" http:///XISOAPAdapter/MessageServlet?senderParty=&senderService=xx_xx_xx_D&receiverParty=&receiverService=&interface=SI_ReqData_oa&interfaceNamespaceurn:Namespace:xxxx"

Actually the Error is in your URL and mainly in Namespace

, Please check & give Details correctly as it is in your "Service Interfaces or ESR".

The "Namespace will look like interfaceNamespace=http://xxxxx/xxxetc" & also check Each and every word of the Namespace and URL Details.

Also i have Highlited some words with red marks like,

xxx.xx.xxx.xxx:port

senderService=xx_xx_xx_D

interface=SI_ReqData_oa

interfaceNamespaceurn:Namespace:xxxx

Please give correct and Appropriate Port No. & details as it is designed in ESR.

OR

Also you are getting ANS=null  , it means there is some thing Wrong after "http:///XISOAPAdapter/MessageServlet?senderParty=&senderService=xx_xx_xx_D&receiverParty=&receiverService=&interface=SI_ReqData_oa&interfaceNamespaceurn:Namespace:xxxx"

Please check the highlited "receiverParty=&receiverService=&interface=SI_ReqData_oa&" if it is correct and if any of the Unwanted characters are coming init (for eg @#!$%*()_)part & because of this you are getting ANS=Null.

Error has got solved after correcting Namespace for me,

Hope above comments will help you & Please let me know if it worked for you.

Thanks,

Nikh

former_member184681
Active Contributor
0 Kudos

Hi,

I can see two options there:

1. Since the cache is mentioned, you can try refreshing it in sxi_monitor.

2. Your error description says:

Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=HR_CH_ASEBIS_D;TS=;AN=SI_ReqHRMasterData_oa;ANS=null;

So it looks like your URL isn't fully correct: see that the namespace hasn't been recognized by PI and it shows null. Try correcting the URL, it could help.

Regards,

Greg

0 Kudos

Thanks Greg, I'll check on these two points and will post the result in subsequent post.

Regards,

Sudhir Kumar

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

A couple of things:

1. Were you able to create a sender agreement?

2. Can you try http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:commchannel and see if this works?

3. If number 2 does not work, can you escape the special characters in your original URL e.g for & use %26 http://www.werockyourweb.com/url-escape-characters

Off topic, we were unable to reply to your thread http://scn.sap.com/thread/3187727, so I'll be posting it here:

There is a solution mentioned in SAP Note 1509561 - Null pointer exception during mapping using Fix Values that recommends patching your ESR Component.

To see the current patch level of your PI components see SAP Note 1381878 - How/where to check the patch levels of your XI/PI System.

After the patch has been applied, edit your message mapping and then reactivate.

Hope this helps,

Mark

0 Kudos

Hi Mark,

Answer to your questions is in  inline comments.

Mark Dihiansan wrote:

Hello,

A couple of things:

1. Were you able to create a sender agreement?  Yes

2. Can you try http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:commchannel and see if this works?

I have tried out with this option but it didn't worked.

3. If number 2 does not work, can you escape the special characters in your original URL e.g for & use %26 http://www.werockyourweb.com/url-escape-characters

I will try with this change and let you know the results in subsequent post.

Off topic, we were unable to reply to your thread http://scn.sap.com/thread/3187727, so I'll be posting it here:

There is a solution mentioned in SAP Note 1509561 - Null pointer exception during mapping using Fix Values that recommends patching your ESR Component.

To see the current patch level of your PI components see SAP Note 1381878 - How/where to check the patch levels of your XI/PI System.

After the patch has been applied, edit your message mapping and then reactivate.

Thanks Mark,This info is very helpful

Hope this helps,

Mark

Former Member
0 Kudos

I agree with Baskar, it sounds like the .NET call is referencing something invalid because PI says it cannot find the object in the cache.

If you can get an HTTP capture from the client side (using Fiddler or similar) to compare the conversation SOAPUI vs the .NET app maybe it would shed some light.

Also I doubt it will help in this case but maybe check NWA Logs (default trace) for some more debug info.

0 Kudos

Hi Aaron/Baskar.

We have generated the WSDL from the Sender Agreement. The same is being used in the .Net client application also the .Net client application is using the same URL that we used in the SOAP UI tool. Still getting the error.

We have also  used the  Fiddler tool to get the HTTP capture from the client side. We compared the payloads that are generated from the .Net application and the SOAP UI tool and both are found to be exactly similar.

Regards,

Sudhir Kumar

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Sudhir,

Aside from the payload, you should also compare the HTTP Headers that your .net and SOAP UI is passing. Kindly paste here the HTTP Header that SOAP UI is passing (by going to raw tab) and we can analyze it.

Hope this helps,

Mark

0 Kudos

These are the Headers for  the Message from .Net client for your reference:

Please check and let me know if you see any thing unusual in it :

POST http://xxx.xx.xxx.xxx:port/XISOAPAdapter/MessageServlet?senderParty=&senderService=xx_xx_xx_D&receiv...Namespace:xxxx HTTP/1.1

Content-Type: text/xml; charset=UTF-8

Authorization: Basic ...

User-Agent: xxxxHttpClient/6.10

Cookie: $Version:"1"; saplb_*="(xxxx_D97_00)7916750"; $Path="/"

SOAPAction: "http://sap.com/xi/WebService/soap1.1"

Host: xxx.xx.xxx.xxx:port

Content-Length: 324

Accept-Encoding: gzip, deflate

Proxy-Connection: Keep-Alive

Thanks and Regards,

Sudhir Kumar

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I suspect problem with the webservice URL which your client is posting.  You can suggest to use WSDL url or provide SOAPUI url to the client.  You dont need even receiverparty , receiverservice details. This is pure wsdl url issue. So the endpoint is not binding due to invalid URL values. Your side not an issue. Because using your WSDL you are able to connect via SOAPUI and get response.

rajasekhar_reddy14
Active Contributor
0 Kudos

When .net system sends a request is it reaching SOAP Sender adapter?

0 Kudos

No, it did not reached the  SOAP Sender adapter.