Answered by:
Receiving Idoc as String (instead of typed) in WCF-SAP Adapter

Question
-
Hallo All,
I am trying to receive Idoc from SAP as Raw String.
In the WCF-SAP Adapter binding, I set the "ReceiveIdocFormat = String" (instead of Typed).
I get the Idoc as Xml with just 2 xml elements wrapping it. This is expected.
<ReceiveIdoc xmlns="http://Microsoft.LobServices.Sap/2007/03/Idoc/"><idocData> Idoc as String </idocData></ReceiveIdoc>
Now, in the Messages tab, I selected "Path-Content located by body path".
Body path expression = /*[local-name()=’ReceiveIdoc’]/*[local-name()=’idocData’]
Node encoding = String.
But it doesn't work.
While sending a doc. from SAP, the process goes on and on. Nothing is received in BizTalk.
I also tried with this xpath //*[local-name()=’idocData’]/
Thanks for your help.
Prabath
Friday, March 3, 2017 10:49 AM
Answers
-
What do you mean by goes on and on? You mean SAP doesn't get a response to a request/response? This could happen if there was an error in receiving the message. Have a look at your suspended instances and the Windows Application Log for errors.
Your XPath looks correct. To test, set up a one-way Send Port with a filter of type BTS.ReceivePortName and set it to the value of your SAP port. You can easily see the output of the Receive Port.
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)- Proposed as answer by SMSVikasKEditor Saturday, March 11, 2017 2:47 PM
- Marked as answer by SMSVikasKEditor Saturday, March 11, 2017 2:48 PM
Friday, March 3, 2017 1:51 PM
All replies
-
What do you mean by goes on and on? You mean SAP doesn't get a response to a request/response? This could happen if there was an error in receiving the message. Have a look at your suspended instances and the Windows Application Log for errors.
Your XPath looks correct. To test, set up a one-way Send Port with a filter of type BTS.ReceivePortName and set it to the value of your SAP port. You can easily see the output of the Receive Port.
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)- Proposed as answer by SMSVikasKEditor Saturday, March 11, 2017 2:47 PM
- Marked as answer by SMSVikasKEditor Saturday, March 11, 2017 2:48 PM
Friday, March 3, 2017 1:51 PM -
Hi Prabath
Check the following-
1. What is the IDoc status seen from SAP? Does it show transmitted?
2. Does anything get logged in Windows eventlogs?
3. If the above does not help, try to setup a WCF-SAP trace-
https://www.codit.eu/blog/2010/04/21/wcf-adapter-setting-a-trace/
https://msdn.microsoft.com/en-us/library/cc185303%28v=bts.10%29.aspx?f=255&MSPPError=-2147217396
Thanks Arindam
Saturday, March 4, 2017 5:31 AMModerator -
Hi,
First try to save the idoc in whatever format you set-up in receive location to a folder and then check the content.
Are you able to save the idoc to the folder?
Thanks
JB
Monday, March 6, 2017 3:02 AM