Biztalk 2006 R2 and custom WCF adapter RRS feed

  • Question

  • I'm still playing around with the WCF custom adapter.

    I've been able to add a custom soap header that holds one extra field  by setting  the outboundcustomheader to a string-value.

    That worked OK.

    I now wanted to add a second field to the custom soap header. Now I receive an error that says

    "The property "OutboundCustomHeaders" has a value with length greater than 256 characters"

    OK, it's obvious what's not working.  

    Will it help if I start using a schema for my custom soapheader  (that was my next try)

    or is really that kind of a limitation on the custom soap headers?




    Kind regards Isabelledc
    • Moved by Ben Cline1Moderator Tuesday, March 15, 2011 6:56 PM Related to adapters (From:BizTalk Server General)
    Tuesday, March 15, 2011 10:57 AM

All replies

  • That sounds like a hard limitation rather than something associated with a schema. The only workaround I can think of is modifying the message before it gets sent in a custom pipeline component.


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, March 15, 2011 6:55 PM
  • I've created the headers-section using a schema , works fine in this sence , if i stop my sendport I can see the outboundheader and it holds the info I expect. 

    What is the best way to create the headers-info?  I have created a schema starting from a sample , because the headers-tag can't have a targetnamespace it seems but my extra fields do have to have one (I admit I didn't know how to do it so I used the sample trick and biztalk showed my how to do it , using xsd-import :-)

    Or is there a nicer way you can think of?



    Kind regards Isabelledc
    Wednesday, March 16, 2011 1:04 PM
  • Promoted properties have a 256 character limit. Add the field as a distinguished field instead using Context.Write(), and WCF will still pick it up:

    public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
              inmsg.Context.Write("OutboundCustomHeaders", "", "<headers>...</headers");

              return inmsg;


    Wednesday, July 3, 2013 3:23 PM