RE: Web service with several operations : only the first one works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your answers.


George> Yes, it's in doc/lit mode. I'm okay with setting different input
types for the two methods so that the server can tell the difference
between them, but where do I have to change things ? In the wsdl,
client, server or all three ? 
PHP being a weakly-typed language, how will the server tell the type of
the parameter sent by the client ?


Michael> I can't switch to RPC/encoded since the web service will also
have to be reached in MS InfoPath forms. Such forms (as well as any
DotNet SOAP client, I think) only accept doc/lit style responses.


Anyway, if putting several operations in a single web service happens to
be too complex, I guess I'll have to build 2 separate web services...


By the way, here's the entire contents of my 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 elementFormDefault="qualified"
targetNamespace="urn:cms">

<xsd:complexType name="Rubrique">
  <xsd:all>
    <xsd:element name="id_rubrique" type="xsd:string" />
    <xsd:element name="nom" type="xsd:string" />
  </xsd:all>
</xsd:complexType> 


<xsd:complexType name="Groupe">
  <xsd:all>
    <xsd:element name="id_groupe" type="xsd:string" />
    <xsd:element name="nom" type="xsd:string" />
  </xsd:all>
</xsd:complexType> 

<xsd:element name="Rubriques">
 <xsd:complexType name="tabRubriques">
  <xsd:complexContent>
     <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="cms:Rubrique[]"/>
    </xsd:restriction> 
  </xsd:complexContent>
</xsd:complexType>
</xsd:element>

<xsd:element name="Groupes">
 <xsd:complexType name="tabGroupes">
  <xsd:complexContent>
     <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="cms:Groupe[]"/>
    </xsd:restriction> 
  </xsd:complexContent>
</xsd:complexType>
</xsd:element>
 
</xsd:schema>
</types>

<message name="listeRubriquesResponse"><part name="parameters"
element="tns:Rubriques" /></message>
<message name="listeRubriquesRequest"><part name="parameters"
type="xsd:string" /></message>

<message name="listeGroupesResponse"><part name="parameters"
element="tns:Groupes" /></message>
<message name="listeGroupesRequest"><part name="parameters"
type="xsd:string" /></message>

<portType name="cmsserverPortType">
	<operation name="getRubriques"><input
message="tns:listeRubriquesRequest"/><output
message="tns:listeRubriquesResponse"/></operation>
	<operation name="getGroupes"><input
message="tns:listeGroupesRequest"/><output
message="tns:listeGroupesResponse"/></operation>
</portType>

<binding name="cmsserverBinding" type="tns:cmsserverPortType">
	<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
	<operation name="getRubriques">
		<documentation>Liste des rubriques du
CMS</documentation>
		<soap:operation soapAction="urn:cms#getRubriques"
style="document"/>
		<input><soap:body use="literal"
namespace="urn:cms"/></input>
		<output><soap:body use="literal"
namespace="urn:cms"/></output>
	</operation>
	<operation name="getGroupes">
		<documentation>Liste des groupes du CMS</documentation>
		<soap:operation soapAction="urn:cms#getGroupes"
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/cms_test/backend/webservice/webservice.php"/>
</port>
</service>

</definitions>

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux