E
E
Ekaterina2021-05-28 22:20:41
Java
Ekaterina, 2021-05-28 22:20:41

The port is being passed incorrectly. How to assign port type when sending request via springWebServicesTemplate.doSentAndRecieve?

Hello. Need help.
Faced the following problem: I have a wsdl file for communicating between my service and CRM via the SOAP protocol. The body of the request is filled in by configuring the java files from wsdl. But the header must be written manually. I am using the following technology to send my request: https://pastebin.com/ET0VdP9v
final Map?String, String? gateValues ​​= new..
pastebin.com
The last catch has already been added to find the error. Crashes with the error org.springframework.ws.soap.client.SoapFaultClientException from the doSendAndReceive method of the WebServiceTemplate class.
When calling soapMessage.writeTo(System.out); I get a valid xml request in the console (I copy it and send it via SOAPUI - everything works.https://pastebin.com/9LHNqfcb
What is missing? Why according to SOAPUI - it is valid. The client request is modeled after the last answer from https://stackoverflow.com/questions/2274378/add-soaph ..
Add SoapHeader to org.springframework.ws.WebServiceMessage
stackoverflow.com
?SOAP-ENV:Envelope xmlns:SOAP-ENV= "http:..
pastebin.com

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question