Forum Discussion
If i understand correctly your original soap envelope didnt include a header tag in your envelope....is that right?
Ive always thought that the envelopes tags were mandatory so you have to have envelope, header and body tags in there as a minimum.
So your Content-Type header indicates its a soap message to your endpoint and so its expecting a header tag.
I "think" the 'operation' or 'operation name' tags in you wsdl is supposed to define this. This isnt necessarily true, its just what ive noticed when testing soap calls.
Does that help at all?
Cheers,
Rich
Hi Rich, thanks for the reply. I'm not sure, I think the SOAP Header is optional, and I only know of one way in a WSDL file to supposedly specify it. The reference is here: https://www.ibm.com/developerworks/library/ws-tip-headers/index.html
(Aside: when I did my best to modify the WSDL file and add those elements referenced in the link, the "wsimport.exe" file seems to ignore my efforts and generates code that lacks the needed "Java Annotations" that ultimately should cause the JAXWS libraries to spit out the SOAP Header with the "Action" header block. I proved those annotations do the job by adding them manually to the generated code, which is my current workaround for getting the SOAP message accepted at the endpoint.)
So it is still a mystery to me how SoapUI knows that a SOAP Header and Action header block is needed in the SOAP message, apparently by parsing the Content-Type HTTP header. I am wondering if the WSDL is not really correct for the web service, or whether the web service should not mandate the SOAP Header, or if there is a bug in "wsimport.exe" that makes it fail to generate the correct Java code from the WSDL file. I know that the SOAP 1.2 standard is used, but I can't tell so far if the WSDL file does or does not mandate the SOAP Header. If I can get permission, I will post the WSDL file here.
Related Content
- 5 years ago
- 3 years ago
- 6 months ago
- 6 years ago
Recent Discussions
- 15 years ago