vazra

Greenhorn
+ Follow
since May 14, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vazra

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.
15 years ago
Hi Guys,
I'm new to web services. I have generated the necessary code from a WSDL file using Axes2 1.4 and Eclipse.
Now my header has a complex element with 6 child elements. The generated code has created a POJO for this complex elements with six instance variables and setters and getters.
I can't seem to figure out how to send this class with the Generated Proxy class.
I have tried using addHeader(SOAPHeaderElement header) and adding all 6 child elements but it keeps throwing a Bad Envelop error.

Any help will be greatly appreciated, I'm ready to pull my hair off after trying to figure this for 6 hrs.
15 years ago