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

Need help on perl server code

Expand Messages
  • drwaiyy
    Hi All, I am new to SOAP. I have set up 2 machines, 1 client(Ubuntu), 1 server(centos). and a wsld:
    Message 1 of 2 , Oct 5, 2010
    • 0 Attachment
      Hi All,

      I am new to SOAP.

      I have set up 2 machines, 1 client(Ubuntu), 1 server(centos).

      and a wsld:
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="HelloService"
      targetNamespace="http://www.mysite.com/HelloService.wsdl"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns="http://www.mysite.com/HelloService.wsdl"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <message name="SayHelloRequest">
      <part name="firstName" type="xsd:string"/>
      </message>
      <message name="SayHelloResponse">
      <part name="greeting" type="xsd:string"/>
      </message>

      <portType name="Hello_PortType">
      <operation name="sayHello">
      <input message="tns:SayHelloRequest"/>
      <output message="tns:SayHelloResponse"/>
      </operation>
      </portType>

      <binding name="Hello_Binding" type="tns:Hello_PortType">
      <soap:binding style="rpc"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="sayHello">
      <soap:operation soapAction="sayHello"/>
      <input>
      <soap:body
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      namespace="urn:examples:helloservice"
      use="encoded"/>
      </input>
      <output>
      <soap:body
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      namespace="urn:examples:helloservice"
      use="encoded"/>
      </output>
      </operation>
      </binding>

      <service name="Hello_Service">
      <documentation>WSDL File for HelloService</documentation>
      <port binding="tns:Hello_Binding" name="Hello_Port">
      <soap:address
      location="http://www.mysite.com/HelloServerWsdl.pl"/>
      </port>
      </service>
      </definitions>


      And try to test the SOAP by using SOAP::Lite:

      Client:

      use SOAP::Lite;

      print "Connecting to Hello Service...\n";
      print SOAP::Lite
      -> service('http://www.mysite.com/HelloService.wsdl')
      -> sayHello;

      But, I have no idea on the server side code.

      Please show me some sample code, as I don't get much information when google around.

      Please help.

      Thanks.
    • Dave Howorth
      ... [snip] ... The first hit in google is http://www.soaplite.com/ Have you looked at the guide or the cookbook or the code samples? etc etc Cheers, Dave
      Message 2 of 2 , Oct 5, 2010
      • 0 Attachment
        drwaiyy wrote:
        > Hi All,
        >
        > I am new to SOAP.

        [snip]

        > But, I have no idea on the server side code.
        >
        > Please show me some sample code, as I don't get much information when google around.

        The first hit in google is http://www.soaplite.com/ Have you looked at
        the guide or the cookbook or the code samples? etc etc

        Cheers, Dave
      Your message has been successfully submitted and would be delivered to recipients shortly.