Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/12/2012, 12:06
cristianuscata
 
Fecha de Ingreso: diciembre-2012
Mensajes: 1
Antigüedad: 11 años, 5 meses
Puntos: 0
Consumir web service desde php con NUsoap

necesito consumir los servicios de este codigo WSDL:

Código:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<definitions xmlns:tns="http://ws.ongei.innobix.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soa="http://soa.com/uri/products/wsdlext/1.0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsmex="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.ongei.innobix.com/">
<types>
<xs:schema xmlns:sms="http://ws.ongei.innobix.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://ws.ongei.innobix.com/" version="1.0">
<xs:element name="ActionProcessingException" type="tns:ActionProcessingException"/>
<xs:element name="sendSMS" type="tns:sendSMS"/>
<xs:element name="sendSMSResponse" type="tns:sendSMSResponse"/>
<xs:element name="sms" type="tns:smsMsg"/>
<xs:complexType name="sendSMS">
<xs:sequence>
<xs:element form="unqualified" minOccurs="0" name="sms" type="tns:smsMsg"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="smsMsg">
<xs:sequence>
<xs:element name="sender" type="xs:string"/>
<xs:element name="subject" type="xs:string"/>
<xs:element name="message" type="xs:string"/>
<xs:element minOccurs="0" name="receivers">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="receiver" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element xmlns:ns1="http://www.w3.org/2005/05/xmlmime" minOccurs="0" name="file" ns1:expectedContentTypes="application/octet-stream" type="xs:base64Binary"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendSMSResponse">
<xs:sequence>
<xs:element form="unqualified" minOccurs="0" name="return" type="tns:response"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="response">
<xs:sequence/>
<xs:attribute name="success" type="xs:boolean" use="required"/>
<xs:attribute name="code" type="xs:int" use="required"/>
<xs:attribute name="info" type="xs:string"/>
</xs:complexType>
<xs:complexType name="ActionProcessingException">
<xs:sequence>
<xs:element form="unqualified" minOccurs="0" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="MTOMEndpoint_sendSMS">
<part name="sendSMS" element="tns:sendSMS"></part>
</message>
<message name="MTOMEndpoint_sendSMSResponse">
<part name="sendSMSResponse" element="tns:sendSMSResponse"></part>
</message>
<message name="ActionProcessingException">
<part name="ActionProcessingException" element="tns:ActionProcessingException"></part>
</message>
<portType name="MTOMEndpoint">
<operation name="sendSMS" parameterOrder="sendSMS">
<input message="tns:MTOMEndpoint_sendSMS"></input>
<output message="tns:MTOMEndpoint_sendSMSResponse"></output>
<fault name="ActionProcessingException" message="tns:ActionProcessingException"></fault>
<soa:id>2704</soa:id>
<soa:key>a9594673-1e16-11e2-aeba-a3e08290c09e</soa:key>
<soa:lastUpdated>2012-10-24T15:09:05.000-05:00</soa:lastUpdated>
</operation>
<soa:id>2558</soa:id>
<soa:key>uddi:61bbfce7-d8d6-3075-30d9-0fc0ba9c1ef4</soa:key>
<soa:lastUpdated>2012-10-24T20:07:26.000Z</soa:lastUpdated>
</portType>
<binding name="MTOMEndpointBinding" type="tns:MTOMEndpoint">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<soa:id>2559</soa:id>
<soa:key>uddi:20835c2d-3513-256b-e521-42b68649bd1d</soa:key>
<soa:lastUpdated>2012-10-24T20:07:26.000Z</soa:lastUpdated>
<operation name="sendSMS">
<soap:operation soapAction="sendSMS"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="ActionProcessingException">
<soap:fault name="ActionProcessingException" use="literal"/>
</fault>
</operation>
</binding>
<service name="MTOMService_vs0">
<port name="MTOMEndpointBinding" binding="tns:MTOMEndpointBinding">
<soap:address location="http://vpide-esb1:9951/sms/sendSMSService"/>
<soa:id>2753</soa:id>
<soa:key>uddi:a9b23bec-1e16-11e2-aeba-a3e08290c09e</soa:key>
<soa:lastUpdated>2012-10-24T20:17:17.000Z</soa:lastUpdated>
</port>
<soa:id>20303</soa:id>
<soa:key>uddi:a90f933e-1e16-11e2-aeba-a3e08290c09e</soa:key>
<soa:lastUpdated>2012-10-24T20:17:17.000Z</soa:lastUpdated>
<soa:parentKey>uddi:ab1d8447-13b6-11e2-b0c0-8d96fcc73083</soa:parentKey>
</service>
</definitions>

Soy nuevo en web service, lo unico que pude hacer fue, sugerencias, toda ayuda es bienvenida

Código:
<?php

require_once('lib/nusoap.php');
// haremos una simulacion de el cliente 

//$client = new soapclient('http://ws.pide.gob.pe/sms/sendSMSService?wsdl');
$client = new soapclient('http://ws.pide.gob.pe/sms/sendSMSService?wsdl', 'true'); 

$result = $client->call('sendSMS', $s); 

//Buscamos un fallo 
if ($client->fault){ 
    echo '<p><b>Fallo: '; 
    echo '</b></p>'; 
}else{ 
    //Buscamos errores 
    $err = $client->getError(); 
    if ($err){ 
        //Mostramos el error 
        echo '<p><b>Error: '.$err.'</b></p>'; 
    }else{ 
        //Mostramos los resultados 
        print_r($result); 
    } 
}  

?>