Quantcast
Channel: BizTalk Server Adapters and Adapter Pack Forum
Viewing all articles
Browse latest Browse all 197

Getting error when setting Body Path Expression in WCF Adapter for more than 1 operation

$
0
0

Hi, 

  I have a wcf service with 3 operations. The corresponding send port in my biztalk app has a Soap Action Header that looks like the following: 

   <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Operation Name="GetAllERGroupIds" Action="http://tempuri.org/IMapperService/GetAllERGroupIds" />
  <Operation Name="GetDestinationERGroupIdFromERGroupId" Action="http://tempuri.org/IMapperService/GetDestinationERGroupIdFromERGroupId" />
  <Operation Name="GetDestinationRateTypeFromERRateType" Action="http://tempuri.org/IMapperService/GetDestinationRateTypeFromERRateType" />
</BtsActionMapping>

  Then, I have read that in order to be able to catch the exceptions comming from that service in my orchestration i must set the "Body Path Expression" textbox from the "Message" tab. The problem is that it seems i´m not able to specify there all the possible messages comming from that service. How can i achieve this? The current  Expression taht i´m using there is:

/*[local-name()='MapperException' and namespace-uri()='http://schemas.datacontract.org/2004/07/Entities']/*|/*[local-name()='Fault']/*[local-name()='Detail' or local-name()='detail']/*|/*[local-name()='GetAllERGroupIdsResponse' and namespace-uri()='http://tempuri.org/']/*[local-name()='GetAllERGroupIdsResult' and namespace-uri()='http://tempuri.org/']/*|/*[local-name()='GetDestinationERGroupIdFromERGroupIdResponse' and namespace-uri()='http://tempuri.org/']/* | /*[local-name()='GetDestinationRateTypeFromERRateTypeResponse' and namespace-uri()='http://tempuri.org/']

That path contains the follwoing: 

   - xpath for the excpetions comming from the service

   - xpath for GetAllERGroupIdsResponse messages

   - xpath for GetDestinationERGroupIdFromERGroupIdResponse messages

   - xpath for GetDestinationRateTypeFromERRateTypeResponse messages

For some reason i´m not able to specify all of them there. How can i configure the adapter in order to be able to get all messages responses, including the exception comming from the wcf service?

Basically, i have tried to follow the same idea as explained here: http://msdn.microsoft.com/en-us/library/bb246117(v=bts.20).aspx

but my WCF service exposes more than 1 response operation (I have tried the same thing with wcf services that expose only 1 operation and it  is working).

The wcf service contract looks like the following: 

    [ServiceContract]
    public interface IMapperService
    {
        /// <summary>
        /// Given a Destination system id, it returns the list of 
        /// original group ids. 
        /// </summary>
        /// <param name="systemId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(MapperException))]
        IList<int> GetAllERGroupIds(int systemId);

        /// <summary>
        /// Given the original exchange rate group id, it returns the
        /// groud id mapped in the destination system.
        /// </summary>
        /// <param name="exchangeRateGroupId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(MapperException))]
        int GetDestinationERGroupIdFromERGroupId(int exchangeRateGroupId);

        /// <summary>
        /// Given the original rate type, it returns the corresponding
        /// rate type in the destination system
        /// </summary>
        /// <param name="origRateType"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(MapperException))]
        int GetDestinationRateTypeFromERRateType(int destSystemId, string origRateType);
    }

thanks in advance, 

  Paola

    


Viewing all articles
Browse latest Browse all 197


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>