none
Web service rejects message when mapped in an orchestration RRS feed

  • Question

  • Hello,

    Here is an issue I don't understand. I have a web service that receives invoices from Biztalk 2009. I have generated the schema from the contract using Add generated items. I use the WCF-BasicHttp Adapter to send the invoice to the web service.

    Here is the problem:

    Everything works fine when I map the message directly on the WCF two way send port. The web service receives the message and returns a receipt as it should. But when I map the message in an orchestration and use direct binding the web service rejects the message and returns a #fault message. I have made a work around sending the message to disk instead and then pick it up with another Receive port just to pass it on to the web service, but that is a very ugly solution that I don't want to be permanent and I guess BizTalk could do better.

    I hope someone could help me with this...

    Kind regards

    Anders

    Wednesday, October 19, 2011 12:46 PM

Answers

  • Hi Anders,

    The issue here is that the operationname of your logical sendport in the orchestration doenot match the Operation's element Name attribute in the BtsActionmapping, i.e. 'ImportInvoice' is the value of the attribute, this should reflect the operation name on the logical sendport.

    When BizTalk doesnot find a matching Name attribute it will send the complete BtsActionMapping fragment as SoapAction to the webservice.

    So change either of them, so they're equal and you should be allright.

    Regards,

    René

    • Marked as answer by andasj Friday, October 21, 2011 11:31 AM
    Friday, October 21, 2011 10:33 AM

All replies

  • By meaning Direct Binding, are you trying to send the WCF message to BizTalk Message Box and let the WCF Send Port pick it? Can you also provide the error info you received in the fault message?


    Don't forget to mark the post as answer or vote as helpful if it does, Regards - Sathish Krishnan
    Wednesday, October 19, 2011 4:40 PM
  • Hi,

    Yes, Im sending it via the Message Box and use a subscription on the Send port.

    Here is the error message http://schemas.xmlsoap.org/soap/envelope/#Fault:

    <s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:a="a:ActionNotSupportedhttp://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="sv-SE">The message with Action '&lt;BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="" rel="nofollow">http://www.w3.org/2001/XMLSchema"&gt;
      &lt;Operation Name="ImportInvoice" Action="http://services.mydomain.com/InvoiceImportService/IInvoiceImportService/ImportInvoice" /&gt;
    &lt;/BtsActionMapping&gt;' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault>

    I have tried to regenerate the Schema from the WCF service in case it have changed but that was not the issue.

    Kind Regards

    Anders



    • Edited by andasj Wednesday, October 7, 2020 8:54 AM domain name should not be visible
    Thursday, October 20, 2011 8:17 AM
  • Did you create the WCF Send port by importing the xml binding file (generated by Add Generated Items) to your BizTalk Application? Can you also check if 'BizTalk Actions Mapping' in Actions part of your WCF Send Port is populated?
    Don't forget to mark the post as answer or vote as helpful if it does, Regards - Sathish Krishnan
    Thursday, October 20, 2011 8:47 AM
  • It looks to me the MessageType is not promoted in the Orchestration approach. What's the filter in your send port to subscribe the orchestration output message -- BTS.MessageType?

    Another thing, is it required to use the same Operation name on both Send port and orchestration logical port?


    Linda
    Thursday, October 20, 2011 4:33 PM
  • Hi,

    When you direct bind the message, can you check the filter that you are using the send port is promoted or not?


    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Friday, October 21, 2011 8:48 AM
  • Hi Anders,

    The issue here is that the operationname of your logical sendport in the orchestration doenot match the Operation's element Name attribute in the BtsActionmapping, i.e. 'ImportInvoice' is the value of the attribute, this should reflect the operation name on the logical sendport.

    When BizTalk doesnot find a matching Name attribute it will send the complete BtsActionMapping fragment as SoapAction to the webservice.

    So change either of them, so they're equal and you should be allright.

    Regards,

    René

    • Marked as answer by andasj Friday, October 21, 2011 11:31 AM
    Friday, October 21, 2011 10:33 AM
  • Thanks René, it worked.

    And a thank to all other helpful people. I learned alot from this.

    Kind Regards

    Anders

    Friday, October 21, 2011 11:35 AM