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

RE: [soaplite] beginner's question/Is this a proper SOAP Envelope ?

Expand Messages
  • Keanan Smith
    Umm, kinda, it s *legal* but not what your documentation indicates it is. It s actually calling the function OpenSession with one paramater, an XML, the XML
    Message 1 of 1 , Feb 3, 2003
      Umm, kinda, it's *legal* but not what your documentation indicates it is.

      It's actually calling the function OpenSession with one paramater, an XML,
      the XML *contains* the information you're looking for, So you'll have to
      parse that first paramater with an XML parser to get at the actual data (Or,
      I suppose, you could cludge it with regexp's, but that's less stable :)

      -----Original Message-----
      From: vanvuure <marcel_van_vuure@...>
      Sent: Monday, February 03, 2003 7:00 AM
      To: soaplite@yahoogroups.com
      Subject: [soaplite] beginner's question/Is this a proper SOAP Envelope?


      I have an existing soap client and for that client, I have to build a
      soap server. I'm building the server in SOAP::Lite. The client has
      already been built in another language and the code can not be
      From the documentation I know that the client calls a function
      OpenSession on the server with 3 parameters: session_key username and
      Based on this information I wrote the soap server:

      #!perl -w

      use SOAP::Transport::HTTP;
      #use Demo;

      # don't want to die on 'Broken pipe' or Ctrl-C
      $SIG{PIPE} = $SIG{INT} = 'IGNORE';
      my $daemon = SOAP::Transport::HTTP::Daemon
      -> new (LocalPort => 80)
      -> dispatch_to('Demo')
      print "Contact to SOAP server at ", $daemon->url, "\n";

      package Demo;
      sub OpenSession {
      my ($class, $key, $name, $password) = @_;
      print("session_key = $key, username = $name, password =
      my $id = 2;

      When I tested it to work with the client, it doesn't seem to pick up
      the parameters correctly. Although the OpenSession subroutine is
      called on the server, the parameters have the wrong values:

      The first parameter ($key), has a piece of xml as a value and the
      other 2 parameters have no value at all. The print command gives:

      session_key = <?xml version="1.0" encoding="UTF-8" ?>
      <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-
      instance" xs
      <session key="marcel" />
      <user name="van vuure" password="holland" />
      , username = , password =

      The xml sent by the non-SOAP::Lite client to the server looks like

      <soap:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      <OpenSession xmlns="Demo">
      <xmlin xsi:type="xsd:string"><?xml version="1.0"
      encoding="UTF-8" ?>
      <session key="marcel" />
      <user name="van vuure"
      password="holland" />

      Is this a proper SOAP envelope? Am I not picking up the input
      parameters in the right way in the server? What shoud the server look
      like to receive this as a functioncall to OpenSession with parameters
      session key, user name and password?

      I hope somebody can help me with this.


      Marcel van Vuure

      To unsubscribe from this group, send an email to:

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.