axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: adding soap header information
Date Thu, 17 Nov 2005 13:22:02 GMT
check the test harness it has a working wst (test\wsdl\header)

On 11/17/05, Manivannan Gopalan <Manivannan_Gopalan@infosys.com> wrote:
>
>
>
>
>
> Hi All,
>
>
>
> I am facing a problem and don't know how to solve it.
>
> I have developed a web service that takes soap input with header.
>
> I am trying to develop a client using proxies generated by WSDL2Java
> command.
>
> I have added my xsd and header in the wsdl.
>
> But although the placeholders for input soap body gets generated but the
> placeholders for headers are not getting generated.
>
> Can anyone please tell me how I can create wsdl such that placeholders for
> headers also gets generated using WSDL2Java.
>
>
>
> The wsdl that I have created is as follows:
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <wsdl:definitions
> targetNamespace="http://172.25.73.48:8080/axis/services/CreateCustomerService"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
> xmlns:tns1="http://172.25.73.48:8080/axis/services/CreateCustomerService"
>
> xmlns:ns1="http://localhost:7001/axis/services/CreateCustomerService">
>
> <wsdl:types>
>
>             <xs:schema
> targetNamespace="http://localhost:7001/axis/services/CreateCustomerService"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> xmlns="http://localhost:7001/axis/services/CreateCustomerService">
>
>             <xs:element name="createCustomer" type="createCustomerType"/>
>
>             <xs:complexType name="createCustomerType">
>
>                 <xs:sequence>
>
>                         <xs:element name="NewCustomer"
> type="NewCustomerType"/>
>
>                 </xs:sequence>
>
>             </xs:complexType>
>
>             <xs:complexType name="NewCustomerType">
>
>                 <xs:sequence>
>
>                         <xs:element name="CustomerName" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="100" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="AddressLine1" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="100" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="Description" minOccurs="0"
> maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="1000" />
>
>                                         <xs:minLength
> value="0" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="AddressLine2" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="50" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="City" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="20" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="State" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="20" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="Zip" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:long">
>
>                                         <xs:maxLength
> value="5" />
>
>                                         <xs:minLength
> value="5" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="custStatus" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="10" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="ClientId" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:long">
>
>                                         <xs:maxLength
> value="10" />
>
>                                         <xs:minLength
> value="0" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="DUNS" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="9" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="PrimaryContact" type="ContactType"
> maxOccurs="1"/>
>
>                         <xs:element name="SecondaryContact"
> type="ContactType" minOccurs="0" maxOccurs="1"/>
>
>                 </xs:sequence>
>
>             </xs:complexType>
>
>
>
>                 <xs:complexType name="ContactType">
>
>                         <xs:sequence>
>
>                             <xs:element name="Title" minOccurs="0"
> maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="10" />
>
>
> <xs:minLength value="0" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="FirstName" maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="MiddleName" minOccurs="0"
> maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="0" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="LastName" maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="Suffix" minOccurs="0"
> maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="0" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="Designation" maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="30" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="EmailId" maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="100" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="PrimaryPhone" maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="SecondaryPhone" minOccurs="0"
> maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                             <xs:element name="FAXNo" minOccurs="0"
> maxOccurs="1">
>
>                                     <xs:simpleType>
>
>                                         <xs:restriction
> base="xs:string">
>
>
> <xs:maxLength value="20" />
>
>
> <xs:minLength value="1" />
>
>                                         </xs:restriction>
>
>                                     </xs:simpleType>
>
>                             </xs:element>
>
>                         </xs:sequence>
>
>                 </xs:complexType>
>
>
>
>                 <xs:element name="createCustomerResponse"
> type="ResponseType"/>
>
>                 <xs:complexType name="ResponseType">
>
>                             <xs:sequence>
>
>                                     <xs:element
> name="createCustResponse" type="NewResponseType"/>
>
>                             </xs:sequence>
>
>                         </xs:complexType>
>
>                 <xs:complexType name="NewResponseType">
>
>                 <xs:sequence>
>
>                         <xs:element name="CustomerId" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:long">
>
>                                         <xs:maxLength
> value="100" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="status" minOccurs="0"
> maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="10" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         <xs:element name="Error" maxOccurs="1">
>
>                             <xs:simpleType>
>
>                                     <xs:restriction
> base="xs:string">
>
>                                         <xs:maxLength
> value="1000" />
>
>                                         <xs:minLength
> value="1" />
>
>                                     </xs:restriction>
>
>                             </xs:simpleType>
>
>                         </xs:element>
>
>                         </xs:sequence>
>
>                 </xs:complexType>
>
>
>             <xs:element name="Security" type="RequestSecurityType"/>
>
>                             <xs:complexType name="RequestSecurityType">
>
>                                         <xs:sequence>
>
>                                                 <xs:element
> name="UsernameToken" type="ReqSecurityType"/>
>
>                                         </xs:sequence>
>
>                                     </xs:complexType>
>
>                             <xs:complexType name="ReqSecurityType">
>
>                             <xs:sequence>
>
>                                     <xs:element
> name="Username" maxOccurs="1">
>
>                                         <xs:simpleType>
>
>
> <xs:restriction base="xs:string">
>
>
> <xs:maxLength value="100" />
>
>
> <xs:minLength value="1" />
>
>
> </xs:restriction>
>
>                                         </xs:simpleType>
>
>                                     </xs:element>
>
>                                     <xs:element
> name="Password" maxOccurs="1">
>
>                                         <xs:simpleType>
>
>
> <xs:restriction base="xs:string">
>
>
> <xs:maxLength value="100" />
>
>
> <xs:minLength value="1" />
>
>
> </xs:restriction>
>
>                                         </xs:simpleType>
>
>                                     </xs:element>
>
>
>                                     </xs:sequence>
>
>                             </xs:complexType>
>
>             </xs:schema>
>
> </wsdl:types>
>
> <wsdl:message name="createCustomerResponse">
>
>             <wsdl:part element="ns1:createCustomerResponse"
> name="createCustomerResponse"/>
>
> </wsdl:message>
>
> <wsdl:message name="createCustomerRequest">
>
>             <wsdl:part element="ns1:createCustomer" name="part"/>
>
> </wsdl:message>
>
> <wsdl:message name="RequestHeader">
>
>             <wsdl:part element="ns1:Security" name="Security"/>
>
> </wsdl:message>
>
> <wsdl:portType name="CreateCustomerService">
>
>             <wsdl:operation name="createCustomer">
>
>                         <wsdl:input
> message="tns1:createCustomerRequest"
> name="createCustomerRequest"/>
>
>                         <wsdl:output
> message="tns1:createCustomerResponse"
> name="createCustomerResponse"/>
>
>             </wsdl:operation>
>
> </wsdl:portType>
>
> <wsdl:binding name="CreateCustomerServiceSoapBinding"
> type="tns1:CreateCustomerService">
>
>             <...
>
> [Message clipped]
>


--
Davanum Srinivas : http://wso2.com/blogs/

Mime
View raw message