The Artima Developer Community
Sponsored Link

Java Answers Forum
SOAP Header Authentication!!!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
KSaleem

Posts: 2
Nickname: tecsolutio
Registered: Aug, 2004

SOAP Header Authentication!!! Posted: Aug 3, 2004 7:25 AM
Reply to this message Reply
Advertisement


Dear Friends,

I am trying to access webservices using java client. I am getting following error:

[i]
Fault Code = soap:Server
Fault String = Server was unable to process request. --> Authentication failed. Subscription ID is empty [/i]

The service provider providing clinet in .NET ,and our requirement is to use the same service( to find the distance betweent two zip code) in Java.

[b]I have to set sessionID in the header [/b], so the webservice authenticate me in order to use this service.

Please share any sample code, that is doing similar functionality, or any kind of help to resolve this problem.


any help in this regard would be highly appreciated.

http://www.codebump.com/services/ZipCodeLookup.asmx?op=GetDistanceBetweenZipCodes


http://www.codebump.com/services/ZipCodeLookup.asmx?WSDL





************* SOAP REQUEST ********************
POST /services/ZipCodeLookup.asmx HTTP/1.1
Host: www.codebump.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://skats.net/services/GetDistanceBetweenZipCodes"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://skats.net/services/" xmlns:types="http://skats.net/services/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
[b]<soap:Header>
<tns:AuthenticationHeader>
<SessionID xsi:type="xsd:string">string</SessionID>
</tns:AuthenticationHeader>
</soap:Header>
[/b]<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetDistanceBetweenZipCodes>
<zip1 xsi:type="xsd:string">string</zip1>
<zip2 xsi:type="xsd:string">string</zip2>
</tns:GetDistanceBetweenZipCodes>
</soap:Body>
</soap:Envelope>

************************************ **************

********************** SOAP Response *************
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://skats.net/services/" xmlns:types="http://skats.net/services/encodedTypes" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<tns:GetDistanceBetweenZipCodesResponse>
<GetDistanceBetweenZipCodesResult xsi:type="xsd:float">float</GetDistanceBetweenZipCodesResult>
</tns:GetDistanceBetweenZipCodesResponse>
</soap:Body>
</soap:Envelope>
************************************* *************


Thanks,

KS

Topic: preventing JSpinners from taking non-positive integersh Previous Topic   Next Topic Topic: M x N dimensional array(concurrent)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use