So guys, I have a Spring Boot client application which is hitting some SOAP Web Services application. They have a whole cr*p load of exposed services. Two of them are
A colleague, which was working on this project before me, managed to generate source files in order to send request and receive responses from that service. They were having problem of hitting controllers of that application. Particular piece of code which was causing the issue was:
Beside this, we have also got:
P.S. This is practically all the code (not counting generated request/response source files) for communicating with that web service.
For 6 months they were getting 301 Moved Permanently. Then I took over and after couple of days I noticed that
is overloaded. Then after researching on SOAP Action Header
, I figured this header is mandatory so that request can conform to SOAP specification. Then, I did following:
In any case, this worked! I got the answer back!
I'm assuming that
is just a controller of that soap service application?
This string (http://tempuri.org/IAFSService/HelloWorld
) could have been found in .wsdl file. And I'm saying this "could" because when I first got to the project I was able to open WSDL schema from browser by opening opening this link https://clienttesthorizon.horizonafs.com/AFSServices/AFSService.svc/basicHttpBinding
.Strangely, WSDL schemas usually ends in .?wsdl (or something like). But now, this link is not working. Perhaps they changed WSDL? To make things more interesting, this link I'm also using in SoapUI, and SoapUI actually created all the services which were and are exposed in WSDL. If I hit any service from SoapUI now, I get back desired response.
Regarding other services, such us InsertInvoiceAndCustomer, I'm still able to hit it, that is I get back 200, but I am not able to actually insert new invoice and customer in their system. When I was making object InsertInvoiceAndCustomer as a request to pass to the marshalSendAndReceive(), I really make sure to set fields which are marked with required.
These three objects contains bunch of fields and I make sure to set all of those. This
contains only three fields. Like credentials, username, password etc. Our client gave us these so we can "talk" to that web service.
Here is response (from Swagger) from that service I got:
I'm confused why that service is not "letting me in"? Messages from this response like: "value": "Authentication failed" or "value": "Missing user object" are not clear to me because I can engage this service via SoapUI without any problems.
Only there I write strings within xml tags and here I build objects.
Anyone any idea?
My next step is to try to see the actual string body of the request to see whether is the same as in SoapUI. For that I'm planning to use Interceptor Filter of some sort and loggers. Guys, any suggestions? I apologize for a bit longer post. Just I'm hitting wall here...