web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

WCF Service from BizTalk fails with "No matching MessageFilter was found"

(0) ShareShare
ReportReport
Posted on by

Hi All,

There is a dynamics AX service (custom) based on HTTP adapter. While accessing this svc from SOAP UI, I get appropriate response. However, while accessing the same from BizTalk 2010, I get this error (soap exception) "No matching MessageFilter was found for the given Message.". I looked to the messaging filter defined in the application web.config, and found it correct.

<client>
          <endpoint name="VendorProductSvc" address="net.tcp://DEVCLIENT-09A:8201/DynamicsAx/Services/ZonVendorProductDetail" binding="netTcpBinding" bindingConfiguration="DefaultServiceGroupBinding" contract="*" behaviorConfiguration="clientEndpointBehavior">
            <identity><servicePrincipalName /></identity>
        </endpoint>   

    </client>
   <routing>
    <!--
        Define the filters that we want the router to use.  In this example we define a MatchAll message filter, which will match all messages it sees.
      -->
    <filters>
             <filter name="MatchVendorProductSvc" filterType="Custom" customType="Microsoft.Dynamics.Ax.Services.Host.MatchAxServiceFilter, Microsoft.Dynamics.IntegrationFramework.WebService.Process" filterData="http://tempuri.org/VendorProductSvc" />

    </filters>

    <!-- Define the routing table that contains the matchAll filter defined in the filters section. -->
    <filterTables>
     <filterTable name="AosRoutingTable">
      <!-- Map the filter to a client endpoint that was previously defined. Messages that match this filter will be sent to this destination. -->
              <add filterName="MatchVendorProductSvc" endpointName="VendorProductSvc" />

     </filterTable>
    </filterTables>
   </routing>

However, if I try to modify and add additional filter to matchALL request, Service WSDL fails to load. This is not my current problem though.

My input request message goes as:

<ns0:VendorProductSvcGetVendorProductDetailsRequest xmlns:ns0="http://tempuri.org">
  <ns0:ItemId>000029372</ns0:ItemId>
</ns0:VendorProductSvcGetVendorProductDetailsRequest>

And then before calling AX WCF service, I construct and add the header information to the input request.

Message_1 = MessageAifRequest;

Message_1(WCF.OutboundCustomHeaders)=System.String.Format(@"<headers><CallContext xmlns=""http://schemas.microsoft.com/dynamics/2010/01/datacontracts""><Company>{0}</Company></CallContext></headers>", "USA");

I do handle AifFault and SoapException in the Scope element. While running, BizTalk orchestration throws SoapException with the error details I mentioned.

Any help is much appreciated.

*This post is locked for comments

I have the same question (0)
  • Raúl Llorente Peña Profile Picture
    685 on at

    Hello, Atul.

    I'm currently investigating this area (Ax 2012 http web services with SoapUI). But I have got no success in this.

    I get the operations from WSDL, but when I try to call any operation, I always get unauthorized access response, no matter what (apparently) settings do I apply. So I would appreciate very much If you tell how did you manage to succeed in communicating with Ax2012 with SoapUI.

  • Community Member Profile Picture
    on at

    Alright. Even I was getting the same error initially. Then I enabled anonymous access in AX WCF from IIS. Is your AX WCF accessibly anonymously?

    Then you can use SOAP UI tool. Google and download it. You need to make it work using this tool first. Basically you need to create a new project and provide the AX WCF WSDL and then call one method after supplying values for parameters. If the call didn't succeed, then you need to fix the WCF setting from AX.

  • Raúl Llorente Peña Profile Picture
    685 on at

    Thanks Atul, for your quick response!!

    Here is now (very) late night. Tomorrow (some few hours later, oh my!!) I will have a busy day, but I will try to make a effort and try this solution.

    Only a question about IIS web permission. In the IIS website that hosts AIF applications, I have a authentication option. Under this, I have several virtual directories, one for each AIF http WCF service. Where do you set the access? In general Website, or in each one of the AIF subfolders?

    I point that I have already SoapUI running, and a WebService running under IIS 7.5 with a http web service from Ax2012.

  • Community Member Profile Picture
    on at

    What is your prime tasks? Just to make the AX WCF accessible over WCF? Or are you trying to do some integration with BizTalk?

    To answer your question, I need to check the application. However, if you can work start tomorrow, I will check that out for you. IIS Authentication where you can set the authentication to anonymous too. Email me at atul.shukla@ignify.com - then we can start. I am in PST zone.

  • Raúl Llorente Peña Profile Picture
    685 on at

    Hello, I finally succeeded in working with SoapUI 4.5.1 versus Ax 2012 FP.

    Link: https://community.dynamics.com/product/ax/f/33/p/79051/164394.aspx#164394

  • Community Member Profile Picture
    on at

    I'd been seeing the same exception when calling a service through PowerShell.

    Eventually this was resolved  by adding a soapAction to the HTTP request header (NB: not the body's envelope's header).

    The value for the soap action was found by accessing http://server:port/MicrosoftDynamicsAXAif60/XRateDemo/xppservice.svc?wsdl=wsdl1; which gives the soap action URI under: \wsdl:definitions\wsdl:portType\wsdl:operation\wsdl:input\@wsaw:Action.

    Clear-Host
    if (-not ($businessConnectorUser)) {
        $businessConnectorUser = get-credential 'myDomain\myBCUser' #prompts user for credentials for the user with access to the service
    }
    $uri = "http://$MyServerFqdn:$WebServicesPortNo/MicrosoftDynamicsAXAif60/XRateDemo/xppservice.svc" #XRateDemo is the name of my AIF Inbound Port, hosting the ExchangeRateForCurrenciesService service's GetExchangeRateForCurrencies method
    $soapAction = 'http://tempuri.org/ExchangeRateForCurrenciesService/getExchangeRateForCurrencies' #including the soapAction in the header was the key to getting around the message filter exception
    $method = 'POST'
    $contentType = 'text/xml'
    $messageId = [System.Guid]::NewGuid()
    $soap = @"
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope">
        <s:Header>
            <h:CallContext xmlns:h="http://schemas.microsoft.com/dynamics/2010/01/datacontracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <h:Company>SE01</h:Company>
                <h:Language i:nil="true"/>
                <h:LogonAsUser i:nil="true"/>
                <h:MessageId>$messageId</h:MessageId>
                <h:PartitionKey i:nil="true"/>
                <h:PropertyBag i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
            </h:CallContext>
        </s:Header>
       <s:Body>
            <ExchangeRateForCurrenciesServiceGetExchangeRateForCurrenciesRequest xmlns="http://tempuri.org">
                   <_fromCurrency>EUR</_fromCurrency>
                   <_toCurrency>SEK</_toCurrency>
                   <_exchangeDate>2017-05-01T12:00:00+01:00</_exchangeDate>
                   <_cmpId>SE01</_cmpId>
            </ExchangeRateForCurrenciesServiceGetExchangeRateForCurrenciesRequest>
        </s:Body>
    </s:Envelope>
    "@
    $response = Invoke-WebRequest $uri -Method $method -ContentType $contentType -Body $soap -Credential $businessConnectorUser -Headers @{soapAction=$soapAction} 
    $xmlResponse = [xml]($response.Content)
    $xmlResponse.Envelope.Body.ExchangeRateForCurrenciesServiceGetExchangeRateForCurrenciesResponse.response 
    
    
    

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans