Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom header elements with mustUndestand="true" and WCF adapters

823 views
Skip to first unread message

esko.e...@tto.fi

unread,
Oct 28, 2008, 8:31:54 AM10/28/08
to
I am testing Biztalk WCF basicHttp adapter and a message with
mustUnderstand="true" attribute in SOAP header element is rejected by
the adapter, SOAP Fault faultcode="s:MustUnderstand". In eventlog
there is a warning indicating
System.ServiceModel.MustUnderstandSoapException in message
processing.
In WCF there is ServiceBehaviorAttribute ValidateMustunderstand
property that can be set to false but how this is done in Biztalk WCF
adapters?

Thanks
Esko Eloranta

Dan Rosanova

unread,
Oct 28, 2008, 3:06:58 PM10/28/08
to
Is this a One Way web service call? Are you specifying Envelope,
Body, or XPath for the message body?
-Dan

esko.e...@tto.fi

unread,
Oct 29, 2008, 7:35:08 AM10/29/08
to

I am testing with a request-response web service, specifing the Body
of the SOAP message. I simply published an orchestration as a web
service to test SOAP header and body processing and without
mustUnderstand="true" everything works fine.

regards
Esko

esko.e...@tto.fi

unread,
Nov 5, 2008, 6:47:15 AM11/5/08
to
This is a solution to the problem I described last week

There is an article "Using Custom Behaviors with the BizTalk WCF
Adapters, Part 1" http://msdn.microsoft.com/en-us/library/cc952299.aspx
describing custom behavior use in Biztalk WCF adapters.
Part 2 of the article is not yet published, it will show how to write
and configure custom beheviors, yet part 1 of the article gave enough
advice to solve the problem.

To get WCF adapter with basicHttp binding to accept messages with
custom headers and mustUnderstand="true" you must:

1. Create a class that inherits from BehaviorExtensionElement and
returns MustUnderstandBehavior set to false.

using System;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;

namespace BehaviorExtensions
{
public class MustUnderstandValidationElement :
BehaviorExtensionElement
{
protected override object CreateBehavior()
{
return new MustUnderstandBehavior(false);
}
public override Type BehaviorType
{
get
{
return typeof(MustUnderstandBehavior);
}
}
}
}

You must sign the assembly and install it into the GAC

2. Add behaviorextension to machine.config file. This makes the
extension visible in Biztalk custom adapter configuration.

<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="mustUnderstand"
type="BehaviorExtensions.MustUnderstandValidationElement,
BehaviorExtensions, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=559c32f3f0bc2f74" />


3. You must use Custom Isolated adapter with basicHttp binding. In
adapter configuration Behavior tab right click EndpointBehavior and
select Add extension. Now there should be "mustUnderstand" extension
available, select it and the problem should be solved.

regards
Esko Eloranta

satya

unread,
May 14, 2010, 4:21:52 PM5/14/10
to
i need to work on setting up HTTP Header fields( as i am working with WCF basichttp binding) in cutom pipeline.

i.e I need to stuff information like Senderidentificatonnumber, Targetidentficationnumber, timestamp......etc. in http header of custom send pipeline.

Please let me know how to access http header values or how to set http header values from custom pipeline

esko.elorant wrote:

Custom header elements with mustUndestand="true" and WCF adapters
01-Nov-08

Thanks
Esko Eloranta

Previous Posts In This Thread:

On Saturday, November 01, 2008 3:05 PM
esko.elorant wrote:

Custom header elements with mustUndestand="true" and WCF adapters

Thanks
Esko Eloranta

On Saturday, November 01, 2008 3:05 PM
Dan Rosanova wrote:

Is this a One Way web service call?
Is this a One Way web service call? Are you specifying Envelope,
Body, or XPath for the message body?
-Dan

On Saturday, November 01, 2008 3:05 PM
esko.elorant wrote:

Re: Custom header elements with mustUndestand="true" and WCF adapters

regards
Esko

On Thursday, November 06, 2008 9:14 PM
esko.elorant wrote:

