Przykładowy WSDL
<?xml version="1.1" encoding="utf-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://wookieb/service" xmlns:tns="http://wookieb/service" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <portType name="wookieb_port_type"> <operation name="testowa"> <input message="tns:testowa_wejscie"/> <output message="tns:testowa_wyjscie"/> </operation> </portType> <binding name="wookieb_binding" type="tns:wookieb_port_type"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="testowa"> <soap:operation soapAction="#testowa" style="rpc"/> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://wookieb/service"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://wookieb/service"/> </output> </operation> </binding> <message name="testowa_wejscie"> <part name="test" type="xsd:string"/> <part name="id_sesji" type="xsd:string"/> </message> <message name="testowa_wyjscie"> <part name="test" type="xsd:string"/> <part name="test2" type="xsd:string"/> </message> <service name="wookieb"> <port name="wookieb_port" binding="tns:wookieb_binding"> <soap:address location="http://wookieb/service"/> </port> </service> </definitions>
I przykładowo taki request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://wookieb/service"> <soapenv:Header/> <soapenv:Body> <ser:testowa soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <test xsi:type="xsd:string">test</test> </ser:testowa> </soapenv:Body> </soapenv:Envelope>
Przechodzi. Choć przecież ilość parametrów się nie zgadza.
Jak mogę zmusić serwer aby nie przepuszczał takie przypadki?