Cita:
Empezado por ElKurgan
tu no estas usando ningún XML, pero si el web service tiene definidos los campos dentro de un TDT entonces intentará cargarlo al abrir el WS.
¿Es un WS creado por ti? ¿Es uno creado por otros?
Normalmente, si el servicio tiene extensión "wsdl" se puede abrir con el navegador de Internet y ahí te muestra los archivos que utiliza para la validación, incluido cualquier tdt.
Si no, ¿podrías compartirlo con el grupo para que le echemos un vistazo?
Saludos
|
Gracias por tu respuesta ElKurgan, y sí, el ws lo hice yo, este es el wsdl.
Código PHP:
<definitions 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:tns="http://localhost/monitor/index.php?/PruebaWS/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/monitor/index.php?/PruebaWS/">
<types>
<xsd:schema targetNamespace="http://localhost/monitor/index.php?/PruebaWS/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
<xsd:complexType name="Resultado">
<xsd:all>
<xsd:element name="id" type="xsd:int"/>
<xsd:element name="msg" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="Resultados">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Resultado[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>
<message name="ConsultaUsuarioRequest">
<part name="username" type="xsd:string"/>
<part name="password" type="xsd:string"/>
</message>
<message name="ConsultaUsuarioResponse">
<part name="return" type="tns:Resultados"/>
</message>
<message name="ValidaDatoRequest">
<part name="username" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="identificador" type="xsd:string"/>
</message>
<message name="ValidaDatoResponse">
<part name="return" type="tns:Resultados"/>
</message>
<portType name="PruebaWSPortType">
<operation name="ConsultaUsuario">
<documentation>Valida usuario en sistema.</documentation>
<input message="tns:ConsultaUsuarioRequest"/>
<output message="tns:ConsultaUsuarioResponse"/>
</operation>
<operation name="ValidaDato">
<documentation>Valida dato emitido.</documentation>
<input message="tns:ValidaDatoRequest"/>
<output message="tns:ValidaDatoResponse"/>
</operation>
</portType>
<binding name="PruebaWSBinding" type="tns:PruebaWSPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="ConsultaUsuario">
<soap:operation soapAction="urn:http://localhost/monitor/index.php?/PruebaWS/ConsultaUsuario" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:PruebaWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:PruebaWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="ValidaDato">
<soap:operation soapAction="urn:http://localhost/monitor/index.php?/PruebaWS/ValidaDato" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:PruebaWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:PruebaWS" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="PruebaWS">
<port name="PruebaWSPort" binding="tns:PruebaWSBinding">
<soap:address location="http://localhost/monitor/index.php/PruebaWS"/>
</port>
</service>
</definitions>