Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   PHP (https://www.clubdelphi.com/foros/forumdisplay.php?f=15)
-   -   WSDL y php (https://www.clubdelphi.com/foros/showthread.php?t=46498)

halizia 02-08-2007 09:30:42

WSDL y php
 
Hola, quisiera saber cómo se puede usar un servicio web desde php definido por WSDL.

Esto es algo nuevo para mi y no tengo mucha idea, a ver si alguien me puede ayudar.

Gracias.

halizia 02-08-2007 13:02:54

he estado mirando documentacion y para hacer funcionar un servicio wsdl hay que usar las funciones soap, pero no me funciona, le paso un archivo xml con la siguiente sintaxis:

<definitions name="IEMailServiceservice" targetNamespace="http://tempuri.org/">

<message name="SendMail0Request">
<part name="ToAddress" type="xs:string"/>
<part name="FromAddress" type="xs:string"/>
<part name="ASubject" type="xs:string"/>
<part name="MsgBody" type="xs:string"/>
</message>

<message name="SendMail0Response">
<part name="return" type="xs:int"/>
</message>

<portType name="IEMailService">

<operation name="SendMail">
<input message="tns:SendMail0Request"/>
<output message="tns:SendMail0Response"/>
</operation>
</portType>

<binding name="IEMailServicebinding" type="tns:IEMailService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="SendMail">
<soap:operation soapAction="urn:EMailServiceIntf-IEMailService#SendMail" style="rpc"/>

<input message="tns:SendMail0Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EMailServiceIntf-IEMailService"/>
</input>

<output message="tns:SendMail0Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:EMailServiceIntf-IEMailService"/>
</output>
</operation>
</binding>

<service name="IEMailServiceservice">
<port name="IEMailServicePort" binding="tns:IEMailServicebinding">
<soap:address location="http://localhost/cgi-bin/project1.exe/soap/IEMailService"/>
</port>
</service>
</definitions>

me da error en el xml dice q no encuentra el tag <definitions>:confused:

el codigo php es el siguiente:
Código PHP:

 $cliente1 = new soapclient("C:\...\mail.xml", array(true)); 

Saludos!

dec 02-08-2007 13:17:00

Hola,

Mira halizia, he encontrado este documento: A PHP Web Service client que parece interesante.

halizia 03-08-2007 09:52:45

muchas gracias dec, pero no me ha servido de mucha ayuda. seguire buscando documentacion.

en cuanto sepa algo os lo comento.

Saludos!

dec 03-08-2007 12:18:12

Hola,

Lo lamento halizia. A ver si hay suertecilla. :)


La franja horaria es GMT +2. Ahora son las 06:43:29.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi