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

Re: [soaplite] SOAP::Lite <-> AllegroCommonLisp connection problem

Expand Messages
  • Byrne Reese
    Curious problem. To be honest - my hunch tells me that the Lisp client is not interpreting the request properly. First the way it is serializing the request
    Message 1 of 2 , Mar 22, 2004
    • 0 Attachment
      Curious problem.

      To be honest - my hunch tells me that the Lisp client is not
      interpreting the request properly. First the way it is serializing the
      request message indicates that the <myFunc> element belongs to the SOAP
      namespace. For example, these two XML fragments mean very different things:

      <ns1:foo xmlns:ns1="urn:NS1">
      <bar />
      </ns1:foo>

      Versus...

      <ns1:foo xmlns:ns1="urn:NS1">
      <ns2:bar xmlns:ns2="urn:NS2"/>
      </ns1:foo>

      Also, while not necessary, it is helpful for the client to specify
      types. For example, how is the server to know that for the following XML
      element:

      <foo>123</foo>

      The value needs to be serialized as an integer one-hundred-twenty-three
      or the string "123"? Not sure. But I digress.

      I am trying not to pass the buck, but because SOAP::Lite interoperates
      properly with so many other toolkits, my hunch tells me that the problem
      lies in the LISP client/server...

      Andrew Dolbey wrote:

      > Hi all,
      >
      > I'm trying to get a Perl-based SOAP::Lite client to communicate
      > successfully with an Allegro Common Lisp SOAP server. Even after lots
      > of implementation attempts, documentation-reading, google-searching,
      > etc., I have still thus far been unable to make a successful link
      > between the two. I'll lay out the scenario here, and maybe one of you
      > will have some ideas or hints about where things are going wrong.
      >
      > For now, I'm working with a very simple SOAP server that offers only
      > one function, called `myFunc', that takes two arguments: "arg1" takes an
      > int, and "arg2" takes a string. The function is looking for arguments
      > with these names and types. myFunc isn't part of a package or class, so
      > some of the scene isn't as clear for me is it is in the case of a
      > SOAP::Lite server.
      >
      > This is what the client-side SOAP::Lite set-up and call looks like:
      >
      > my $ret = SOAP::Lite
      > ->uri('http://aedarh-micron:8161/myFunc')
      > ->proxy('http://aedarh-micron:8161/soap')
      > ->myFunc(SOAP::Data->name("arg1" => 72070),
      > SOAP::Data->name("arg2" => "andreaBday"));
      >
      > I make this call from a bash shell on a Linux box. I also have an open
      > Lisp session running, where I get status messages from the Lisp SOAP
      > server. I have tracing turned on for both SOAP::Lite and the Lisp SOAP
      > server so that I can see what exactly the XML messaging looks like.
      >
      > The serialized message that the SOAP::Lite client sends out looks like this:
      >
      > <?xml version="1.0" encoding="UTF-8"?>
      > <SOAP-ENV:Envelope
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      > <SOAP-ENV:Body>
      > <namesp1:myFunc xmlns:namesp1="http://aedarh-micron:8161/myFunc">
      > <arg1 xsi:type="xsd:int">72070</arg1>
      > <arg2 xsi:type="xsd:string">andreaBday</arg2>
      > </namesp1:myFunc>
      > </SOAP-ENV:Body></SOAP-ENV:Envelope>
      >
      >
      > This is what the SOAP::Lite message looks like to the Lisp SOAP server:
      >
      > <?xml version=\"1.0\" encoding=\"UTF-8\"?>
      > <SOAP-ENV:Envelope
      > xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"
      > SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"
      > xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"
      > xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\"
      > xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\">
      > <SOAP-ENV:Body>
      > <namesp1:myFunc xmlns:namesp1=\"http://aedarh-micron:8161/myFunc\">
      > <arg1 xsi:type=\"xsd:int\">72070</arg1>
      > <arg2 xsi:type=\"xsd:string\">andreaBday</arg2>
      > </namesp1:myFunc>
      > </SOAP-ENV:Body></SOAP-ENV:Envelope>
      >
      > Pretty much the same, except for the backslash escapes on all the
      > quotation marks.
      >
      > By contrast, the serialized message that an Allegro Common Lisp SOAP
      > *client* sends looks like this:
      >
      > <?xml version=\"1.0\"?><soap:Envelope
      > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      > xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
      > xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
      > soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
      > <soap:Body>
      > <myFunc>
      > <arg1>72070</arg1>
      > <arg2>andreaBday</arg2>
      > </myFunc>
      > </soap:Body></soap:Envelope>
      >
      > The key difference that I see is the omission of a namespace specifier
      > for the function name, and type specifiers for the variable names:
      >
      >
      > Allegro Common Lisp:
      >
      > <myFunc>
      > <arg1>72070</arg1>
      > <arg2>andreaBday</arg2>
      > </namesp1:myFunc>
      >
      > vs.
      >
      > SOAP::Lite:
      >
      > <namesp1:myFunc xmlns:namesp1="http://aedarh-micron:8161/myFunc">
      > <arg1 xsi:type=\"xsd:int\">72070</arg1>
      > <arg2 xsi:type=\"xsd:string\">andreaBday</arg2>
      > </myFunc>
      >
      > Back on the perl side, in the bash shell, I get an error response from
      > the SOAP call. The message returned from the Allegro Common Lisp SOAP
      > API looks like this with +trace in SOAP::Lite:
      >
      > <?xml version="1.0"?><soap:Envelope
      > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      > xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
      > xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
      > soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
      > <soap:Body>
      > <soap:Fault>
      > <faultcode>client</faultcode>
      > <faultstring>Undefined method</faultstring>
      > </soap:Fault></soap:Body></soap:Envelope>
      >
      > It's flagged as a client-side fault, due to a call to an "Undefined method".
      >
      > By contrast, when I use the Lisp SOAP client to send the same kind of
      > request, but in the style of Allegro, the request is successful. Here
      > is a trace of the message sent by the Allegro Common Lisp SOAP server:
      >
      > <?xml version=\"1.0\"?><soap:Envelope
      > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
      > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      > xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
      > xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
      > soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
      > <soap:Body>
      > <my-function-response>The query was 72020 and andreaBday
      > </my-function-response>
      > </soap:Body></soap:Envelope>
      >
      >
      >
      > The biggest differences I see between the two arrangements are these:
      >
      > 1) The SOAP::Lite servers I have used successfully are actually Perl
      > packages, and as such, have package names I specify in the URI; the
      > Lisp function isn't directly part of any class or package.
      > 2) SOAP::Lite includes namespace specifiers for the function call
      > 3) SOAP::Lite includes type specifiers for the function arguments
      > 4) SOAP::Lite XML messages that include quotation marks lead to the
      > Lisp SOAP server escaping the quotation marks.
      >
      > So far as the last one goes, this uri specification:
      >
      > uri('http://aedarh-micron:8161/myFunc')
      >
      > is not the only value for `uri( )' that I have tried. I've also tried
      > ones like these:
      >
      > uri('http://aedarh-micron/myFunc')
      > uri('http://aedarh-micron:8161/soap)
      > uri('urn:http://aedarh-micron:8161/myFunc')
      >
      > But nothing I have tried has led to a successful resolution of the
      > problem. Somehow I'm getting a faultstring about an undefined method.
      > It seems a bit odd: the Allegro Lisp SOAP API does not include any
      > namespace or variable type identifiers, whereas the SOAP::Lite call
      > does. Either Allegro is demanding that the function and variables be
      > given with no namespace or type specification, or, perhaps more likely,
      > Allegro is having a problem interpreting the SOAP message produced by
      > SOAP::Lite. Does anybody have any idea where things might be going
      > wrong for me??
      >
      > Thanks for whatever help you can offer!
      >
      > Andy
      >
      >
      > ------------------------------------------------------------------------
      > *Yahoo! Groups Links*
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soaplite/
      >
      > * To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
    • Andrew Dolbey
      Hi all, I m trying to get a Perl-based SOAP::Lite client to communicate successfully with an Allegro Common Lisp SOAP server. Even after lots of
      Message 2 of 2 , Mar 23, 2004
      • 0 Attachment
        Hi all,
         
        I'm trying to get a Perl-based SOAP::Lite client to communicate successfully with an Allegro Common Lisp SOAP server.  Even after lots of implementation attempts, documentation-reading, google-searching, etc., I have still thus far been unable to make a successful link between the two.  I'll lay out the scenario here, and maybe one of you will have some ideas or hints about where things are going wrong.
         
        For now, I'm working with a very simple SOAP server that offers only one function, called `myFunc', that takes two arguments: "arg1" takes an int, and "arg2" takes a string.  The function is looking for arguments with these names and types.  myFunc isn't part of a package or class, so some of the scene isn't as clear for me is it is in the case of a SOAP::Lite server. 
         
        This is what the client-side SOAP::Lite set-up and call looks like:
         
        my $ret = SOAP::Lite
             ->uri('http://aedarh-micron:8161/myFunc')
             ->proxy('http://aedarh-micron:8161/soap')
             ->myFunc(SOAP::Data->name("arg1" => 72070),
             SOAP::Data->name("arg2" => "andreaBday"));
         
        I make this call from a bash shell on a Linux box.  I also have an open Lisp session running, where I get status messages from the Lisp SOAP server.  I have tracing turned on for both SOAP::Lite and the Lisp SOAP server so that I can see what exactly the XML messaging looks like.
         
        The serialized message that the SOAP::Lite client sends out looks like this:

        <?xml version="1.0" encoding="UTF-8"?>
        <SOAP-ENV:Envelope
        xmlns:SOAP-ENC="
        http://schemas.xmlsoap.org/soap/encoding/"
        SOAP-ENV:encodingStyle="
        http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENV="
        http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:xsi="
        http://www.w3.org/1999/XMLSchema-instance"
        xmlns:xsd="
        http://www.w3.org/1999/XMLSchema">
        <SOAP-ENV:Body>
        <namesp1:myFunc xmlns:namesp1="
        http://aedarh-micron:8161/myFunc">
           <arg1 xsi:type="xsd:int">72070</arg1>
           <arg2 xsi:type="xsd:string">andreaBday</arg2>
        </namesp1:myFunc>
        </SOAP-ENV:Body></SOAP-ENV:Envelope>


        This is what the SOAP::Lite message looks like to the Lisp SOAP server:

        <?xml version=\"1.0\" encoding=\"UTF-8\"?>
        <SOAP-ENV:Envelope
        xmlns:SOAP-ENC=\"
        http://schemas.xmlsoap.org/soap/encoding/\"
        SOAP-ENV:encodingStyle=\"
        http://schemas.xmlsoap.org/soap/encoding/\"
        xmlns:SOAP-ENV=\"
        http://schemas.xmlsoap.org/soap/envelope/\"
        xmlns:xsi=\"
        http://www.w3.org/1999/XMLSchema-instance\"
        xmlns:xsd=\"
        http://www.w3.org/1999/XMLSchema\">
        <SOAP-ENV:Body>
        <namesp1:myFunc xmlns:namesp1=\"
        http://aedarh-micron:8161/myFunc\">
           <arg1 xsi:type=\"xsd:int\">72070</arg1>
           <arg2 xsi:type=\"xsd:string\">andreaBday</arg2>
        </namesp1:myFunc>
        </SOAP-ENV:Body></SOAP-ENV:Envelope>

        Pretty much the same, except for the backslash escapes on all the quotation marks.

        By contrast, the serialized message that an Allegro Common Lisp SOAP *client* sends looks like this:

        <?xml version=\"1.0\"?><soap:Envelope
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
        xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
        soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
        <soap:Body>
        <myFunc>
           <arg1>72070</arg1>
           <arg2>andreaBday</arg2>
        </myFunc>
        </soap:Body></soap:Envelope>

        The key difference that I see is the omission of a namespace specifier for the function name, and type specifiers for the variable names:
         
         
           Allegro Common Lisp:
         
         <myFunc>
          <arg1>72070</arg1>
          <arg2>andreaBday</arg2>
         </namesp1:myFunc>
         
              vs.
         
           SOAP::Lite:
         
         <namesp1:myFunc  xmlns:namesp1="http://aedarh-micron:8161/myFunc">
          <arg1 xsi:type=\"xsd:int\">72070</arg1>
          <arg2 xsi:type=\"xsd:string\">andreaBday</arg2>
         </myFunc>

        Back on the perl side, in the bash shell, I get an error response from the SOAP call.  The message returned from the Allegro Common Lisp SOAP API looks like this with +trace in SOAP::Lite:

        <?xml version="1.0"?><soap:Envelope
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
        xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
        soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
        <soap:Body>
        <soap:Fault>
        <faultcode>client</faultcode>
        <faultstring>Undefined method</faultstring>
        </soap:Fault></soap:Body></soap:Envelope>
         
        It's flagged as a client-side fault, due to a call to an "Undefined method".

        By contrast, when I use the Lisp SOAP client to send the same kind of request, but in the style of Allegro, the request is successful.  Here is a trace of  the message sent by the Allegro Common Lisp SOAP server:

        <?xml version=\"1.0\"?><soap:Envelope
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
        xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
        soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
        <soap:Body>
          <my-function-response>The query was 72020 and andreaBday
              </my-function-response>
        </soap:Body></soap:Envelope>




        The biggest differences I see between the two arrangements are these:
         
          1) The SOAP::Lite servers I have used successfully are actually Perl packages, and as such, have package names I specify in the URI;  the Lisp function isn't directly part of any class or package.
          2) SOAP::Lite includes namespace specifiers for the function call
          3) SOAP::Lite includes type specifiers for the function arguments
          4) SOAP::Lite XML messages that include quotation marks lead to the Lisp SOAP server escaping the quotation marks.

        So far as the last one goes, this uri specification:
         
           uri('http://aedarh-micron:8161/myFunc')
         
        is not the only value for `uri( )' that I have tried.  I've also tried ones like these:
         
           uri('http://aedarh-micron/myFunc')
           uri('http://aedarh-micron:8161/soap)
           uri('urn:http://aedarh-micron:8161/myFunc')
         
        But nothing I have tried has led to a successful resolution of the problem.  Somehow I'm getting a faultstring about an undefined method.  It seems a bit odd:  the Allegro Lisp SOAP API does not include any namespace or variable type identifiers, whereas the SOAP::Lite call does.  Either Allegro is demanding that the function and variables be given with no namespace or type specification, or, perhaps more likely, Allegro is having a problem interpreting the SOAP message produced by SOAP::Lite.  Does anybody have any idea where things might be going wrong for me?? 
         
        Thanks for whatever help you can offer!
         
        Andy
         
      Your message has been successfully submitted and would be delivered to recipients shortly.