Question
· Apr 19, 2022

ERROR #6242 SOAP UNBOUND ADAPTER : Can't contact the web service ( HTTP error 301 )

Hi everyone.

I'm using a Buisness operation which have a SOAP outbound Adapter : 

We receive a HL7 message as the Request.. we parse it and we send a request to an API ( SOAP )

I imported my classes with the tools : 

 

I write some code for that, for the moment its just hard coded : 

I receive an error with HTTP error code 301 : 

I searched a lot on google but i didnt find any topic about that.

Can someone heal pon this one please ? 

Thank you 

Vessiere Thomas.

Product version: Ensemble 2015.1
Discussion (3)2
Log in or sign up to continue

Hi Thomas,

This really depends on how the downsteam SOAP service has been implemented.

On the surface it sounds as if you are using an out-of-date URL.

If you are getting a 301 then you should look at the response headers to see if there is a "Location" value in the headers, if this is present then try using that URL.

A 301 could also be implemented outside of the HTTP standard, so as an example, a third party developer might use it as a way to indicate a resource has moved, so the ID in your XML could be wrong (please take this just as an example).

My feeling is probably check the URL first to see if you are using the correct up-to-date location value. If its not that then contact the third party API developer for a more detailed reason.

Some additional tips if you need them...

1. Use the SOAP log to check the response headers, documentation here...

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAP_debug#GSOAP_debug_info_soap_log

2. Not related to the 301, but noticed you are escaping XML by hand, there is a function to do that...

https://docs.intersystems.com/ens201815/csp/docbook/Doc.View.cls?KEY=RCOS_fzconvert

Cheers,
Sean.