0

I'm using BizTalk Server 2016 Dynamic Solicit-Response send port with WCF-WebHttp adapter to handle rest api. Send pipeline and Receive pipiline have been set on the send port. While rest api client response http status 200 i don't have a problem. But rest api response http status 400, adapter throw an exception and i don't receive rest api response body. Also receive pipeline don't execute. I want to receive rest api response body json. What can i do for this issue?

  <SOAP:Body>
    <SOAP:Fault>
      <faultcode>Microsoft BizTalk Server Negative Acknowledgment </faultcode>
      <faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring>
      <faultactor>https://xxxxx/external/bill</faultactor>
      <detail>
        <ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd">
          <NAckID>{D7694C87-CEA3-4C1B-BA18-3ECC2B12857A}</NAckID>
          <ErrorCode>0xc0c0167a</ErrorCode>
          <ErrorCategory>0</ErrorCategory>
          <ErrorDescription>
            System.Net.WebException: The remote server returned an unexpected response: (400) BadRequest.
            {"responseCode":"POST-2013","responseDesc":"Bu işlemi yapmaya yetkili değildir.", "errorDetails":"Credential cannot use related institutionId"}
          </ErrorDescription>
        </ns0:NACK>
      </detail>
    </SOAP:Fault>
  </SOAP:Body>
</SOAP:Envelope>
ecalis
  • 1
  • Does this answer your question? [BizTalk Server 2013 Rest Error Handling](https://stackoverflow.com/questions/36986973/biztalk-server-2013-rest-error-handling) – Dijkgraaf Jul 26 '22 at 20:47
  • I read that post. But in my scenario I am not using an orchestration. I create a dynamic port from within the esb itinerary and call the rest api over wcf-webhttp adapter. My problem is the receive pipeline is not triggered when http status 400 is received and I can't handle this situation. is there any solution handle this issue? – ecalis Jul 27 '22 at 07:25
  • That would be tricky, if it was a static send port I've seen end point behaviours used to catch and sanitize the messages, but I'm not sure you can do that with a dynamic send port. – Dijkgraaf Jul 27 '22 at 08:18
  • The only solution I can think of is to write a custom adapter or write a new wcf service or web api that will consume the third party rest api and integrate biztalk my new service. I think there is no other way to solve this problem? – ecalis Jul 27 '22 at 09:04

0 Answers0