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

Problem with the SOAP envelope generated by SOAPLite

Expand Messages
  • jpdurrios
    Hi, I just recieved an email from someone who tried my Web Service and he mentioned there was an error in the SOAP envelop returned. Here is part of my WSDL:
    Message 1 of 4 , Feb 11, 2002
    • 0 Attachment
      Hi,

      I just recieved an email from someone who tried my Web Service and
      he mentioned there was an error in the SOAP envelop returned.


      Here is part of my WSDL:

      <message name="stockquote_lasttradeResponse">
      <part name="Result" type="xsd:float" />
      </message>


      Instead, it's returning 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:stockquote_lasttradeResponse xmlns:namesp1="urn:Finance">
      <s-gensym3 xsi:type="xsd:float">6.10</s-gensym3>
      </namesp1:stockquote_lasttradeResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      Instead of a "Result" tag the Service returns a "s-gensym3" tag.

      Am I missing something?
      Can someone explain me what's the problem?

      Thank you,

      JP
    • Sam Tregar
      ... Perhaps you need to change: return $foo; To: return name(Result = $foo); For that to work you ll need a line like this after use SOAP::Lite : import
      Message 2 of 4 , Feb 11, 2002
      • 0 Attachment
        On Mon, 11 Feb 2002, jpdurrios wrote:

        > Instead of a "Result" tag the Service returns a "s-gensym3" tag.
        >
        > Am I missing something?

        Perhaps you need to change:

        return $foo;

        To:

        return name(Result => $foo);

        For that to work you'll need a line like this after "use SOAP::Lite":

        import SOAP::Data 'name';

        -sam
      • jpdurrios
        Hi sam, Thankyou for your email. I m trying to fix it, but it still doesn t work... Also, Do you know where this s-gensym3 tag comes from? I wonder if this
        Message 3 of 4 , Feb 11, 2002
        • 0 Attachment
          Hi sam,

          Thankyou for your email.
          I m trying to fix it, but it still doesn't work...

          Also, Do you know where this "s-gensym3" tag comes from? I wonder if
          this tag is used everytime the Web Service returns a value in the
          SOAP envelope.

          Here is my WSDL: http://www.durrios.com/Finance.wsdl

          Do you how I could publish the SOAP Envelopes everytime I use the
          Web service?

          thx,

          JP


          --- In soaplite@y..., Sam Tregar <sam@t...> wrote:
          > On Mon, 11 Feb 2002, jpdurrios wrote:
          >
          > > Instead of a "Result" tag the Service returns a "s-gensym3" tag.
          > >
          > > Am I missing something?
          >
          > Perhaps you need to change:
          >
          > return $foo;
          >
          > To:
          >
          > return name(Result => $foo);
          >
          > For that to work you'll need a line like this after "use
          SOAP::Lite":
          >
          > import SOAP::Data 'name';
          >
          > -sam
        • Sam Tregar
          ... Yes. If you don t name the data with the name() call I showed you then SOAP::Lite will choose a name like s-gensym3 . ... Sorry, I don t read WSDL. I
          Message 4 of 4 , Feb 11, 2002
          • 0 Attachment
            On Mon, 11 Feb 2002, jpdurrios wrote:

            > Also, Do you know where this "s-gensym3" tag comes from?

            Yes. If you don't name the data with the name() call I showed you then
            SOAP::Lite will choose a name like "s-gensym3".

            > Here is my WSDL: http://www.durrios.com/Finance.wsdl

            Sorry, I don't read WSDL. I haven't found much use for it yet!

            > Do you how I could publish the SOAP Envelopes everytime I use the
            > Web service?

            I don't understand the question. What do you mean by "publish"?

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