Mr. Arnold,
this is not completely true. ASMX requests are handled by ASP.NET
infrastructure. And ASP.NET infrastructure unwraps (processes) the
SOAP message and invokes the method on an object to handle such
requests. This object is defined in an ASMX file, and the class behind
this ASMX file handles the call.
Normally, when there is a problem with an XML being sent to the server
(ordinary web service application), ASP.NET will complain with either
400 Bad request or 500 internal server error (depending which
extensions (WSE3.0) you use).
But in this, we're getting this weird behaviour, that ASP.NET returns
success status code back to the client, even when:
* XML is badly formatted (i.e. not well formed)
* XML does not adhere to schema/DTD
The request is not being handled by the "designated method" which
should handle the request.
To illustrate:
our scenario:
client ---- malformed XML ---IIS(asmx) --return code 200
new ASP.NET asmx webservice project:
client ---- malformed XML --IIS(asmx) --return code 400 (bad
request)
When debugging our application, I can see in the debugger that there
is exception thrown (three of them actually), but it does not affect
the status code.
Also note, that there is no XML returned from the server. Just HTTP
status code 200 and then connection terminates. It is a really weird
behaviour...
Hope that helps to clarify the problem we're seeing...
Thanks,
Miha
On Aug 5, 9:48*am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"Miha V" <miha.valen...@gmail.comwrote in message
That HTTP 1.1 200 OK return code means the the HTTP request/connection
between the Web client and the Web *server *was OK. It is not an indication
of data exchanged between the Web client and Web service *is invalid or
valid in the case the XML that has been transmitted between the Web client
and Web server.
The only thing you should be concerned about is that the 200 OK was
returned, and if it's not a 200 OK return code, then take the appropriate
action to indicate that there is something wrong with the HTTP connection
between the Web client and Web server, and the connection cannot be made
established between the two.
The return code can be 200 OK and no data was transmitted period, but most
likely, you'll get some kind *formatted XML return code from the Web service
to the Web client indicating the Web service had a problem in processing
data.
So it doesn't matter if the XML is valid, *not valid or no XML is returned
period when HTTP 1.1 200 OK is returned.
It's up to you check for return codes and take the appropriate action, and
it's up to you to check if the XML is valid by validating the XML data
against a XML schema and taking the appropriate action if it's valid or not
valid. HTTP 1.1 200 OK has nothing to do with valid or invalid XML being
transmitted.