Error in WCF-WSHttp Adapter

Hi everybody.
After install Biztalk 2013 and ESB Toolkit, I try to run ESB.ExceptionHandlingServices.WCF service from IIS, but it throw an exception:
The Messaging Engine failed to register the adapter for "WCF-WSHttp" for the receive location "/Test/TransformationService.svc". Please verify that the receive location exists, and that the isolated adapter runs under an account
that has access to the BizTalk databases.
I've search in google, I sure that AppPool that my BizTalk web service running under was the same account as the Isolated Host Instance. But not resolve.
Also the "ESB.TransformServices.WCF" service work fine (same account with TransformationService.svc AppPool)
Please help me! I've tried to solve 3 days but cannot.
Thanks

Please try reconfiguring the ESB Tools, there is some issue in your configurations.
If this answers your question please mark as answer. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • WCF wsHTTP adapter: How to control WS-A elements, attributes.

    Hello,
    we have a third party soap web service that we invoke using Biztalk BasicHTTP adapter.
    This wasn't working. 
    That's when we were told the web service is a Soap1.2 endpoint.
    So we have changed the adapter to wcf-wsHTTP adapter. This still doesn't work!!
    we get an error like:  Must Understand check failed for header
    http://www.w3.org/2005/08/addressing : To
    I traced the outgoing call from the adapter via Fiddler.
    I see this:
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
     <s:Header>
      <a:MessageID>urn:uuid:637ec5d5-f7c3-</a:MessageID>
      <ActivityId CorrelationId="b56a4554-c373-4479" xmlns="00000000-0000-0000-0000-000000000000</ActivityId">http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
      <a:ReplyTo>
               <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">https://xxx.xxx/xx</a:To>
     if i change the mustUnderstand attribute to 0 in the To element, the web service returns
    the right response. This was tested using Fiddler.
    I understand the adapter is adding the headers like To,ReplyTo etc. but not sure
    why. How do i disable them getting generated? or How can i set the mustUnderstand to 0?
    Any suggestions please?
    thanks
    MS

    Hi,
    Refer the SOAP Header Action mustUnderstand Exception.
    Add the addressing annotation to the Web Service class @Addressing(enabled=true, required=true)
    Change namespaces in the <Envelope> tag from:
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
    to
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing">
    Both SOAP 1.1 and SOAP 1.2 specifications enable you to use mustUnderstand attributes with SOAP headers. Not handling these headers properly is a common concern during Web service
    interactions.
    Refer: Understand the Famous "Did not
    understand MustUnderstand header(s)"Error
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Error in WCF-Custom adapter (sqlbinding)

    There is a stored procedure tempdbo.dbo.InsertArTrxTyp.  I used the Add Generated Items wizard to create the schema and binding file for the stored procedure.  Import the binding file and get a send port, type WCF-Custom, with sqlbinding.  When
    the port action header is 
    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="InsertArTrxTyp" Action="Procedure/dbo/InsertArTrxTyp" />
    </BtsActionMapping>
    The event log shows error
    <Operation Name="InsertArTrxTyp" Action="Procedure/dbo/InsertArTrxTyp" /></BtsActionMapping>" was not understood.
    If I reduce the action header to 
    Procedure/dbo/InsertArTrxTyp
    the event log shows
    Object [dbo].[InsertArTrxTyp] of type StoredProcedure does not exist
    In the second case, SQL Profiler shows the code sent to the sql server querying for the existence of
    @ORIGINALOBJECTNAME=N'InsertArTrxTyp',@ORIGINALSCHEMANAME=N'dbo'
    If I run that code, I get results that indicate the existence of that object.
    Why is the fist action mapping wrong?  Why does the second action mapping result in no object found?  I've read this
    post but don't see how it applies to this situation as I'm not using an orchestration.

    Hi,
    Try and check following points:
    1. Update the SQL URI with the complete SQL instance name, if you are using the a named instance.
    2. Verify if the user, under which BizTalk host instance in running, have suffecient rights on the target DB to execute the SP.
    Hope this will help.
    HTH,
    Sumit
    Sumit Verma - MCTS BizTalk 2006/2010 - Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

  • Moving from SOAP Adapter to WCF-basichttp adapter

    we are migrating the BizTalk server 2009 application into  BTS 2013.In The BTS 2009 application ,some of ports are configured with SOAP and SQL Adapters.
    So I recommended to customer that move from SOAP Adapter to WCF-BasicHttp and SQL to WCF-SQL.
    But customer asked me is that the best practice MS recommended for moving from SOAP to WCF-BasicHttp?
    Customer is asking let me explain few points why i have to move from SOAP to WCF-Http?
    Could you please help me how to convince him?
    Regards BizTalkWorship

    The SOAP adapter is deprecated in BizTalk Server 2010. You should use the WCF-BasicHttp to communicate with Web services and clients that conform to the WS-I Basic Profile 1.1. To communicate with Web services and clients that conform to
    WS-*, use the WCF-WSHttp adapter.
    Key benefits of WCF Framework
    Because WCF can communicate using Web services, interoperability with other platforms that also support SOAP, such as the leading J2EE-based application servers, is straightforward.
    . You can also configure and extend WCF to communicate with Web services using messages not based on SOAP, for example, simple XML formats like RSS.
    . Performance is of paramount concern for most businesses. WCF is developed with the goal of being one of the fastest distributed application platform developed by Microsoft.
    . To allow optimal performance when both parties in a communication are built on WCF, the wire encoding used in this case is an optimized binary version of an XML Information Set. Messages still conform to the data structure of a SOAP message, but their
    encoding uses a binary representation of that data structure rather than the standard angle-brackets-and-text format of the XML 1.0 text encoding. Using this option makes sense for communicating with the call center client application, because it is also built
    on WCF, and performance is an important concern.
    . Managing object lifetimes, defining distributed transactions, and other aspects of Enterprise Services are now provided by WCF. They are available to any WCF-based application, which means that the rental car reservation application can use them with any
    of the other applications it communicates with.
    . Because it supports a large set of the WS-* specifications, WCF helps provide reliability, security, and transactions when communicating with any platform that also supports these specifications.
    . The WCF option for queued messaging, built on Message Queuing, allows applications to use persistent queuing without using another set of application programming interfaces.
    Thanks
    Abhishek

  • Error while posting to Webservice using WCF-BasicHttp adapter

    Hi,
    I am getting the below exception when i am posting a request to a .asmx webservice using the Wcf-BasicHttp adapter.
    I am able to call the same service with the SOAP adapter successfully. Could you please let me know any resolutions for the same.
    The adapter failed to transmit message going to send port "MySendPort" with URL "http://myservice.com/Web.Services/service1.asmx". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.ServiceModel.ProtocolException:
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes
    of the response were: '
    <html>
        <head><link rel="alternate" type="text/xml" href="/Web.Services/Service1.asmx?disco" />
        <style type="text/css">
            BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; }
            #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }
            A:link { color: #336699; font-weight: bold; text-decoration: underline; }
            A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; }
            A:active { color: #336699; font-weight: bold; text-decoration: underline; }
            A:hover { color: cc3300; font-weight: bold; text-decoration: underline; }
            P { color: #000000; margin-top: 0px; margin-bottom: 12px; font-family: Verdana; }
            pre { background-color: #e5e5cc; padding: 5px; font-family: Courier New; font-size: x-small; margin-top: -5px; border: 1px #f0f0e0 solid; }
            td { color: #000000; font-family: Verdana; font-size: .7em; }
            h2 { font-size: 1.5em; font-weight: bold; margin-top: 25px; margin-bottom: 10px; border-to'.
    Server stack trace:
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
    Regards,
    Ujjwal
    -Ujjwal

    Where does the HTML indicate that the Service is not running??
    The error message " The content type text/html; charset=utf-8 of the response message does not match
    the content type of the binding (text/xml; charset=utf-8)" points to a bug in the WCF-BasicHttp described here:
    http://social.msdn.microsoft.com/Forums/en-US/11796bf5-ba6a-4878-977e-5c854642f67c/the-content-type-textxml-charsetiso88591-of-the-response-message-does-not-match-the-content?forum=biztalkgeneral
    Although not 100% the same, the conclusion here was to still use the old Adapter :-(
    Morten la Cour

  • BizTalk 2009 WCF-SAP Adapter Could not load file or assembly 'Microsoft.Adapters.SAP.SAPGInvoker...' one of its dependencies error

    Hello,
    I have a BizTalk Server 2009 running on Windows Server 2003 x64. I am installing WCF-SAP adapter and have done the following for the same. However, I am getting an error as mentioned below when I click on the Configure button of WCF-SAP adapter in send
    port. I would appreciate if anyone could let me know how to fix this error and make the WCF-SAP adapter working.
    TITLE: BizTalk Server 2009 Administration Console
    Exception has been thrown by the target of an invocation. (mscorlib)
    ADDITIONAL INFORMATION:
    Exception has been thrown by the target of an invocation. (mscorlib)
    Could not load file or assembly 'Microsoft.Adapters.SAP.SAPGInvoker, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling
    the application may fix this problem. (Exception from HRESULT: 0x800736B1) (Microsoft.Adapters.SAP)
    This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
    I have copied the following 32 bit & 64 bit unicode DLLs in SysWOW64 and System32 folders respectively.
    icudt30.dll
    icuin30.dll
    icuuc30.dll
    librfc32u.dll
    libsapu16vc71.dll
    libsapucum.dll
    Following r3dllinst DLLs are there in System32 folder.
    mfc42.dll
    mfc42u.dll
    mfc71.dll
    mfc71u.dll
    msvcp60.dll
    msvcp71.dll
    msvcp80.dll
    msvcr71.dll
    msvcr80.dll
    Following r3dllinst DLLs are there in SysWOW64 folder.
    mfc40.dll
    mfc40u.dll
    mfc42.dll
    mfc42u.dll
    mfc71.dll
    mfc71u.dll
    mfc80.dll
    mfc80u.dll
    msvcp50.dll
    msvcp60.dll
    msvcp71.dll
    msvcp80.dll
    msvcr71.dll
    msvcr80.dll
    I have the following softwares installed on the server.
    Microsoft Visual C++ 2008 Redistributable x64
    Microsoft Visual C++ 2008 Redistributable x86
    WCF LOB Adapter SDK (64-bit)
    BizTalk Adapter Pack 2.0 (64-bit)
    BizTalk Adapter Pack 2.0 (32-bit)
    The following bindings are also present in the machine.config under Framework\v2.0.50727\CONFIG and Framework64\v2.0.50727\CONFIG
    <system.serviceModel>
    <extensions>
    <bindingElementExtensions>
    <add name="sapAdapter" type="Microsoft.Adapters.SAP.SAPAdapterExtensionElement, Microsoft.Adapters.SAP, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </bindingElementExtensions>
    </extensions>
    <client>
    <endpoint binding="sapBinding" contract="IMetadataExchange" name="sap" />
    </client>
    </system.serviceModel>
    Thanks,
    Tarun

    Have you tried this?
    http://geekswithblogs.net/MoonWalker/archive/2013/07/17/could-not-load-file-or-assembly-microsoft.adapters.sap.sapginvoker.dll.aspx
    Morten la Cour

  • Error handling HTTP 400 in WCF-WebHttp adapter BizTalk 2013

    Hi!
    Does anyone knows how to catch HTTP errors when using WCF-WebHttp REST adapter in BizTalk 2013? I've looked into the article BizTalk
    Server: REST Services Error Handling, but that is for BizTalk 2010 using the WCF-Custom adapter.
    What I want is to catch the exception in an orchestration, and do some actions dependent on which HTTP error it is, i.e. HTTP 400.
    Idar H.

    Hi Idar,
    Welcome to BizTalk forum.
    From your description above, I don't have exact same scenario like yours, this scenario exposes a BizTalk Orchestration as a RESTful webservice using WCF-WebHttp, perhaps it will be good reference for you. See:
    http://blog.tallan.com/2014/09/29/wcf-webhttp-and-custom-json-error-messages/
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Retrieving(Inbound) IDOC from SAP Error WCF-SAP Adapter

    I am attempting to retrieve data from SAP using WCF-SAP Adapter. I used the wizard to retrieve the IDOCTYP(PEXR2002) and the appropriate docrel=740. Whenever I send the IDOC to BizTalk I receive the error below.  Anyone have insight to what could be
    the problem. BizTalk is not resolving the IDOC types properly.
    Also: I am using the schema in a flat file disassembler in the receive pipeline.
    Reason: Unexpected data found while looking for:
    'E2EDKA1003'
    'E2IDBL2000'
    'E2IDB02002'
    'E2EDL02'
    'E2EDL03'
    'E2IDLU5001'
    'E2IDPU1'
    'E2IDBW1'
    The current definition being parsed is E2IDKU5001GRP. The stream offset where the error occured is 1483. The line number where the error occured is 11. The column where the error occured is 0. 

    Hi Jordan ,
    This really happens when you receive untyped message from your SAP System .  Its been well described in below link 
    Receiving Idocs - getting the raw idoc data
    Better option here is to create a pipeline component which will be responsible for your message parsing or try something like below
    During the configuration of your one-way Receive Location using WCF-Custom, navigate to the Messages tab. Under the section "Inbound BizTalk Messge Body", select the "Path" radio button, and:
    (a) Enter the body path expression as:
    /*[local-name()='ReceiveIdoc']/*[local-name()='idocData']
    (b) Choose "String" for the Node Encoding.
    Thanks
    Abhishek

  • WCF-SAP Adapter throwing errors after SAP Upgrade from ECC 5 to ECC6 Release 640 to 700

    Hello Everyone,
    We were able to communicate(Send and Receive Idoc's) to SAP via WCF-SAP Adapter in BizTalk 2010.
    SAP Servers were upgraded to ECC5 to ECC 6 and we started facing below issue communicating on send and receive both.
    I am aware that there is a hotfix available but that is more on the Receive Side from SAP. Nevertheless I installed the hotfix but issue still persists. Any suggestions will be highly appreciated.
    Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The segment name is not valid for the IDOCTYP, Release, or CIMTYP. Segment name: E2EDP01006GRP   IDOCTYP: ORDERS05   
    Release: 700    CIMTYP: . Ensure that your message xml validates against the operation schema.
    Server stack trace:
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.
    Thanks,
    Vikingss

    I am aware that there is a hotfix available but that is more on the Receive Side from SAP. Nevertheless I installed the hotfix but issue still persists. Any suggestions will be highly appreciated.
    For this issue, you can contact Microsoft support directly(http://support.microsoft.com).

  • BizTalk 2010 Error consuming WCF service metadata. Object reference not set to an instance of an object.

    "Error consuming WCF service metadata.
    Object reference not set to an instance of an object."
    I have no clue what happen to my BizTalk.  I checked all the below forum but m clueless why BTS not consuming WCF through Generated Items. I tried both metadata exhange endpoint and metadata file through
    svcutil. but all my wcf services are working fine with .net C# client.
    http://blogs.msdn.com/b/appfabriccat/archive/2010/11/23/how-using-duplex-mep-to-communicate-with-biztalk-from-a-net-application-or-a-wf-workflow-running-inside-appfabric-part-1.aspx
    http://msdn.microsoft.com/en-us/library/bb226552.aspx
    http://msdn.microsoft.com/en-us/library/bb798122.aspx
    http://masteringbiztalkserver.wordpress.com/tag/wcf-service-consuming-wizard/
    I reinstall the WCF lob Adapter SDK to my BizTalk VM but still no clue. no erros in event viewer nothing.
    http://www.abdulazizfarooqi.wordpress.com Abdul Aziz Farooqi [BizTalk & SharePoint Consultant] MCPD Web & MCPD SharePoint 2010

    Thanks from me too Neal - this worked from me. I wan't able to consume directly from exchange because the certificate is broken. However, I was able to convince Google Chrome to let me view the /Services.wsdl and from there I could save the .wsdl and two
    .xsd files. In my case the problem lay at the top of the .wsdl file. I changed the following:
    <wsdl:types>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                <xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="messages.xsd"/>
            </xs:schema>
    by giving the same targetNamespace as assigned in the <wsdl:definitions element, so I ended up with
    <wsdl:types>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages">
                <xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="messages.xsd"/>
            </xs:schema>

  • How do you configure a WCF-SQL adapter to write data from a SQL2012 "always on" database?

    Hi All,
    I have a BizTalk environment. I have to write the data from BizTalk to the database which is configured using ALWAYS ON availability group.
    I use WCF-SQL adapter to write the data. My question is this setup a supported?

    The answer is NO.
    Refer: Can
    I use a BizTalk WCF-SQL send adapter with a SQL 2012 Always on Database?
    A snippet quoted below.
    In summary (in order of preference):
    Disable AlwaysOn Availability Groups / Mirroring on SQL server if you need to connect to this SQL server which has this enabled
    Disable transactions and implement logic to be able to handle duplicates .
    Disable transactions and handle the duplicates or lost messages with custom logic (e.g. Send twice and compare and implement error handling). You need to write your own DTC handling this which
    is probably very complicated.
    Disable transactions and live with risk of duplicates or lost messages without handling duplicates.
    Refer: SQL Server AlwaysOn feature does not support MSDTC transactions.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • WCF-WebHttp Adapter issue?

    Hello guys
    I stumble on this problem while I was trying to develop a custom pipeline component that on runtime generates a GUID and affects it to the context and body of the message. That GUID is placed on Http Headers as a boundary (content type)
    and on the message body. What it happens is that, on the first message that I send, everything goes well (header GUID matches body GUID, the service response it’s not important here), after the first message all the following messages on the header will have
    the GUID from the first message that I send thought the port, although everything goes fine on the body. Like this:
    Request #1:
    Header: Content-Type: multipart/mixed; boundary=batch_bead1969-540e-4020-8b47-cf0fbcddef1c
    Body:
    bead1969-540e-4020-8b47-cf0fbcddef1ce
    Request #2:
    Header: Content-Type: multipart/mixed; boundary=batch_bead1969-540e-4020-8b47-cf0fbcddef1c
    Body:
    226dd0f5-501f-4da8-a871-b79e6ac512d0
    Request #3:
    Header: Content-Type: multipart/mixed; boundary=batch_bead1969-540e-4020-8b47-cf0fbcddef1c
    Body:
    98b7e6f9-c229-4a0b-a8f1-cd0c1f3e27e8
    As you can see in red, between multiple requests the GUID is always the same, and it shouldn’t be since on the body is changing correctly. After some analysis we realized that the problem was with the property “HttpHeaders” (WCF property
    schema), where we are writing the “content-type” in our custom pipeline component. It seems that for some reason the value of this property ain’t properly read after a first message went thought successfully.
    Why do I say successfully? Well…
    If there’s an error on send the message and the message gets dehydrated or suspended, the HttpHeaders seems to be “reseted” and read again, and everything goes as it should.
    If the message went to successfully regardless of the response, the issue that I describe will happen.
    Restarting the host instance seems to have no effect.
    Sometime after the first message went thought successfully, HttpHeaders seem to be “reseted” and read again. Although I don’t know how much time, at least something above 15min.
    Stop\Start the send seems to force an “reset” on the property.
    Just to make clear some eventual questions, HttpHeaders is correctly written into context before entering the adapter, after the message went thought the adapter, we can see on fiddler that the message isn’t as it should.
    I did some code to replicate this issue, and my Execute method on pipeline goes like this:
    public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(IPipelineContext pContext, Microsoft.BizTalk.Message.Interop.IBaseMessage pInMsg)
    Stream inMsgBodyStream = pInMsg.BodyPart.GetOriginalDataStream();
    pInMsg.Context.Write("HttpHeaders", "http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties",
    "content-type: multipart/mixed; boundary=batch_" + Guid.NewGuid().ToString());
    return pInMsg;
    I also try this behavior with the classic HTTP adapter, although another issues were raised, the fact is that Http Headers are correctly read between requests, so as far as we can tell this just happens with this adapter.
    Does anybody had similar issue? So far I haven’t found a solution.
    PS: I’m using Biztalk 2013 RTM
    Thanks

    Hey, someone else reported a similar issue with the WCF-WebHttp adapter for BizTalk 2013 - see this thread:
    http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/e477ad7a-505c-4f86-9556-8075d747e447. I will report your finding to Microsoft support.
    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline

  • Biztalk 2013 Wcf-webhttp adapter Issue

    Hi
    I am trying to get WCF-WebHttp adapter working but it is ending  error.
    I created a service account with Bing api (can browse this url directly by providing login credentials)
    URL:
    https://api.datamarket.azure.com/Bing/SearchWeb/Web?Query='WA'
    These are my wcf-webhttp adapter settings
    URI
    https://api.datamarket.azure.com/Bing/SearchWeb
    http Method and URL Mapping
    <BtsHttpUrlMapping>
     <Operation Method="GET" Url="/Web?Query='WA'"/>
     </BtsHttpUrlMapping>
    it seems template matching is failing in wcf adapter as a result Outbound URL property is not getting promoted resulting below error.
    Can you please advice what is the missing piece in this configuration?
    Error Message:
    The Messaging engine failed to process a message submitted by adapter:WCF-WebHttp Source
    URL:https://api.datamarket.azure.com/Bing/SearchWeb. Details:The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send
    port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

    Hi
    Moreover I observed one more thing with another API if URI is brows able directly without Key it works
    Actual URL: https://ServerName/StoreMasterServices/Markets
    URI: https://ServerName/StoreMasterServices/
    Headers Info
    <BtsHttpUrlMapping>
    <Operation Method="GET" Url="/Markets" />
    </BtsHttpUrlMapping>
    This URI: https://ServerName/StoreMasterServices/    
    is brows able even without Key  (/Markets) and it is working fine.
    So Question is, is it mandatory to have URI brows able (with credentials if it needs)?

  • WCF-WebHttp Adapter Substituting Nonstandard Characters In Address URI With Web Encoded Equivalent

    I’m using the WCF-WebHttp adapter to send an HTTP Get request to a REST API. The request has to be formatted as shown…
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI/Record?q=title:test*&format=json
    Essentially this is searching for any records with “test” in their title and returning a JSON formatted response containing information on any records that match the search criteria. I don’t have any flexibility in how this request is formatted. It has to
    confirm to the syntax above.
    If I hardcode the above uri in the Address URI field in the WCF-WebHttp adapter configuration and put a request through my BizTalk application, BizTalk correctly sends that request and I get my expected response.
    So far so good.
    The problem is the query portion of the request string (“?q=title:test*” in the example above) needs to be created dynamically based on what is specified in an incoming request to my BizTalk application. It may contain many search criteria and is not limited
    to just record titles as in my example.
    This, I thought would be straight forward: I construct the query portion of the request string in a custom send pipeline and insert that value into a promoted property which is then used by the URL mapping mechanic of the WCF-WebHttp adapter.
    So now the uri in the Address URI field in the WCF-WebHttp adapter configuration simply contains…
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI
    And the remaining part of the request is defined using a URL mapping…
    <BtsHttpUrlMapping>
    <Operation Name="DocumentSearchRequest" Method="GET" Url="/Record{searchquery}" />
    </BtsHttpUrlMapping>
    Where the {searchquery} variable is mapped to a promoted property.
    I can see that my custom send pipeline is correctly promoting the property and that it contains the correct value (e.g “?q=title:test*&format=json”). The problem is that the WCF-WebHttp adapter is now substituting the “?” with its web encoded equivalent
    (%3F). When I view the outgoing HTTP request in Fiddler it looks like this…
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI/Record%3Fq=title:test*&format=json
    I have tried numerous ways of constructing the HTTP request, including hardcoding the offending “?q=” section into the URL mapping rather than having it in the promoted property…
    <Operation Name="DocumentSearchRequest" Method="GET" Url="/Record?q={searchquery}" />
    But this results in other characters (“:”, “&”, “=”) being web encoded in the outgoing HTTP request. Fiddler shows this…
    /HPRMServiceAPI/Record/?q=title%3atest*%26format%3djson
    Similarly, hardcoding the “/Record?q=” section in the Address URI field in the WCF-WebHttp adapter configuration like this…
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI/Record?q=
    …and having the URL mapping contain just…
    <Operation Name="DocumentSearchRequest" Method="GET" Url="{searchquery}" />
    …results in the following outgoing HTTP request (Fiddler shows “?q=” portion now being placed at the end of the request string)…
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI/Record/title:test*&format=json?q=
    So in summary it seems the WCF-WebHttp adapter is struggling to correctly assemble the HTTP request string when a portion of it is supplied in a promoted property and used by the URL mapping mechanic. Specifically when that portion contains nonstandard characters
    (“?”, “:”, “&”, “=” etc), the WCF-WebHttp adapter substitutes them for their web encoded equivalent.
    Any suggestions?

    Thanks Ravindar,
    Unfortunately, I don’t have control of the ‘receive side’. I can’t write a custom pipeline component at the receive side as it is not a BizTalk application, it’s a 3rd party web site exposing REST-like behaviour.
    I have however made progress. It occurred to me the WCF-WebHttp adapter isn't the problem. It's doing exactly what it should by URL encoding any potentially 'unsafe' characters that have been 'injected' into the URL via a promoted property. Potentially the
    promoted property could contain malicious content, especially if that content has been sourced directly from text in an incoming message to BizTalk.
    So the WCF-WebHttp adapter is URL encoding ‘?’ to ‘%3F’ which is probably good behaviour from a security point of view.
    http://xxx.xxx.xxx.xxx/HPRMServiceAPI/Record%3Fq=title:test*&format=json is a perfectly valid address.
    So I looked again at the actual error I was receiving from the 3rd party site. It was…
    HTTP/1.1 400 Bad Request
    System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (?).
    So, after some research, I edited the web.config of the 3rd party site so it no longer excludes any specific characters from the request.
      <system.web>
        <httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
      </system.web>
    The 400 Bad Request has gone away and the 3rd party site is processing my request now. Unfortunately it still seems to have an issue with ‘%3F’ being used in place of ‘?’, but I think that will have to be resolved in IIS/web config on the receive side (maybe
    by using request filtering
    http://www.iis.net/configreference/system.webserver/security/requestfiltering) or by discussing with the sites developers.
    In summary, I now believe the WCF-WebHttp adapter is behaving correctly by substituting URL encoded values in place of potentially unsafe characters.
    Thanks for your help.

  • BT2010 Installed Cum Update Packs for Adapters and getting run-time errors with WCF-SQL

    The process has been working fine for months.  Then we installed Cum Update packs to BT2010 (I'll get the exact C.U.'s from our admin guy) and last night got probably 20 errors similar to below.
       - Installed CU6 for BT2010
       - Installed CU3 for LOB (Adapters)
    The SQL stored proc returns a mix of strings, integers, Guids, and dates; the BizTalk schema looks like matches perfectly. The stored proc runs fine in SSMS.
    Got two errors for each, 1 in XLANG/s for the orchestration, and 1 for the Send port that calls the WCF-SQL adapter from the orchestration, and also 1 warning.
    NOTE: This orchestration runs every 15 minutes 24x7.  It calls the Stored Proc to find out which extracts it needs to create.  Most all the extracts run at night.  So if I run the stored proc during the day, it normally returns an empty result
    set.  Yet, the error below is happening every 15 minutes, even when the result set is empty.  How can it generate a data conversion error when there is no data to be converted? 
    ORCHESTRATION/XLANG ERROR:
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Common.Extract.Orchestrations.EFSRExtractHandler(2b35190e-5f11-e360-9ae8-daaf0372cbc3)'.
    The service instance will remain suspended until administratively resumed or terminated.
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: dc354922-73ef-46fc-ac3d-dbf793e5aaf8
    Shape name:
    ShapeId:
    Exception thrown from: segment -1, progress -1
    Inner exception: An error occurred while processing the message, refer to the details section for more information
    Message ID: {066027B8-4750-4D63-A746-1390E9959E49}
    Instance ID: {5A978538-5DD7-40D1-8826-D0486D129F84}
    Error Description: System.InvalidCastException: Failed to convert parameter value from a String to a Guid. ---> System.InvalidCastException: Invalid cast from 'System.String' to 'System.Guid'.
       at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
       at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
       at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
    Exception type: XlangSoapException
    Source: Microsoft.XLANGs.BizTalk.Engine
    Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
    The following is a stack trace that identifies the location where the exception occured
       at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
       at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
       at Microsoft.XLANGs.Core.PortBase.GetMessageIdForSubscription(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
       at Common.Extract.Orchestrations.EFSRExtractHandler.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    SEND PORT ERROR: 
    A message sent to adapter "WCF-Custom" on send port "Send_SQL_Orch_Call_GetAirportsForExtract" with URI "mssql://QADBAlias.datacenter.local//QTAviation?" is suspended.
     Error details: System.InvalidCastException: Failed to convert parameter value from a String to a Guid. ---> System.InvalidCastException: Invalid cast from 'System.String' to 'System.Guid'.
       at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
       at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
       at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)
     MessageId:  {C1FB3913-42EB-4957-9289-16D03B02674E}
     InstanceID: {46C9D190-902F-48CE-86CF-D8C3C5B8944D}

    Hi,
    About the error System.InvalidCastException: Failed to convert parameter value from a String to a Guid
    , maybe the field on the database is varchar(string type).
    And you can refer to the similar discussion:
    http://stackoverflow.com/questions/12816641/failed-to-convert-parameter-value-from-string-to-guid
    Hope it can help you.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for