Loading ...
Sorry, an error occurred while loading the content.

need help in wsdl

Expand Messages
  • prami_22
    Hello, I have written a soap server in perl & client in PHP but when calling method I get follwoing error ... PHP Fatal error: Uncaught SoapFault exception:
    Message 1 of 2 , Nov 2, 2010
    • 0 Attachment
      Hello,

      I have written a soap server in perl & client in PHP
      but when calling method I get follwoing error
      ------------------------
      PHP Fatal error: Uncaught SoapFault exception: [soap:Client] SOAPAction shall match 'uri#method' if present (got 'topic_list', expected '#listName'
      -------------------------
      topic_list method is supposed to get listname & return an array


      here is my wsdl
      ---------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="Demo"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      targetNamespace="http://example.com/soap/my_api.wsdl"
      xmlns:tns="http://example.com/soap/my_api.wsdl"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd1="http://example.com/soap/Demo">
      <types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://example.com/soap/Demo"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <complexType name="ArrayOfString">
      <complexContent>
      <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType"
      wsdl:arrayType="string[]"/>
      </restriction>
      </complexContent>
      </complexType>
      </schema>
      </types>
      <message name="topic_listRequest">
      <part name="listName" element="xsd:string"/>
      </message>
      <message name="topic_listResponse">
      <part name="return" element="xsd1:ArrayOfString"/>
      </message>
      <portType name="DemoPortType">
      <operation name="topic_list">
      <input message="tns:topic_listRequest" />
      <output message="tns:topic_listResponse" />
      </operation>
      </portType>
      <binding name="DemoBinding" type="tns:DemoPortType">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="topic_list">
      <soap:operation style="document" soapAction="topic_list"/>
      <input>
      <soap:body use="literal"/>
      </input>
      <output>
      <soap:body use="literal"/>
      </output>
      </operation>
      </binding>
      <service name="Demo">
      <documentation>
      Service to say hello
      </documentation>
      <port name="DemoPort" binding="tns:DemoBinding">
      <soap:address location="http://example.com/soap/server.cgi"/>
      </port>
      </service>
      </definitions>
    • Martin Busik
      Hi, see the documentation to the on_action method. you might use something like: $proxy- on_action(sub{ http://example.com/soap/my_api.wsdl#$method }); where
      Message 2 of 2 , Nov 3, 2010
      • 0 Attachment
        Hi,
        see the documentation to the on_action method.

        you might use something like:

        $proxy->on_action(sub{"http://example.com/soap/my_api.wsdl#$method"});

        where "http://example.com/soap/my_api.wsdl" is (propably) the uri of your
        example.

        Cheers,
        Martin

        > -----Urspr√ľngliche Nachricht-----
        > Von: soaplite@yahoogroups.com
        > [mailto:soaplite@yahoogroups.com] Im Auftrag von prami_22
        > Gesendet: Mittwoch, 3. November 2010 07:14
        > An: soaplite@yahoogroups.com
        > Betreff: [soaplite] need help in wsdl
        >
        > Hello,
        >
        > I have written a soap server in perl & client in PHP
        > but when calling method I get follwoing error
        > ------------------------
        > PHP Fatal error: Uncaught SoapFault exception: [soap:Client]
        > SOAPAction shall match 'uri#method' if present (got
        > 'topic_list', expected '#listName'
        > -------------------------
        > topic_list method is supposed to get listname & return an array
        >
        >
        > here is my wsdl
        > ---------------------
        > <?xml version="1.0" encoding="UTF-8"?>
        > <definitions name="Demo"
        > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        > targetNamespace="http://example.com/soap/my_api.wsdl"
        > xmlns:tns="http://example.com/soap/my_api.wsdl"
        > xmlns="http://schemas.xmlsoap.org/wsdl/"
        > xmlns:xsd1="http://example.com/soap/Demo">
        > <types>
        > <schema xmlns="http://www.w3.org/2001/XMLSchema"
        > targetNamespace="http://example.com/soap/Demo"
        > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        > <complexType name="ArrayOfString">
        > <complexContent>
        > <restriction base="soapenc:Array">
        > <attribute ref="soapenc:arrayType"
        > wsdl:arrayType="string[]"/>
        > </restriction>
        > </complexContent>
        > </complexType>
        > </schema>
        > </types>
        > <message name="topic_listRequest">
        > <part name="listName" element="xsd:string"/>
        > </message>
        > <message name="topic_listResponse">
        > <part name="return" element="xsd1:ArrayOfString"/>
        > </message>
        > <portType name="DemoPortType">
        > <operation name="topic_list">
        > <input message="tns:topic_listRequest" />
        > <output message="tns:topic_listResponse" />
        > </operation>
        > </portType>
        > <binding name="DemoBinding" type="tns:DemoPortType">
        > <soap:binding style="document"
        > transport="http://schemas.xmlsoap.org/soap/http"/>
        > <operation name="topic_list">
        > <soap:operation
        > style="document" soapAction="topic_list"/>
        > <input>
        > <soap:body use="literal"/>
        > </input>
        > <output>
        > <soap:body use="literal"/>
        > </output>
        > </operation>
        > </binding>
        > <service name="Demo">
        > <documentation>
        > Service to say hello
        > </documentation>
        > <port name="DemoPort" binding="tns:DemoBinding">
        > <soap:address
        > location="http://example.com/soap/server.cgi"/>
        > </port>
        > </service>
        > </definitions>
        >
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.