wcf - How to Handle Fault Contracts in Biztalk -


error:

<s:fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:actionnotsupported</faultcode><faultstring xml:lang="en-us">the message action '&lt;btsactionmapping xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"&gt;   &lt;operation name="myoperation" action="http://tempuri.org/class/myoperation" /&gt; &lt;/btsactionmapping&gt;' cannot processed @ receiver, due contractfilter mismatch @ endpointdispatcher. may because of either contract mismatch (mismatched actions between sender , receiver) or binding/security mismatch between sender , receiver.  check sender , receiver have same contract , same binding (including security requirements, e.g. message, transport, none).</faultstring></s:fault> 

operation used in wcf-custom send port:

<btsactionmapping xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">   <operation name="myoperation" action="http://tempuri.org/class/myoperation" /> </btsactionmapping> 

i used generated binding file when consumed webservice.

webservice code:

  public interface class     {         [operationcontract]         [faultcontract(typeof(faultclass))]         response myoperation(list<getattributes> getattributes);     } 

when try handle faultcontract mismatch showing up. or missing here.

the action of wcf send adapter based on soap action header (or btsactionmapping) configuration in wcf send adapter and/or properties bts.operation , bts.action.

it looks wcf adapter unable match action configured action in send adapter. result of this, action set string:

<btsactionmapping xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">   <operation name="myoperation" action="http://tempuri.org/class/myoperation" /> </btsactionmapping>

did specify bts.operation = "myoperation" in context of message?

few (other) possibilities:

    1. write action in context of message
    bts.operation = "myoperation"
    , configure actionmapping in soap action header configuration:
    <btsactionmapping xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">   <operation name="myoperation" action="http://tempuri.org/class/myoperation" /> </btsactionmapping>
    2. write action in orchestration , leave soap action header configuration empty:
    outboundmessage(wcf.action)= "http://tempuri.org/class/myoperation";
    3. configure fixed action in soap action header configuration in adapter configuration:
    http://tempuri.org/class/myoperation

a great article on msdn related soap actions configuration send ports can found here: specifying soap actions wcf send adapters


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -