Código:
Lo que hace el método prueba escrito en php es devolverme el valor que le pasamos.<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="ht___schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="ht___schemas.xmlsoap.org/soap/encoding/" xmlns:mime="ht___schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="ht___url.cor/" xmlns:xsd="ht___w3.org/2001/XMLSchema" xmlns:soap12="ht___schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="ht___schemas.xmlsoap.org/wsdl/http/" targetNamespace="http___url.cor/" xmlns:wsdl="ht___schemas.xmlsoap.org/wsdl/"> <wsdl:documentation>Licitaciones</wsdl:documentation> <wsdl:types> <xsd:schema elementFormDefault="qualified" targetNamespace="ht___url.cor/"> <xsd:element name="car" type="tns:carType"/> <xsd:simpleType name="carType"> <xsd:restriction base="xsd:short"> <xsd:enumeration value="1"/> <xsd:enumeration value="2"/> <xsd:enumeration value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> </wsdl:types> <wsdl:message name="PruebaRequest"> <wsdl:part name="PruebaRequest" element="tns:car"></wsdl:part> </wsdl:message> <wsdl:message name="PruebaResponse"> <wsdl:part name="PruebaResponse" type="xsd:string"></wsdl:part> </wsdl:message> <wsdl:portType name="LicitacionWebServiceSoap"> <wsdl:operation name="Prueba"> <wsdl:documentation xmlns:wsdl="ht___schemas.xmlsoap.org/wsdl/">Prueba</wsdl:documentation> <wsdl:input message="tns:PruebaRequest"></wsdl:input> <wsdl:output message="tns:PruebaResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="LicitacionWebServiceSoap" type="tns:LicitacionWebServiceSoap"> <soap:binding transport="ht___schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Prueba"> <soap:operation soapAction="ht___url.cor/Prueba" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="LicitacionWebService"> <wsdl:documentation xmlns:wsdl="ht___schemas.xmlsoap.org/wsdl/">Servicio de manejo de licitaciones</wsdl:documentation> <wsdl:port name="LicitacionWebServiceSoap" binding="tns:LicitacionWebServiceSoap"> <soap:address location="ht___url.cor/servidor/servidor2.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Para probarlo uso SOAP UI, creo un proyecto nuevo con mi wsdl e invoco a prueba pasandole un string asdf
Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules in /var/www/vhosts/url.cor/servidor/servidor2.php on line 14
Donde la linea 14 es aquella que se corresponde con $servidor->handle();
Si paso un valor numerico digamos 1, devuelve el valor correcto.
Pero si paso 4 también, u otro valor que no estea en la enumeración por ejemplo 99999999999999999999999999999999 que tampoco debería tragar por ser mayor que un short.
¿Acaso la información de xsd:restriction es solo orientativa para el cliente que construya?
Muchas gracias