Axis2 and WSDL2Java: SOAP header is missing
Posted
by lasombra
on Stack Overflow
See other posts from Stack Overflow
or by lasombra
Published on 2010-04-14T11:54:50Z
Indexed on
2010/04/15
8:13 UTC
Read the original article
Hit count: 498
I've generated the java code from wsdl using WSDL2Java. I create a SOAP requestand I send it to the server, which answers with an AxisFault. If I have a look in the soap request there is now header tag . Why not?
Does the follwing line in the stub not add a header?
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
What would be the solution to add a header, so that the SOAP request looks like that:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
© Stack Overflow or respective owner