ciao a tutti,
ho scritto un client stupidissimo in php che chiama una funzione passando come parametro un intero.
Il server non fa altro che sommare 1 al parametro passato dal client e fare un return di questa somma.
la comunicazione passa attraverso un wsdl in cui ho appositamente scritto che l'input e' di tipo string, ma non mi ritorna nessun errore, anzi , fa la somma e mi ritorna un intero.... come mai???
utilizzo la libreria PEAR::SOAP per la comunicazione client-server.
codice:<?xml version="1.0"?> <definitions name="HelloServer" targetNamespace="urn:HelloServer" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:HelloServer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/" > <types> </types> <message name="sayHelloRequest"> <part name="inputString" type="xsd:string"/> </message> <message name="sayHelloResponse"> <part name="outputString" type="xsd:string"/> </message> <portType name="HelloServerPort"> <operation name="sayHello"> <input message="tns:sayHelloRequest"/> <output message="tns:sayHelloResponse"/> </operation> </portType> <binding name="HelloServerBinding" type="tns:HelloServerPort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="sayHello"> <soap:operation soapAction="urn:HelloServer#HelloServer#sayHello"/> <input> <soap:body use="encoded" namespace="urn:HelloServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:HelloServer" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="HelloServerService"> <documentation/> <port name="HelloServerPort" binding="tns:HelloServerBinding"> <soap:address location="http://localhost/tesi/prova/server_wsdl.php"/> </port> </service> </definitions>