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

Re: [soaplite] Re: Element 'xmlProductString' can't be allowed in valid XML message. Died

Expand Messages
  • Paul Kulchenko
    Hi, David! ... Just a follow-up. You can force encoding of your XML fragment with this code: my $product = http://192.168.0.170:8080/mws/urn:Product.wsdl ; my
    Message 1 of 10 , Mar 18, 2002
    • 0 Attachment
      Hi, David!

      --- Duncan Cameron <dcameron@...> wrote:
      > I don't understand how SOAP::Lite did this as I thought it
      > automatically escaped the <>& characters.

      Just a follow-up. You can force encoding of your XML fragment with
      this code:

      my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
      my $msg = SOAP::Lite->service($product)
      ->validate('somesessionid',
      SOAP::Data->type(string => $long_line),
      'TEXT');

      > >> SOAP::Lite is fairly restricted in the WSDL that it can handle.
      That's the main reason for this effect. Will be fixed.

      Best wishes, Paul.

      __________________________________________________
      Do You Yahoo!?
      Yahoo! Sports - live college hoops coverage
      http://sports.yahoo.com/
    • Paul Kulchenko
      Hi, David! ... That s still a mystery for me. You should get this message ONLY if wsdl file specifies xmlProductString as an element name (which is
      Message 2 of 10 , Mar 18, 2002
      • 0 Attachment
        Hi, David!

        > I have deleted a lot of extraneous code for brevity. SOAP::Lite
        > generates this message
        >
        > Element 'xmlProductString' can't be allowed in valid XML message.
        > Died
        That's still a mystery for me. You should get this message ONLY if
        wsdl file specifies "xmlProductString" as an element name (which is
        incorrect), but I can't access the file to verify that. Let me know
        if you see some other reason.

        Best wishes, Paul.

        --- davidthewatson <davidthewatson@...> wrote:
        > I have the following code:
        >
        > use SOAP::Lite;
        > $file = 'data.xml' ;
        > open(INFO, "<$file" ) ;
        > @lines = <INFO> ;
        > close(INFO) ;
        > $long_line = join("\n", @lines);
        > my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
        > my $msg = SOAP::Lite->service($product)->validate
        > ('somesessionid',$long_line, 'TEXT');
        >
        > I have deleted a lot of extraneous code for brevity. SOAP::Lite
        > generates this message
        >
        > Element 'xmlProductString' can't be allowed in valid XML message.
        > Died
        >
        > when making the validate call. The server is running Glue 2.1 from
        > the mind electric. The second parameter where $long_line is being
        > passed is a SOAP string which has embedded XML in it. This works
        > with
        > a variety of clients including java, dotnet(C#), vbscript, etc. I'm
        >
        > not sure why the SOAP::Lite parser doesn't like the embedded XML
        > string. I assume there's a parsing issue with the tags but I'm not
        > sure if it can be escaped or whether there's a call I can make to
        > tell it to treat the string specially.
        >
        > Thanks,
        > David
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Yahoo! Sports - live college hoops coverage
        http://sports.yahoo.com/
      • davidthewatson
        ... Hi Paul: I tried your suggestion above today. It doesn t work either. The end result is that the server receives a null string. I ve also tried removing
        Message 3 of 10 , Mar 21, 2002
        • 0 Attachment
          --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
          > Just a follow-up. You can force encoding of your XML fragment with
          > this code:
          >
          > my $product = 'http://192.168.0.170:8080/mws/urn:Product.wsdl';
          > my $msg = SOAP::Lite->service($product)
          > ->validate('somesessionid',
          > SOAP::Data->type(string => $long_line),
          > 'TEXT');

          Hi Paul:

          I tried your suggestion above today. It doesn't work either. The end
          result is that the server receives a null string. I've also tried
          removing the XML declaration from the string being sent. That doesn't
          solve it either. I also tried a bit of replacement on the (typically
          escaped) characters. That doesn't seem to do it either. Not sure if
          there's anything else I should try.

          Thanks for all of your help.

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