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

Document Literal Support

Expand Messages
  • bolasnenhumda
    Hi all, I m starting now to use SOAP::Lite, and I have a bunch of questions: 1 - From what I read, the default encoding and style used in SOAP::Lite are RPC
    Message 1 of 4 , Oct 2, 2007
    • 0 Attachment
      Hi all,

      I'm starting now to use SOAP::Lite, and I have a bunch of questions:

      1 - From what I read, the default encoding and style used in
      SOAP::Lite are RPC encoded. Can I use other combinations, for example,
      document literal or RPC Literal? Or even document literal wrapped (Ok,
      this is hard, knowing that document literal wrapped is not an open
      specification :|)?? If so, how do I do that?

      This could be useful to interconnect SOAP::Lite with .net clients or
      vice versa, for example.


      2 - In case SOAP::Lite doesn't support any of other combinations, how
      much time do you estimate a team composed by 2 Perl experts and 1
      newbie (me :p) would take to develop the support to doc/lit? We have
      no knowledge of SOAP::Lite internals. From what I read in SOAP::Lite
      main page, the code is hard to maintain :(. Assume that we would work
      on this 5 days per week. Just a prevision.

      By the way, if we had to choose between doc/lit or RPC/lit, which one
      do you think is best? I've been reading about this, and based on
      http://msdn2.microsoft.com/en-us/library/ms996466.aspx, I think
      doc/lit support is better, since I read that this is one of the most
      used combinations together with RPC encoded. Anyway, I would
      appreciate an opinion from you guys :)


      3 - Is there a way of creating a WSDL file describing our services
      using SOAP::Lite, or any other module? How do I do that?

      And that's all (for now :p)

      Thanks in advance,
      Mario
    • bolasnenhumda
      Hi all, I ve started to use SOAP::Lite, and I have a bunch of questions: 1 - The default style used by SOAP::Lite is RPC encoded. Is this the only style
      Message 2 of 4 , Oct 2, 2007
      • 0 Attachment
        Hi all,

        I've started to use SOAP::Lite, and I have a bunch of questions:

        1 - The default style used by SOAP::Lite is RPC encoded. Is this the
        only style available? Am I able to use, for example, Document/literal,
        or document/literal encoded (Ok, this is hard to get knowing the
        specification for this is not open -_-).

        In case we have only RPC encoded style, is there any way to access
        .Net web services, for example? What I mean is: is there a way of
        accessing services which are not available in RPC encoded?

        2 - Does SOAP::Lite generates automatically WSDL for us, based on our
        available web services? I read that it doesn't, but the post was from
        2001 ^_^. If not, do you know any perl module capable of doing it?

        And that's all (for now :p)

        Thanks in advance,
        Mario
      • Edward Kawas
        Hi Mario, ... I use soap lite for my project. as far as i know, soap-lite does not create wsdls for you. Sorry, but i dont know the answers to the other
        Message 3 of 4 , Oct 15, 2007
        • 0 Attachment
          Hi Mario,

          > 3 - Is there a way of creating a WSDL file describing our
          > services using SOAP::Lite, or any other module? How do I do that?
          >
          > And that's all (for now :p)

          I use soap lite for my project. as far as i know, soap-lite does not create
          wsdls for you.

          Sorry, but i dont know the answers to the other questions.

          Also, I am willing to give you a hand in creating doc/lit support, soley on
          a coding basis.

          >
          > Thanks in advance,
          > Mario
          >

          Eddie
        • Graham Irvine
          ... using the default methods unaltered with generate RPC encoded envelopes. However this is Perl so you can manipulate those pretty easily to get it to do
          Message 4 of 4 , Oct 15, 2007
          • 0 Attachment
            bolasnenhumda wrote:
            > Hi all,
            >
            > I've started to use SOAP::Lite, and I have a bunch of questions:
            >
            > 1 - The default style used by SOAP::Lite is RPC encoded. Is this the
            > only style available? Am I able to use, for example, Document/literal,
            > or document/literal encoded (Ok, this is hard to get knowing the
            > specification for this is not open -_-).
            >

            using the default methods unaltered with generate RPC encoded envelopes.
            However this is Perl so you can manipulate those pretty easily to get it
            to do whatever you want. Everything is available to be changed without
            too much difficulty . Yes you will have to learn SOAP literal styles
            more that just a point a clicker would have to but thats no bad thing.

            Check out the soaplite website (or many previous posts here) for basic
            examples that will get you started. There are basically two or three
            techniques to construct your data that you need to learn then you are
            in business.

            > In case we have only RPC encoded style, is there any way to access
            > .Net web services, for example? What I mean is: is there a way of
            > accessing services which are not available in RPC encoded?
            >

            yes . On the microssoft MSDN site there is help to work with SOAP::Lite.
            However it is a lot easier to get Perl to work with .net than .net to
            work with Perl as .net if very rigid in this as it is in everything.

            > 2 - Does SOAP::Lite generates automatically WSDL for us, based on our
            > available web services? I read that it doesn't, but the post was from
            > 2001 ^_^. If not, do you know any perl module capable of doing it?

            No you need to write or generate the WSDL yourself and get your soap
            server endpoint (ideally) to return it. Again not as "quick" as a wizard
            , but then you learn nothing by doing that and therefore dont understand
            when it goes wrong or needs to go outside the box and be complex.
            WSDL looks scarey but its really not when you simplify it and weed out
            the bloated things that point and click software like to develop.

            Once you have that done .. you just need to expose it to clients to
            discover.

            A simple technique is do this. is before dispatching to the soap
            services put some thing like this in.

            if ($ENV{REQUEST_METHOD} eq "GET") {
            if (lc($ENV{QUERY_STRING} || "") eq "wsdl")
            {
            # user asked for WSDL.
            serve_wsdl();
            }
            else {
            #anything else sent as a CGI GET
            serve_html();
            }
            }

            sub serve_html
            {
            require CGI;
            my $q = CGI->new();
            my $response = "You need to send me a SOAP request!";
            my $c = length($response);
            print $q->header(-type=>'text/plain',
            -'Content-length'=>$c);

            print "$response";
            }

            sub serve_wsdl
            {

            my $wsdlfile = $config{"WSDLFILE"};

            open (WSDL,$wsdlfile);
            read (WSDL,$wsdl,50000,0);
            close(WSDL);

            require CGI;
            my $q = CGI->new();

            my $c = length($wsdl);

            print $q->header(-type=>'text/xml',
            -'Content-length'=>$c);
            print "$wsdl";
            }


            Then if you service proxy is

            http://myserver/webservice/myservice

            You can return the wsdl to users when they request

            http://myserver/webservice/myserver?WSDL

            which sort of mimics what .net servers do I beleive.

            Make your WSDL by other means and store it to a file location which is
            found in above case on path set by $config{"WSDLFILE"}.



            >
            > And that's all (for now :p)
            >
            > Thanks in advance,
            > Mario
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.