Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

soap header error

Status
Not open for further replies.

LV

Programmer
Nov 1, 2000
1,184
0
0
US
We developed a simple web service (.Net 2.0), authentication works fine when this service is called from an internal test client application - able to to get userid and password from the soap header and authenticate the user. However, when same service is called by a third party, the userid and password are seen as null, although the values are set in the soap header. They use Delphi WSDL Importer Web Service Utility pointed to our wsdl to generate their request. Here is what it looks like:

this is what we expect in the header:
Code:
<soap:Envelope xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns:soap="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/">[/URL]
  	<soap:Header>
    		<LoginHeader xmlns="[URL unfurl="true"]http://tempuri.org/">[/URL]
      			<UserId>string</UserId>
      			<Password>string</Password>
    		</LoginHeader>
  	</soap:Header>

this is what they send us:
Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:SOAP-ENC="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/encoding/">[/URL]
	<SOAP-ENV:Header SOAP-ENV:encodingStyle="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/encoding/"[/URL] xmlns:NS1="[URL unfurl="true"]http://tempuri.org/">[/URL]
		<NS1:LoginHeader xsi:type="NS1:LoginHeader">
			<UserId xsi:type="xsd:string">user</UserId>
			<Password xsi:type="xsd:string">password</Password>
		</NS1:LoginHeader>
	</SOAP-ENV:Header>

Anything obvious in these samples, pointing to the problem? Thanks in advance.
 
hi,

i dont see an error on the face of it. however you could try simulating the client request to your webservice (not using ASP.NET).

do an AJAX on your page passing the above soap content as the body. see if you can capture this error in the output to AJAX...

Known is handfull, Unknown is worldfull
 
vbkris,

Thanks for your reply. I similated their request by sending the recieved envelope to my service and get the same error. The question is: what do I need to change in my service to be able to recieve their requests since it's generated by their IDE based on my wsdl?
 
>>The question is: what do I need to change in my service to be able to recieve their requests since it's generated by their IDE based on my wsdl?

hi, sorry for the late reply. incorporate instrumentation in your web service...

Known is handfull, Unknown is worldfull
 
vbkris, thanks for the reply. Apparently, the calling client had to apply code changes to their code to account for rpc vs. document style and the problem was solved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top