Hi,
I have added a scope to my orchestration that contains a catch for exceptions of type System.Web.Services.Protocols.SoapException. The orchestration contains a port to a WCF Service that has the following contract:
[ServiceContract]
public interface IAdvertisementImporterService { [OperationContract] [FaultContract(typeof(OrderImporterException))] void ImportAdvertisementOrders(PersubAdvertisementImportedOrder importedOrder); }
I have set the WCF Adapter following the instruccions here: http://msdn.microsoft.com/en-us/library/bb226478.aspx
Now if I set the Body path expression of my wcf adapter in the following way:
/*[local-name()='OrderImporterException' and namespace-uri()='http://schemas.datacontract.org/2004/07/Persub.Domain.Entities.Exceptions.Order']/*|/*[local-name()='Fault']/*[local-name()='Detail' or local-name()='detail']/*|/*[local-name()='ImportAdvertisementOrdersResponse' and namespace-uri()='http://tempuri.org/']
When I catch the SOAP exception from the orchestration scope I get the following message:
SOAP Exception: An error occurred while processing the message, refer to the details section for more information
Message ID: {8DC2CD0F-3D6C-4A4C-B4FF-73EA45F72589}
Instance ID: {CB0C413E-5FCC-4C3D-A6A2-D07A30419821}
Error Description: There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML
disassembler" Send Port: "WcfSendPort_AdvertisementImporterService_BasicHttpBinding_IAdvertisementImporterService" URI: "http://persubii-app:8080/ExposedServices/AdvertisementImporterService/AdvertisementImporterService.svc" Reason:
Finding the document specification by message type "http://schemas.datacontract.org/2004/07/System.ServiceModel#ExceptionDetail" failed. Verify the schema deployed properly.
And if i set the Body path expression of my wcf adapter in the following way:
/*[local-name()='OrderImporterException' and namespace-uri()='http://schemas.datacontract.org/2004/07/Persub.Domain.Entities.Exceptions.Order']/*|/*[local-name()='ImportAdvertisementOrdersResponse' and namespace-uri()='http://tempuri.org/']
When I catch the SOAP exception from my orchestration I get the following message:
SOAP Exception: An error occurred while processing the message, refer to the details section for more information
Message ID: {176A36BF-7A1F-4F07-85F3-EC8BA1510A2D}
Instance ID: {99ED8805-D9FF-4F26-909F-7CC58642C8CC}
Error Description: System.InvalidOperationException: Unable to find match for inbound body path expression "/*[local-name()='OrderImporterException' and namespace-uri()='http://schemas.datacontract.org/2004/07/Persub.Domain.Entities.Exceptions.Order']/*|/*[local-name()='ImportAdvertisementOrdersResponse'
and namespace-uri()='http://tempuri.org/']" in message.
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessageStream(Message wcfMessage, IAdapterConfigInboundMessageMarshalling config)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateBizTalkMessage(IBaseMessageFactory messageFactory, IAdapterConfigInboundMessageMarshalling marshallingConfig, Message wcfMessage)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
So it seems neither way is the correct one to specify in the body path expression of my wcf service. How should i set it in order to let biztalk know the SOAP message format?
Thanks in advance,
Paola