D
Dr. Frankenchurn
I have a question regarding SOAP.
A basic "Hello World" web service was written then requested from an IIS
server via TELNET. When a malformed request was sent, a SOAP exception was
returned, just as I would expect:
What was sent:
POST /helloworld/helloworld.asmx?op=HelloWorld HTTP/1.0
What was received:
HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.0
Date: Wed, 25 Feb 2004 19:38:32 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 848
<?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>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Unable to
handle request without a valid action parameter. Please supply a valid soap
action.
at
System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
--EOF--
However, when a good request was made, what appears to be XML outside of the
SOAP definition was returned:
What was sent:
POST /helloworld/helloworld.asmx/HelloWorld HTTP/1.0
What was received:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 25 Feb 2004 21:00:47 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: 116
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">Hello World : NO REFERRER FOUND</string>
--EOF--
Am I missing something? It appears that a soap exception is returned on bad
requests, that a soap header could be created for specific purposes, but by
default .NET will not return soap encapsulated responses. I know that SOAP
by definition cannot contain a DTD. Is the XML encoded response then an
assumed SOAP header?
Thanks,
Bri Gipson
(e-mail address removed)
A basic "Hello World" web service was written then requested from an IIS
server via TELNET. When a malformed request was sent, a SOAP exception was
returned, just as I would expect:
What was sent:
POST /helloworld/helloworld.asmx?op=HelloWorld HTTP/1.0
What was received:
HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.0
Date: Wed, 25 Feb 2004 19:38:32 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 848
<?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>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Unable to
handle request without a valid action parameter. Please supply a valid soap
action.
at
System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
--EOF--
However, when a good request was made, what appears to be XML outside of the
SOAP definition was returned:
What was sent:
POST /helloworld/helloworld.asmx/HelloWorld HTTP/1.0
What was received:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 25 Feb 2004 21:00:47 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: 116
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">Hello World : NO REFERRER FOUND</string>
--EOF--
Am I missing something? It appears that a soap exception is returned on bad
requests, that a soap header could be created for specific purposes, but by
default .NET will not return soap encapsulated responses. I know that SOAP
by definition cannot contain a DTD. Is the XML encoded response then an
assumed SOAP header?
Thanks,
Bri Gipson
(e-mail address removed)