I guess the message doesn't make much sense, here is more info:
I have generated the necessary code from a WSDL file using Axes2 1.4 and Eclipse.
Now the WSDl file has a complexType element with 5 child elements. this is used for the header for all the methods of the webservice.
Complex type in wsdl:
<s:element name="ComplexTypeHeader" type="tns:ComplexTypeHeader" />
<s:complexType name="ComplexTypeHeader">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" default="123" name="id" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" default="123" name="cid" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="wName" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="mName" type="s:string" />
</s:sequence>
<s:anyAttribute />
</s:complexType>
An example method:
<wsdl
peration name="GetVersion">
<soap12
peration soapAction="http://xyz/GetVersion" style="document" />
<wsdl:input>
<soap12:body use="literal" />
<soap12:header message="tns:GetVersionComplexTypeHeader" part="ComplexTypeHeader" use="literal" />
</wsdl:input>
The generated code has created a POJO for the complex element with five instance variables with setters and getters plus the Locator, SoapStub, proxy.
I can't seem to figure out how to send this class as the input with the Generated Proxy class or the stub class.
I have tried modifying the stub class and adding addHeader(SOAPHeaderElement header) method and adding all 5 child elements but it keeps throwing a Bad Envelop error.
If I just call the method without specifying the Header I keep getting a bad credentials error from the server.
Any help will be greatly appreciated.