B
Blake
Hello,
This is perhaps a bit of a newbie question, but I am using the Apache
Axis tcpmon program to inspect xml-based web services messages with ASP
..NET and IIS and have noticed that I am not observing the expected
simple request-response MEP, but instead two POST operations.
I am using the dead-simple 'math' web service that adds two numbers. The
output looks something like this. This is the client request message to
add 1 and 1. The client and server are both msft .NET based (C#).
POST /math/math.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.573)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.mathworld.org/math/Add"
Authorization: Negotiate
TlRMTVNTUAABAAAAt7II4AkACQAlAAAABQAFACAAAABCTEFLRVdPUktHUk9VUA==
Content-Length: 311
Expect: 100-continue
Host: localhost
<?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:Body>
<Add xmlns="http://www.mathworld.org/math">
<x>1</x>
<y>1</y>
</Add>
</soap:Body>
</soap:Envelope>POST /math/math.asmx HTTP/1.1
!!!! From here, the server returns with:
HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
WWW-Authenticate: Negotiate
TlRMTVNTUAACAAAACgAKADAAAAA1worg209i4NWBroJIxQsAAAAAAEQARAA6AAAAQgBMAEEASwBFAAIACgBCA...
Content-Length: 4033
Content-Type: text/html
followed by some html stuff to tell humans that they are denied, even
though this is being consumed by a web services client.
!!! Then, my client does the following:
POST /math/math.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.573)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.mathworld.org/math/Add"
Authorization: Negotiate
TlRMTVNTUAADAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAANcKI4A==
Content-Length: 311
Expect: 100-continue
Host: localhost
<?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:Body>
<Add xmlns="http://www.mathworld.org/math">
<x>1</x>
<y>1</y>
</Add>
</soap:Body>
</soap:Envelope>
!!!!! Everything works, the service returns the correct response as follows:
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
X-Powered-By: ASP.NET
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 335
<?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:Body>
<AddResponse xmlns="http://www.mathworld.org/math">
<AddResult>2</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>
Is this behavior a "Microsoft-custom-IIS" behavior or is this how I
would expect the request and response messages to be with any "standard"
XML-based web service?
I can't figure out why the request needs to be sent twice. This seems
like a huge waste given the verbosity of XML as it is.
Thanks,
Blake
This is perhaps a bit of a newbie question, but I am using the Apache
Axis tcpmon program to inspect xml-based web services messages with ASP
..NET and IIS and have noticed that I am not observing the expected
simple request-response MEP, but instead two POST operations.
I am using the dead-simple 'math' web service that adds two numbers. The
output looks something like this. This is the client request message to
add 1 and 1. The client and server are both msft .NET based (C#).
POST /math/math.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.573)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.mathworld.org/math/Add"
Authorization: Negotiate
TlRMTVNTUAABAAAAt7II4AkACQAlAAAABQAFACAAAABCTEFLRVdPUktHUk9VUA==
Content-Length: 311
Expect: 100-continue
Host: localhost
<?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:Body>
<Add xmlns="http://www.mathworld.org/math">
<x>1</x>
<y>1</y>
</Add>
</soap:Body>
</soap:Envelope>POST /math/math.asmx HTTP/1.1
!!!! From here, the server returns with:
HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
WWW-Authenticate: Negotiate
TlRMTVNTUAACAAAACgAKADAAAAA1worg209i4NWBroJIxQsAAAAAAEQARAA6AAAAQgBMAEEASwBFAAIACgBCA...
Content-Length: 4033
Content-Type: text/html
followed by some html stuff to tell humans that they are denied, even
though this is being consumed by a web services client.
!!! Then, my client does the following:
POST /math/math.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.573)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.mathworld.org/math/Add"
Authorization: Negotiate
TlRMTVNTUAADAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAANcKI4A==
Content-Length: 311
Expect: 100-continue
Host: localhost
<?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:Body>
<Add xmlns="http://www.mathworld.org/math">
<x>1</x>
<y>1</y>
</Add>
</soap:Body>
</soap:Envelope>
!!!!! Everything works, the service returns the correct response as follows:
HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
X-Powered-By: ASP.NET
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Mon, 20 Oct 2003 20:36:14 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 335
<?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:Body>
<AddResponse xmlns="http://www.mathworld.org/math">
<AddResult>2</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>
Is this behavior a "Microsoft-custom-IIS" behavior or is this how I
would expect the request and response messages to be with any "standard"
XML-based web service?
I can't figure out why the request needs to be sent twice. This seems
like a huge waste given the verbosity of XML as it is.
Thanks,
Blake