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

Passing XML strings as arguments

Expand Messages
  • Don Seiler
    ... Hash: SHA1 Hullo all. I m writing a SOAP server (CGI), and some of the functions need to take in XML strings as arguments. However it looks like the SOAP
    Message 1 of 6 , Dec 30, 2005
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Hullo all.

      I'm writing a SOAP server (CGI), and some of the functions need to take
      in XML strings as arguments. However it looks like the SOAP server is
      removing the XML string entirely, so when I check in my function the
      entire parameter is just null (I get uninitialized warnings when trying
      to use it).

      If I just pass in a normal string like "foo" it works fine.

      If this is known and intended behavior, how can I pass in an XML string?

      FYI I'm calling this through a WSDL file. In the spec for this
      particular function I specify the XML parameter as xsd:string type.

      Both server and my test client are written in SOAP::Lite, but the
      eventual prod client will be flash.
      - --
      Don Seiler
      don@...

      Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041
      Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.2 (MingW32)

      iD8DBQFDth07dqxdovyH8EERAgwRAJ9Qu1t5KZtlC4vhLRlUr48Dlvi1kwCghem8
      LdMJ+xjOTY4G6IlVBf9Oo8c=
      =ZCD1
      -----END PGP SIGNATURE-----
    • Don Seiler
      ... Hash: SHA1 ... Forgot to mention that this is in SOAP::Lite 0.60. - -- Don Seiler don@seiler.us Public Key:
      Message 2 of 6 , Dec 30, 2005
      • 0 Attachment
        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1

        Don Seiler wrote:
        > Both server and my test client are written in SOAP::Lite, but the
        > eventual prod client will be flash.

        Forgot to mention that this is in SOAP::Lite 0.60.

        - --
        Don Seiler
        don@...

        Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041
        Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.2 (MingW32)

        iD8DBQFDth4VdqxdovyH8EERAhcvAJ9GU9UC/19M8lVxmkMt6e+zZg4WlQCgm9xX
        hYcH+TESWkCu3cxidt5r3w8=
        =ErHR
        -----END PGP SIGNATURE-----
      • Don Seiler
        ... Hash: SHA1 ... Re-pinging the list. Am I the only one trying to pass XML strings as arguments? - -- Don Seiler don@seiler.us Public Key:
        Message 3 of 6 , Jan 4, 2006
        • 0 Attachment
          -----BEGIN PGP SIGNED MESSAGE-----
          Hash: SHA1

          Don Seiler wrote:
          > I'm writing a SOAP server (CGI), and some of the functions need to take
          > in XML strings as arguments. However it looks like the SOAP server is
          > removing the XML string entirely, so when I check in my function the
          > entire parameter is just null (I get uninitialized warnings when trying
          > to use it).

          Re-pinging the list. Am I the only one trying to pass XML strings as
          arguments?

          - --
          Don Seiler
          don@...

          Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041
          Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041
          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.4.2 (MingW32)

          iD8DBQFDu/Y4dqxdovyH8EERAu5IAJwMfRRHCH/TMPqedcKpJu07xejYCwCdFPge
          3qkeTpK6dElWLGytNEMQ8ZI=
          =dFdw
          -----END PGP SIGNATURE-----
        • Byrne Reese
          Can you send to the list a code sample, and a trace of the request and response? That will help us to better understand the problem you are having and come up
          Message 4 of 6 , Jan 30, 2006
          • 0 Attachment
            Can you send to the list a code sample, and a trace of the request and
            response? That will help us to better understand the problem you are
            having and come up with a solution.

            Don Seiler wrote:
            > -----BEGIN PGP SIGNED MESSAGE-----
            > Hash: SHA1
            >
            > Don Seiler wrote:
            > > I'm writing a SOAP server (CGI), and some of the functions need to take
            > > in XML strings as arguments. However it looks like the SOAP server is
            > > removing the XML string entirely, so when I check in my function the
            > > entire parameter is just null (I get uninitialized warnings when trying
            > > to use it).
            >
            > Re-pinging the list. Am I the only one trying to pass XML strings as
            > arguments?
            >
            > - --
            > Don Seiler
            > don@...
            >
            > Public Key:
            > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041
            > <http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFC87F041>
            > Fingerprint: 0B56 50D5 E91E 4D4C 83B7 207C 76AC 5DA2 FC87 F041
            > -----BEGIN PGP SIGNATURE-----
            > Version: GnuPG v1.4.2 (MingW32)
            >
            > iD8DBQFDu/Y4dqxdovyH8EERAu5IAJwMfRRHCH/TMPqedcKpJu07xejYCwCdFPge
            > 3qkeTpK6dElWLGytNEMQ8ZI=
            > =dFdw
            > -----END PGP SIGNATURE-----
            >
            >
            > SPONSORED LINKS
            > Protocol analyzer
            > <http://groups.yahoo.com/gads?t=ms&k=Protocol+analyzer&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=-vNi0F9sGxz3wJiUypOlsA>
            > Ssl protocol
            > <http://groups.yahoo.com/gads?t=ms&k=Ssl+protocol&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=QcUDWIbIdXkmz4QSFhqszw>
            > Protocol converter
            > <http://groups.yahoo.com/gads?t=ms&k=Protocol+converter&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=8MMcEvfzdk5saYSJv-2g3g>
            >
            > Sip protocol
            > <http://groups.yahoo.com/gads?t=ms&k=Sip+protocol&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=X7aZ6IACnEQUtAC57u829w>
            > Protocol analysis
            > <http://groups.yahoo.com/gads?t=ms&k=Protocol+analysis&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=SI1LEHwb69y6gddZAv_Fuw>
            > Protocol
            > <http://groups.yahoo.com/gads?t=ms&k=Protocol&w1=Protocol+analyzer&w2=Ssl+protocol&w3=Protocol+converter&w4=Sip+protocol&w5=Protocol+analysis&w6=Protocol&c=6&s=120&.sig=aCiMFP0b3kFn96wqrZacGA>
            >
            >
            >
            > ------------------------------------------------------------------------
            > YAHOO! GROUPS LINKS
            >
            > * Visit your group "soaplite
            > <http://groups.yahoo.com/group/soaplite>" on the web.
            >
            > * 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/>.
            >
            >
            > ------------------------------------------------------------------------
            >
          • Don Seiler
            ... Sure. I have a function called SavePage(), taking 5 params. These are username, password, pageId, pageTitle, and pageContent. The pageContent field is
            Message 5 of 6 , Feb 1, 2006
            • 0 Attachment
              Byrne Reese wrote:
              > Can you send to the list a code sample, and a trace of the request and
              > response? That will help us to better understand the problem you are
              > having and come up with a solution.

              Sure. I have a function called SavePage(), taking 5 params. These are
              username, password, pageId, pageTitle, and pageContent. The pageContent
              field is going to be an XML string, something like "<foo><bar
              name="boo"/></foo>". When I call the function, I see the XML in the
              trace, but when I echo the parameter in the perl function, the string is
              empty.

              Here is the SavePageRequest definition in my WSDL file:

              <message name="SavePageRequest">
              <part name="username" type="xsd:string"/>
              <part name="password" type="xsd:string"/>
              <part name="id" type="xsd:string"/>
              <part name="title" type="xsd:string"/>
              <part name="content" type="xsd:string"/>
              </message>

              I'm using rpc/encoded style, fwiw.

              Here is the function in my perl class:

              sub SavePage {
              my $self = shift;
              my ($username, $password, $id, $pageTitle, $pageContent) = @_;
              my $logger = get_logger();
              $logger->debug("pageContent is $pageContent");

              my $response = "";
              return $response;
              }

              My log file shows this:

              pageContent is

              The trace shows the SOAP envelope for the SavePage call, with the XML:

              <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
              xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
              xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
              xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
              xmlns:xsd="http://www.w3.org/1999/XMLSchema"
              SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:SavePage
              xmlns:namesp1="uri:FooSoap"><username
              xsi:type="xsd:string">dts</username><password
              xsi:type="xsd:string">passdtsword</password><id
              xsi:type="xsd:string">3</id><title xsi:type="xsd:string">Test
              Title</title><content
              xsi:type="xsd:string"><foo><bar>hiho</bar></foo></content></namesp1:SavePage></SOAP-ENV:Body></SOAP-ENV:Envelope>

              As I said, normal strings and ints come through fine. Just this XML
              string that is a problem.

              I found it surprising that you should even ask for an example. Does
              this not happen to you? I'm on SOAP::Lite 0.60

              Don.

              >
              > Don Seiler wrote:
              >
              >>-----BEGIN PGP SIGNED MESSAGE-----
              >>Hash: SHA1
              >>
              >>Don Seiler wrote:
              >>
              >>>I'm writing a SOAP server (CGI), and some of the functions need to take
              >>>in XML strings as arguments. However it looks like the SOAP server is
              >>>removing the XML string entirely, so when I check in my function the
              >>>entire parameter is just null (I get uninitialized warnings when trying
              >>>to use it).
            • Don Seiler
              ... Guess what. I upgraded to 0.67 and it works fine now. Sorry about that! Don.
              Message 6 of 6 , Feb 1, 2006
              • 0 Attachment
                Don Seiler wrote:
                > I found it surprising that you should even ask for an example. Does
                > this not happen to you? I'm on SOAP::Lite 0.60

                Guess what. I upgraded to 0.67 and it works fine now.

                Sorry about that!

                Don.
              Your message has been successfully submitted and would be delivered to recipients shortly.