axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tommy Holm - TELMORE" <...@telmore.dk>
Subject How to set the following header information
Date Mon, 20 Oct 2003 14:08:16 GMT
Hi 
I am working on a small project where I need to call a .net webservice.
I have succesfully used the WSDL2 java. The webservice provider requires
me to give authentication information as a soap header.
I just can't seem to get the soap header stuff working. If they turn of
the SOAP header authentication everything works fine.
How do I set the soap headers.

The provider expects the following XML(The request)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<soap:Header>
		<KrakSoapHeader xmlns="http://webservice.krak.dk/">
			<ticket>43653454XFGHDSGHSF</ticket>
			<product>iip-oph-formudfyl</product>
		</KrakSoapHeader>
	</soap:Header>
	<soap:Body>
		<GetTeleByTn xmlns="http://webservice.krak.dk/">
			<telephoneNumber>45956500</telephoneNumber>
		</GetTeleByTn>
	</soap:Body>
</soap:Envelope>

I get the stub like this 
TeleSearchSoap stub = searchservice.getTeleSearchSoap();
How do I set a soap header for 
<soap:Header>
		<KrakSoapHeader xmlns="http://webservice.krak.dk/">
			<ticket>43653454XFGHDSGHSF</ticket>
			<product>iip-oph-formudfyl</product>
		</KrakSoapHeader>
	</soap:Header>

I would be very happy if someone could help me!
Thanks



Tommy Holm, Developer
TELMORE A/S
Carl Gustavsgade 3, 2630 Taastrup
Telefon 70218700, Mobil 22582344
www.telmore.dk 


Mime
View raw message