none
Exception at run-time on using wcf-webhttp adapter for consuming webapi, Biztalk 2013 and NOT r2 RRS feed

  • Question

  • I am trying to send a simple xml message to a webapi  POST (https url) which accepts xml and responds with xml. I used a solicit-response send port for sending my xml. I configured WCF-webhttp adapter for this. I filled up the necessary details. I added the http headers in the messages tab : 

    ACCEPT: application/xml
    VENDOR-KEY: somealphanumeric string.

    In the security tab I chose security mode "transport" and transport client credential type as "none".

    I keep getting this error:

    System.ServiceModel.CommunicationException: An error (The request was aborted: The request was canceled.) occurred while transmitting data over the HTTP channel. ---> System.Net.WebException: The request was aborted: The request was canceled.
       at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
       at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStreamAsyncResult.CompleteGetRequestStream(IAsyncResult result)
       --- 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)

    Please can someone throw some light on this. 

    • Edited by a.k.4.7 Wednesday, August 16, 2017 7:47 AM
    Wednesday, August 16, 2017 7:46 AM

Answers

  • finally i solved this...it was the proxy!!!!

    I just put the system proxy url in the proxy tab of the sendport whcih has WCF-WebHTTPAdapter . 

    • Marked as answer by a.k.4.7 Thursday, October 26, 2017 3:23 PM
    Thursday, October 26, 2017 12:39 PM

All replies

  • I increased the timeout values, now I get a different error:

    System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at:mywebapiurl hat could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond SOMEIPADDRESS.

    the url set is perfect. it works with other tools like postman and soapui. it only fails from my solicit response sendport

    Wednesday, August 16, 2017 9:32 AM
  • Is there any update for this issue? 
    Wednesday, September 6, 2017 7:39 AM
  • I still face the same issue.
    Friday, October 6, 2017 11:28 AM
  • At this point, you'll need to see what happening during the conversation.  You can use Fiddler as a proxy for this.
    Friday, October 6, 2017 12:56 PM
    Moderator
  • https://social.msdn.microsoft.com/Forums/en-US/9961fd8e-7836-47af-a182-a9459cc91e01/error-while-connecting-to-vso-rest-api-from-biztalk-webhttp-adapter?forum=biztalkgeneral

    I tried the solution provided on the linke, i now get a different error of Bad Request, but the same parameters work fine with Postman

    Friday, October 6, 2017 1:53 PM
  • Try to capture the BizTalk HTTP request from Fiddler and compare with the Postman request that works.

    That will give you important hints to resolve this.


    Thanks Arindam

    Tuesday, October 10, 2017 12:33 AM
    Moderator
  • Hello Arindam and Johns, I did try to capture on fidler..I did not get much info than this:

    [Fiddler] The connection to 'cooperstandard-test.coupahost.com' failed. <br />Error: TimedOut (0x274c). <br />System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xxx.x.xx:xxx               

    Wednesday, October 25, 2017 3:43 PM
  • finally i solved this...it was the proxy!!!!

    I just put the system proxy url in the proxy tab of the sendport whcih has WCF-WebHTTPAdapter . 

    • Marked as answer by a.k.4.7 Thursday, October 26, 2017 3:23 PM
    Thursday, October 26, 2017 12:39 PM