|
Re: [NuSOAP+InfoPath] document/literal problem: msg#00106php.nusoap.general
The .NET wsdl tool located your problem: <message name="publierRequest"> <part name="parameters" type="tns:publier" /> </message> <message name="publierResponse"> <part name="parameters" type="tns:publierResponse" /> </message> The types tns:publier and tns:publierResponse do not exist. The actual problem is, however, that the <part> elements for doc/lit methods should specify element instead of type, and there are elements with those names defined. You need <message name="publierRequest"> <part name="parameters" element="tns:publier" /> </message> <message name="publierResponse"> <part name="parameters" element="tns:publierResponse" /> </message> >>>> Every web page on the subject claims that "NuSOAP can handle both rpc/encoded and document/literal services" but so far I haven't found a single tutorial that explains clearly how to deal with the latter. <<<< There are a lot of aspects of NuSOAP for which there are no tutorials and no documentation. The NuSOAP community seems very much a group of individuals who want to get work done with their applications. Unlike something like Apache Axis (an open source SOAP implementation in Java), NuSOAP does not have significant commercial backing, which is how they are able to generate more documentation and tutorials (and code and features). >>>> Also, why the hell does Microsoft have to encourage the use of document/literal while the rest of the world is all about rpc/encoded ? <<<< Actually, Microsoft got the world of SOAP implementers to back off of rpc/encoded in favor of doc/lit and rpc/lit. The WS-I Basic Profile specifies the use of these two and deprecates rpc/encoded. Unfortunately, the original NuSOAP code was created for rpc/encoded, so it still has more complete support for that than doc/lit. Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "LEBUR Guillaume" <guillaume.lebur@xxxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, April 26, 2005 9:12 AM Subject: [Nusoap-general] [NuSOAP+InfoPath] document/literal problem Hi, I have a SOAP service page that looks like this (webservice.php) : <?php function publier($article) { ... <store the article in a database> ... $result = mysql_query($query); return $result; } require('nusoap/lib/nusoap.php'); $server = new soap_server("desc.wsdl"); $server->configureWSDL('cmsserver', 'urn:cms'); $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $server->service($HTTP_RAW_POST_DATA); ?> the desc.wsdl file : <?xml version="1.0" encoding="ISO-8859-1"?> <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:si="http://soapinterop.org/xsd" xmlns:tns="urn:cms" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:cms"> <types><xsd:schema targetNamespace="urn:cms"> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> <xsd:complexType name="article"> <xsd:all> <xsd:element name="titre" type="xsd:string"/> <xsd:element name="texte" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="publierRequestType"> <xsd:all> <xsd:element name="article" type="tns:article"/> </xsd:all> </xsd:complexType> <xsd:complexType name="publierResponseType"> <xsd:all> <xsd:element name="return" type="xsd:boolean"/> </xsd:all> </xsd:complexType> <xsd:element name="publier" type="tns:publierRequestType"/> <xsd:element name="publierResponse" type="tns:publierResponseType"/> </xsd:schema> </types><message name="publierRequest"><part name="parameters" type="tns:publier" /></message><message name="publierResponse"> <part name="parameters" type="tns:publierResponse" /></message> <portType name="cmsserverPortType"><operation name="publier"><input message="tns:publierRequest"/><output message="tns:publierResponse"/></operation></portType> <binding name="cmsserverBinding" type="tns:cmsserverPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="publier"> <soap:operation soapAction="urn:cms#publier" style="document"/> <input><soap:body use="literal" namespace="urn:cms"/></input> <output><soap:body use="literal" namespace="urn:cms"/></output> </operation></binding> <service name="cmsserver"><port name="cmsserverPort" binding="tns:cmsserverBinding"> <soap:address location="http://localhost_2/mini_cms/webservice.php"/></port></service> </definitions> I'm trying to send data from an Infopath form to that web service, but I get an error message saying that Infopath couldn't understand the wsdl definition file. It fails both with desc.wsdl and webservice.php as the web service location in the Infopath dialog box. Is there something wrong in my wsdl file ? Did I miss something important ? Every web page on the subject claims that "NuSOAP can handle both rpc/encoded and document/literal services" but so far I haven't found a single tutorial that explains clearly how to deal with the latter. Also, why the hell does Microsoft have to encourage the use of document/literal while the rest of the world is all about rpc/encoded ? I thought Web services were the ultimate level of abstraction, that they were supposed to be as universal as possible. Actually it seems that all these messy W3C recommendations are there to confuse people rather than to provide a uniform way of doing things... As you see I'm sort of losing my nerve with all that SOAP/Web Services/Infopath stuff, so any help woud be greatly welcome :) Guillaume ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: remove headers from response or easily fetch response values: 00106, Scott Nichol |
|---|---|
| Next by Date: | RE: [NuSOAP+InfoPath] document/literal problem: 00106, LEBUR Guillaume |
| Previous by Thread: | [NuSOAP+InfoPath] document/literal problemi: 00106, LEBUR Guillaume |
| Next by Thread: | RE: [NuSOAP+InfoPath] document/literal problem: 00106, LEBUR Guillaume |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |