Re: SOAP-Server don't validate request

From: Date: Fri, 03 Aug 2007 16:27:54 +0000
Subject: Re: SOAP-Server don't validate request
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-2587@lists.php.net to get a copy of this message
<wsdl:binding name="HelloWorldBinding" type="tns:HelloWorldType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="HelloWorld"> <soap:operation soapAction="dhd:#HelloWorld"/> <wsdl:input> <soap:body use="literal" wsdl:required="true"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding>
First of all - at the moment validation in SOAP Server is worth zilch. It is practically non-existent. _Always_ validate manually everything in PHP. SOAP Client is able to do some more, e.g. it is able to detect missing fields in ComplexTypes. As for missing parameters, I'm not sure if this is the problem, but binding section in your WSDL file is missing parts declaration (specifies part names and order). Try to use such code: <wsdl:input> <soap:body use="literal" parts="FirstName SurName" /> </wsdl:input> (similarly for output) As for validating params type or such luxurious things like enumerations or regexps (yes, XML Schema supports regexps, too) - forget it. Do it yourself in your PHP code. Hope this helps a bit.

« previous php.soap (#2587) next »