none
WCF-Custom sapbinding SendIdoc problem RRS feed

  • Question

  • Hello,

    I'm migrating an old BTS solution to BTS 2010. In this solution we have IDOC xsd schemas generated using the old SAP adapter. I found a guide how to use the new WCF-Custom adapter with sapBinding to send these IDOCS without the need to change the solution or schema. 

    The method is to configure the send port like this: 
    Under SOAP action header set the following : http://Microsoft.LobServices.Sap/2007/03/Idoc/SendIdoc
    under "Messages" tab select the template and paste the following:
    <SendIdoc xmlns="http://Microsoft.LobServices.Sap/2007/03/Idoc/">
    <idocData><bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="string"/></idocData>
    </SendIdoc>

    However this only works when I send small Idocs, whenever I send a "bigger" idoc I receive the following error:

    Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The length of the Data Record row (in bytes) is 4456. The maximum length (in bytes) that is allowed is 2126.

    I've validated the data against the idoc schema and it passes validation. 

    I find it hard to believe that this SendIdoc action doesn't allow idocs greater than 2126 bytes, which isn't very big at all.

    Has anyone encountered this problem? Any ideas?

    Thanks

    Wednesday, November 7, 2012 9:28 PM

Answers

  • Hey,

    The guide is on the following link:

    http://msdn.microsoft.com/en-us/library/dd788582.aspx

    I believe I've solved my problem, it seems that when I don't create certain segments of the SAP idoc during my mappings I receive the above error, the size of the idoc is actually not a problem, rather the extra empty elements being created. Once I manually edit the schema and delete these segments/elements of the xsd schema which I don't ever use, all my idocs pass through to SAP correctly using the SendIdoc action.

    Thank you for your help.

    Friday, November 9, 2012 9:15 PM

All replies

  • Could you provide a link to this guide?

    This is an interesting technique, it looks like the WCF-SapBinding port basically has no way of pulling the metadata and it is very loosely coupled. I am wondering if maybe the 2126 is the default length when it cannot query the metadata on the IDOC or SAP function.

    I am not sure if there is any way to configure the default length, but I could definitely ask the BizTalk product team to see if this is exposed anywhere.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline

    Thursday, November 8, 2012 11:15 PM
    Moderator
  • Hey,

    The guide is on the following link:

    http://msdn.microsoft.com/en-us/library/dd788582.aspx

    I believe I've solved my problem, it seems that when I don't create certain segments of the SAP idoc during my mappings I receive the above error, the size of the idoc is actually not a problem, rather the extra empty elements being created. Once I manually edit the schema and delete these segments/elements of the xsd schema which I don't ever use, all my idocs pass through to SAP correctly using the SendIdoc action.

    Thank you for your help.

    Friday, November 9, 2012 9:15 PM