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

SOAP::Lite WSDL-Generator et. al

Expand Messages
  • michaelcano2003
    Hi group, My goal is to generate WSDL docs for my SOAP::Lite servers on Solaris 5.6 using Perl 5.8 and Apache 1.3. I followed the HowTo-SOAPLite.txt that
    Message 1 of 5 , Jun 6, 2003
    • 0 Attachment
      Hi group,

      My goal is to generate WSDL docs for my SOAP::Lite servers on
      Solaris 5.6 using Perl 5.8 and Apache 1.3.

      I followed the "HowTo-SOAPLite.txt" that comes with the WSDL-
      Generator 0.02 distribution and most of it worked great.
      I was able to configure Apache and write the hello world server and
      it tested fine witht the local world_client.pl.

      But, when I get to the WSDL generation part, and after copying the
      code example verbatim, I get:
      Class WorldFunctions not called at wsdl_gen.pl line 28

      Anyone have any idea what's up with that?

      I'd also be interested in any other tools out there that allow me to
      create wsdl from my SOAP::Lite servers. I need to expose these
      servers to a .NET client in VB. (The .NET 2003 tool wsdl.exe needs a
      wsdl document to create a proxy object.)

      Thanks!
      -Mike
    • kedsbarve
      Hi Michael: I have successfully implemented a Perl Soap/Lite server (Apache 2 and Solaris 8/Aix 4) and all VB/.Net clients, via WSDL endpoint access. It works
      Message 2 of 5 , Jun 9, 2003
      • 0 Attachment
        Hi Michael:

        I have successfully implemented a Perl Soap/Lite server (Apache 2 and
        Solaris 8/Aix 4) and all VB/.Net clients, via WSDL endpoint access.
        It works great!!

        Foll: are the steps:

        1. Use the WSDL::Generator module to generate the WSDL. It does a
        decent job. But you have to modify it by hand to get it working
        properly.

        Following is a small snapshot of my wsdl (modified by hand):

        =============== WSDL starts ================================

        <?xml version="1.0"?>
        <definitions name="ldapControl"
        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://10.21.24.28:8000/ldapControl.wsdl"
        xmlns:tns="http://10.21.24.28:8000/ldapControl.wsdl"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:xsd1="http://10.21.24.28:8000">
        <types>
        <xsd:schema elementFormDefault="qualified"
        targetNamespace="http://10.21.24.28:8000">
        <xsd:element name="userView">
        <xsd:complexType>
        <xsd:sequence>
        <xsd:element maxOccurs="1"
        minOccurs="0" name="username" type="xsd:string" />
        <xsd:element maxOccurs="1"
        minOccurs="0" name="attributes" type="xsd:string" />
        </xsd:sequence>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="userViewResponse">
        <xsd:complexType>
        <xsd:sequence>
        <xsd:element maxOccurs="1"
        minOccurs="0" name="userViewResult" type="xsd:string" />
        </xsd:sequence>
        </xsd:complexType>
        </xsd:element>

        </xsd:schema>
        </types>
        <message name="userViewRequest">
        <part name="parameters" element="xsd1:userView"/>
        </message>
        <message name="userViewResponse">
        <part name="parameters"
        element="xsd1:userViewResponse"/>
        </message>
        <portType name="ldapControlPortType">
        <operation name="userView">
        <input message="tns:userViewRequest" />
        <output message="tns:userViewResponse" />
        </operation>
        <binding name="ldapControlSoapBinding" type="tns:ldapControlPortType">
        <soap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="userView">
        <soap:operation style="document"
        soapAction="http://10.21.24.28:8000/ldapControl#userView"/>
        <input>
        <soap:body use="literal"/>
        </input>
        <output>
        <soap:body use="literal"/>
        </output>
        </operation>
        </binding>
        <service name="ldapControl">
        <documentation>
        LDAP Control module
        </documentation>
        <port name="ldapControlSoapPort"
        binding="tns:ldapControlSoapBinding">
        <soap:address
        location="http://10.21.24.28:8000/webperl/ldap.pl"/>
        </port>
        </service>

        </definitions>

        =============== WSDL ends =========================

        2. Contents of ldap.pl (the proxy script)
        -----------------------------------------

        #!/opt/freeware/bin/perl

        use lib("your module lib path");
        use ldapControl; # my perl module
        use SOAP::Transport::HTTP;

        SOAP::Transport::HTTP::CGI
        -> on_action(sub {return})
        -> dispatch_to('module lib path','ldapControl')
        -> handle;

        3. In my ldapControl perl module (imp. things to remember)
        ----------------------------------------------------------
        eg:

        sub userView {
        my ($class, $username, $attributes) = @_;
        blah blah...


        *** returning a string with value = "hello world" ***
        return SOAP::Data->name('userViewResult')->type('string')->value
        ("hello World")->uri($uriNameSpace);

        }

        1;
        ------------------

        'userViewResult' as defined in the WSDL
        return type is 'string'
        retutn string value is "Hello World"
        uriNameSpace is 'http://10.21.24.28:8000' as defined in the WSDL.


        I have tested it against all possible clients and this works great!!
        Hope this is helpful!!

        Cheers!
        Kedar
      • Byrne Reese
        ... I know this doesn t help you now, but a project is currently underway to produce WSDL tools for SOAP::Lite... more details on this project will be released
        Message 3 of 5 , Jun 9, 2003
        • 0 Attachment
          On Fri, 2003-06-06 at 15:04, michaelcano2003 wrote:
          > I'd also be interested in any other tools out there that allow me to
          > create wsdl from my SOAP::Lite servers. I need to expose these
          > servers to a .NET client in VB. (The .NET 2003 tool wsdl.exe needs a
          > wsdl document to create a proxy object.)

          I know this doesn't help you now, but a project is currently underway to
          produce WSDL tools for SOAP::Lite... more details on this project will
          be released soon. The goal of the project is to achieve the same level
          of support and ease-of-use that is enjoyed by users of .NET and Axis. No
          rewriting of WSDL will be necessary!

          --
          Byrne Reese
          Developer Program Manager
          Grand Central Communications
        • Alasdair Allan
          ... Really? Is there a timescale? This is something that would seriously help me out... since I m heavily using ithreads, I m using Perl 5.8.0, which means
          Message 4 of 5 , Jun 9, 2003
          • 0 Attachment
            > I know this doesn't help you now, but a project is currently underway to
            > produce WSDL tools for SOAP::Lite... more details on this project will
            > be released soon.

            Really? Is there a timescale? This is something that would seriously help
            me out... since I'm heavily using ithreads, I'm using Perl 5.8.0, which
            means that I've got the AUTOLOAD bug, which means that WSDL::Generator
            doesn't work.

            > The goal of the project is to achieve the same level of support and
            > ease-of-use that is enjoyed by users of .NET and Axis. No rewriting of
            > WSDL will be necessary!

            This would be (more than) nice, interoperability with Axis is prety much a
            priority for me since I'm a sole Perl voice in a wilderness of Java.

            Al.

            PS. Don't suppose you'll be at OSCON and willing to talk about this in
            the SOAP::Lite BOF? ;)
          • Pierre Denis
            ... Hi Mike, If you are using Perl 5.8, that may explain why. I know it sounds silly, but perl 5.8 has a buggy implementation of UNIVERSAL::AUTOLOAD which is
            Message 5 of 5 , Jun 10, 2003
            • 0 Attachment
              >
              > But, when I get to the WSDL generation part, and after copying the
              > code example verbatim, I get:
              > Class WorldFunctions not called at wsdl_gen.pl line 28
              >
              > Anyone have any idea what's up with that?

              Hi Mike,

              If you are using Perl 5.8, that may explain why. I know it sounds silly, but
              perl 5.8 has a buggy implementation of UNIVERSAL::AUTOLOAD which is used in
              Class::Hook used by WSDL::Generator

              This will be fixed next version of perl.

              Regards

              Pierre Denis
              opensource.fotango.com
            Your message has been successfully submitted and would be delivered to recipients shortly.