Hi All,
Apologies if this has aleady come up on the list, I had a quick look
through the archives but couldn't find anything. Unfortunatley, if i try
to search for wsdl2java + SimpleSessionHandler + wsdd it returns
hundreds of messages.
What I'm trying to find out is if it is possible to specify the wsdl in
such a way that wsdl2java will generate:
* either the appropriate client wsdd containing this handler in the
client request and response flows and have this client wsdd called
in the generated code to configure the client,
* or the appropriate code generated to invoke this handler without
having to use a client wsdd.
At the moment I have service which uses the SimpleSessionHandler, and to
test it I manually generated a client wsdd and used it in my client
code. However, I discovered I can write my wsdl (see below - based on
information on this subject from a .Net web services list) such that
.Net will generate the appropriate client proxy classes to include the
sessionID in the SOAP header to interact with my service, so I'm
wondering if this is possible with wsdl2java too?
Thanks in advance,
Richard.
<wsdl:definitions targetNamespace="urn:wsdl.advancedquery.docstyle.ws.biors.biomax.de"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sess="http://xml.apache.org/axis/session"
xmlns:tns="urn:wsdl.advancedquery.docstyle.ws.biors.biomax.de"
xmlns:types="urn:advancedquery.docstyle.ws.biors.biomax.de">
<wsdl:types>
<schema targetNamespace="http://xml.apache.org/axis/session"
xmlns="http://www.w3.org/2001/XMLSchema">
<simpleType name="sessID">
<restriction base="xsd:long"/>
</simpleType>
<element name="sessionID" type="sess:sessID"/>
</schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="urn:advancedquery.docstyle.ws.biors.biomax.de"
targetNamespace="urn:advancedquery.docstyle.ws.biors.biomax.de">
<xsd:simpleType name="formatType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="FASTA"/>
<xsd:enumeration value="ENTRY"/>
<xsd:enumeration value="XML_ENTRY"/>
<xsd:enumeration value="XML_ELEMENTS"/>
<xsd:enumeration value="ELEMENTS"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="requiredElementsType">
<xsd:sequence>
<xsd:element name="elementName" type="xsd:string"
minOccurs="1" maxOccurs="999"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="returnedElementsType">
<xsd:sequence>
<xsd:element name="element" type="elementType"
minOccurs="1" maxOccurs="999"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="elementType">
<xsd:sequence>
<xsd:element name="elementName" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="elementContent" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="result">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="resultNumber" type="xsd:int"
minOccurs="0" maxOccurs="1"/>
<xsd:element name="totalResults" type="xsd:int"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="databank" type="xsd:string"
minOccurs="0" maxOccurs="1"/>
<xsd:choice>
<xsd:element name="entry"
type="xsd:string"/>
<xsd:element name="returnedElements"
type="returnedElementsType"/>
<xsd:element name="noMatchesMessage"
type="xsd:string"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getBiorsEntry">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="username" type="xsd:string"
nillable="true" maxOccurs="1"/>
<xsd:element name="password" type="xsd:string"
nillable="true" maxOccurs="1"/>
<xsd:element name="queryString" type="xsd:string"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="returnFormat" type="formatType"
minOccurs="1" maxOccurs="1"/>
<xsd:element name="requiredElements"
type="requiredElementsType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getBiorsEntryResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="result"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<message name="soapHeader">
<part name="sessID" element="sess:sessionID" />
</message>
<message name="getBiorsEntryReq">
<part name="parameters" element="types:getBiorsEntry"/>
</message>
<message name="getBiorsEntryResp">
<part name="parameters" element="types:getBiorsEntryResponse"/>
</message>
<portType name="BiorsAdvancedQueryPortType">
<operation name="getBiorsEntry">
<input message="tns:getBiorsEntryReq"/>
<output message="tns:getBiorsEntryResp"/>
</operation>
</portType>
<wsdl:binding name="BiorsAdvancedQuerySOAPBinding"
type="tns:BiorsAdvancedQueryPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getBiorsEntry">
<soap:operation soapAction="getBiorsEntry"
style="document"/>
<wsdl:input>
<soap:header message="tns:soapHeader" part="sessID"
use="literal"/>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:header message="tns:soapHeader" part="sessID"
use="literal"/>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<service name="BiorsAdvancedQueryDocStyleService">
<port name="BiorsAdvancedQueryDocStyle"
binding="tns:BiorsAdvancedQuerySOAPBinding">
<soap:address
location="http://mips.gsf.de/ws/biorsws/services/BiorsAdvancedQueryDocStyle"/>
</port>
</service>
</wsdl:definitions>