regards
Esko Eloranta


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Customized Find Control for FlowDocuments
http://www.eggheadcafe.com/tutorials/aspnet/233d3397-0388-473c-8473-721a40cf910c/wpf-customized-find-contr.aspx

eelora

unread,
May 17, 2010, 10:17:54 AM5/17/10
to
Hi satya,

In "BizTalk Server 2006 R2 Code Samples" http://msdn.microsoft.com/en-us/biztalk/bb608378.aspx
there is a sample project "Using Custom SOAP Headers with the WCF
Adapters" that shows how to modify soap headers in WCF adapter. I
think you can use the pipeline component of the sample for your
project.

regards

Esko Eloranta


> i  need to work on setting up HTTP Header fields( as i am working with WCF basichttp binding) in cutom pipeline.
>
> i.e I need to stuff information like Senderidentificatonnumber, Targetidentficationnumber, timestamp......etc.  in http header of custom send pipeline.
>
> Please let me know how to access http header values or how to set http header values from custom pipeline
>
> esko.elorant wrote:
>
> Custom header elements with mustUndestand="true" and WCF adapters
> 01-Nov-08
>

> I am testing Biztalk WCF basicHttp adapter and a message withmustUnderstand="true" attribute in SOAP header element is rejected by


> the adapter, SOAP Fault faultcode="s:MustUnderstand". In eventlog
> there is a warning indicating
> System.ServiceModel.MustUnderstandSoapException in message
> processing.
> In WCF there is ServiceBehaviorAttribute ValidateMustunderstand
> property that can be set to false but how this is done in Biztalk WCF
> adapters?
>
> Thanks
> Esko Eloranta
>
> Previous Posts In This Thread:
>
> On Saturday, November 01, 2008 3:05 PM
>
> esko.elorant wrote:
>
> Custom header elements with mustUndestand="true" and WCF adapters

> I am testing Biztalk WCF basicHttp adapter and a message withmustUnderstand="true" attribute in SOAP header element is rejected by


> the adapter, SOAP Fault faultcode="s:MustUnderstand". In eventlog
> there is a warning indicating
> System.ServiceModel.MustUnderstandSoapException in message
> processing.
> In WCF there is ServiceBehaviorAttribute ValidateMustunderstand
> property that can be set to false but how this is done in Biztalk WCF
> adapters?
>
> Thanks
> Esko Eloranta
>
> On Saturday, November 01, 2008 3:05 PM
>
> Dan Rosanova wrote:
>
> Is this a One Way web service call?
> Is this a One Way web service call?  Are you specifying Envelope,
> Body, or XPath for the message body?
> -Dan
>
> On Saturday, November 01, 2008 3:05 PM
>
> esko.elorant wrote:
>
> Re: Custom header elements with mustUndestand="true" and WCF adapters
> On 28 loka, 21:06, Dan Rosanova <dno...@gmail.com> wrote:
>
> I am testing with a request-response web service, specifing the Body
> of the SOAP message. I simply published an orchestration as a web

> service to test SOAP header and body processing and withoutmustUnderstand="true" everything works fine.


>
> regards
> Esko
>
> On Thursday, November 06, 2008 9:14 PM
>
> esko.elorant wrote:
>
> This is a solution to the problem I described last weekThere is an article
> This is a solution to the problem I described last week
>
> There is an article "Using Custom Behaviors with the BizTalk WCF
> Adapters, Part 1"http://msdn.microsoft.com/en-us/library/cc952299.aspx
> describing custom behavior use in Biztalk WCF adapters.
> Part 2 of the article is not yet published, it will show how to write
> and configure custom beheviors, yet part 1 of the article gave enough
> advice to solve the problem.
>
> To get WCF adapter with basicHttp binding to accept messages with

> custom headers andmustUnderstand="true" you must:

> WPF Customized Find Control for FlowDocumentshttp://www.eggheadcafe.com/tutorials/aspnet/233d3397-0388-473c-8473-7...

0 new messages