axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan May" <alan....@PeopleAdmin.com>
Subject AXIS 1.3 Client stub... hoping to spit out slightly different soap header output
Date Fri, 04 Nov 2005 20:38:45 GMT
Newbie axis question:
 
Environment:
AXIS 1.3
JDK 1.4.2
Client stub generated from WSDL using WSDL2Java
 
Instead of...
 
<soap:Header>
<ns1:wsConsumerCredential
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xmlns:ns1="http://myhost.com/ws/">
<password>XXXX</password>
<id>YYYY</id>
</ns1:wsConsumerCredential>
</soapenv:Header>
 
Is it possible to get this result?
<soap:Header>

<wsConsumerCredential xmlns="http://myhost.com/ws/">

<password>XXXX</password>

<id>YYYY</id>

</wsConsumerCredential>

<soap:Header>

 

My client of the generated webservice stub class currently uses the
following:
 
QName qnWSConsCreds = new QName("http://myhost.com/ws/",
   "wsConsumerCredential");
   
   SOAPHeaderElement she = new SOAPHeaderElement(qnWSConsCreds);
   SOAPElement passwordElement = she.addChildElement("password", "");
   passwordElement.addTextNode("XXXX");
   SOAPElement idElement = she.addChildElement("id", "");
   idElement.addTextNode("YYYY");
 
 

 

Mime
View raw message