Guten Tag Alceu R. de Freitas Jr.,
am Mittwoch, 11. Mai 2011 um 22:23 schrieben Sie:
> While the SOAP fault code looks ok, I'm wondering if the HTTP
> header is the correct one. Of course this will happen (once I'm
> using the Perl die function in the CGI) but it seems to me more
> resonable that the HTTP error should be "400 Bad Request" since the
> server was able to process the request, but the parameter(s) is(are) invalid.
The request itself was OK and that what's the status code 400 focuses
on, your error is on application level.
> So my first question is: should I worry about that?
> Question 2: if I should, how should I change that?
In this case you shouldn't worry nor change, every framework and
programming language I know of can handle at least 500. If you want to
change the status code sent you first should really look at your
clients and make sure they can handle anything else. Remember that
webservices are made for interoperability and sometimes this just
means to not use everything what might be possible.
In our software for example we started to use Perl and SOAP::Lite on
sevrer and client side and didn't care about datatypes, proper
encoding of data etc. It just worked because SOAP::Lite handled it
all. Some years late we really have a hard time to support Java, C++,
C#, publish a WSDL and so on. No we think twice on any change. :-)
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
Telefon: Potsdam: 0331-743881-0
E-Mail: tschoening@...
Web: http://www.am-soft.de
AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow
|