axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Gregory <>
Subject Generating SimpleSessionHandler in client wsdd with wsdl2java
Date Wed, 09 Nov 2005 09:42:20 GMT
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,


<wsdl:definitions targetNamespace=""


		<schema targetNamespace="" xmlns="">
			<simpleType name="sessID">
				<restriction base="xsd:long"/>
			<element name="sessionID" type="sess:sessID"/>
		<xsd:schema xmlns:xsd="" xmlns=""
			<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:complexType name="requiredElementsType">
					<xsd:element name="elementName" type="xsd:string" minOccurs="1" maxOccurs="999"/>
			<xsd:complexType name="returnedElementsType">
					<xsd:element name="element" type="elementType" minOccurs="1" maxOccurs="999"/>
			<xsd:complexType name="elementType">
					<xsd:element name="elementName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="elementContent" type="xsd:string" minOccurs="1" maxOccurs="1"/>
			<xsd:element name="result">
						<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:element name="entry" type="xsd:string"/>
							<xsd:element name="returnedElements" type="returnedElementsType"/>
							<xsd:element name="noMatchesMessage" type="xsd:string"/>
			<xsd:element name="getBiorsEntry">
						<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:element name="getBiorsEntryResponse">
						<xsd:element ref="result"/>

	<message name="soapHeader"> 
		<part name="sessID" element="sess:sessionID" /> 
	<message name="getBiorsEntryReq">
		<part name="parameters" element="types:getBiorsEntry"/>
	<message name="getBiorsEntryResp">
		<part name="parameters" element="types:getBiorsEntryResponse"/>
	<portType name="BiorsAdvancedQueryPortType">
		<operation name="getBiorsEntry">
			<input message="tns:getBiorsEntryReq"/>
			<output message="tns:getBiorsEntryResp"/>
	<wsdl:binding name="BiorsAdvancedQuerySOAPBinding" type="tns:BiorsAdvancedQueryPortType">
		<soap:binding style="document" transport=""/>
		<wsdl:operation name="getBiorsEntry">
			<soap:operation soapAction="getBiorsEntry" style="document"/>
				<soap:header message="tns:soapHeader" part="sessID" use="literal"/>
				<soap:body use="literal"/>
				<soap:header message="tns:soapHeader" part="sessID" use="literal"/>
				<soap:body use="literal"/>

	<service name="BiorsAdvancedQueryDocStyleService">
		<port name="BiorsAdvancedQueryDocStyle" binding="tns:BiorsAdvancedQuerySOAPBinding">
			<soap:address location=""/>

View raw message