Dear Friends,
I tried to generate the Web Service Client Stub in Netbeans 6.1
IDE, but the IDE is generating the
Soap Body and not generating the Soap Header stub /
java classes.
Can any one help me how to create the Client Soap Header java classes using JAX-RPC API. I want to conver the below wsdl to java classes and use it thru the mobile.
Please some one help me as it is very urgent.
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://localhost/sdk/customerservice" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://localhost/sdk/customerservice" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://localhost/sdk/customerservice">
<s:element name="Authenticate">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthenticateResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="AuthenticateResult" type="tns:AuthenticationResult" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="AuthenticationResult">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="CustomerID" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="IsAuthenticated" type="s:boolean" />
</s:sequence>
</s:complexType>
<s:element name="ApiToken" type="tns:ApiToken" />
<s:complexType name="ApiToken">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Token" type="s:string" />
</s:sequence>
<s:anyAttribute />
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="AuthenticateSoapIn">
<wsdl:part name="parameters" element="tns:Authenticate" />
</wsdl:message>
<wsdl:message name="AuthenticateSoapOut">
<wsdl:part name="parameters" element="tns:AuthenticateResponse" />
</wsdl:message>
<wsdl:message name="AuthenticateApiToken">
<wsdl:part name="ApiToken" element="tns:ApiToken" />
</wsdl:message>
<wsdl:portType name="CustomerServiceSoap">
<wsdl:operation name="Authenticate">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns the customer id for the authenticated customer. If the authentication failed the returned value will be -1</wsdl:documentation>
<wsdl:input message="tns:AuthenticateSoapIn" />
<wsdl:output message="tns:AuthenticateSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CustomerServiceSoap" type="tns:CustomerServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Authenticate">
<soap:operation soapAction="http://localhost/sdk/customerservice/Authenticate" style="document" />
<wsdl:input>
<soap:body use="literal" />
<soap:header message="tns:AuthenticateApiToken" part="ApiToken" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CustomerServiceSoap12" type="tns:CustomerServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Authenticate">
<soap12:operation soapAction="http://localhost/sdk/customerservice/Authenticate" style="document" />
<wsdl:input>
<soap12:body use="literal" />
<soap12:header message="tns:AuthenticateApiToken" part="ApiToken" use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CustomerService">
<wsdl:port name="CustomerServiceSoap" binding="tns:CustomerServiceSoap">
<soap:address location="https://localhost/soap/customerservice.asmx" />
</wsdl:port>
<wsdl:port name="CustomerServiceSoap12" binding="tns:CustomerServiceSoap12">
<soap12:address location="https://localhost/soap/customerservice.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>