You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wayne Richards <wt...@yahoo.com.au> on 2005/07/21 01:57:02 UTC

HowTo define a soap header in a WSDL

Hi all,
I have been reading on the forum about WSDL and soap
headers. I am trying to understand how they work, so I
created a simple service and am trying to implement a
header using a WSDL. The example is below, but I
cannot see a header in the TCPMonitor and .Net turns
it's toes up on setting it as a web reference. Could
someone explain how to fix this, please
Wayne


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:StringService"
xmlns:intf="urn:StringService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:StringService">
	<wsdl:message name="serviceString1Request">
		<wsdl:part name="inComingString" type="xsd:string"/>
	</wsdl:message>
	<wsdl:message name="serviceString1Response">
		<wsdl:part name="serviceString1Return"
type="xsd:string"/>
	</wsdl:message>
	<wsdl:portType name="stringService">
		<wsdl:operation name="serviceString1"
parameterOrder="inComingString">
			<wsdl:input name="serviceString1Request"
message="impl:serviceString1Request"/>
			<wsdl:output name="serviceString1Response"
message="impl:serviceString1Response"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="StringServiceSoapBinding"
type="impl:stringService">
		<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="serviceString1">
			<wsdlsoap:operation/>
			<wsdl:input>
				<wsdlsoap:header message="serviceString1"
part="inComingString" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:StringService"/>
				<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:StringService"/>
			</wsdl:input>
			<wsdl:output>
				<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:StringService"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="stringServiceService">
		<wsdl:port name="StringService"
binding="impl:StringServiceSoapBinding">
			<wsdlsoap:address
location="http://localhost:8080/axis/services/StringService"/>
		</wsdl:port>
	</wsdl:service>
	<!--WSDL created by Apache Axis version: 1.2
Built on May 03, 2005 (02:20:24 EDT)-->
</wsdl:definitions>



		
____________________________________________________ 
Do you Yahoo!? 
Messenger 7.0 beta: Free worldwide PC to PC calls
http://au.beta.messenger.yahoo.com