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

843Re: [soaplite] A continuation of the passing XML as string discussion..

Expand Messages
  • Paul Kulchenko
    Sep 20, 2001
    • 0 Attachment
      Hi, Jean-Jack!

      > I am hoping to do everything server-side so I don't have to do
      > anything
      > manual at the client side - does anyone have a cookbook example how
      > to use
      > an xml blob (including PI's) without the need for decoding (in the
      > event of absence of the XML::Parser module) ?
      You can always do base64 encoding, which will work with or without
      XML::Parser:

      return SOAP::Data->type(base64 => 'my XML fragment here');

      To use XML::Parser::Lite you can also override as_string method and
      provide your own decoding inside it. In this case your application
      will stay clean and you can do it only when XML::Parser is not
      available. Let me know if you need more info on how to do that.

      Best wishes, Paul.

      --- "Jean-Jack M. Riethoven" <pow@...> wrote:
      >
      > Greetings,
      >
      > I have read the discussion on passing XML in strings with great
      > interest.
      > We are doing the same with our server, sending a blob of XML over
      > the wire.
      >
      > This would all work perfectly if everyone has XML::Parser. When
      > falling
      > back on XML::Parser::Lite the %lt; are obviously not encoded back
      > properly
      > yet (see docs).
      >
      > I have been looking at the other methods that were suggested:
      >
      > 1. return SOAP::Data->type(xml => $xmlblob)
      >
      > 2. the use of <![CDATA[..]]>
      >
      > When trying to do 1. (my preferred method), I get warnings from the
      > parser:
      >
      > xml processing instruction not at start of external entity at line
      > 1,
      > column 426, byte 426 at
      > /sw/common/share/perl/site-perl/5.00503/alpha-osf1/XML/Parser.pm
      > line 185
      >
      > Bascially, my $xmlblob is a fully valid and well-formed piece of
      > xml,
      > including the <?xml ?> start. Removing the first line warns about
      > another
      > processing instruction <?format DECIMAL=".">, removing that one
      > warns about
      > the <!DOCTYPE..> stuff.
      > The Doctype stuff is required for the validation at the other side.
      >
      >
      > The instructions on 2 were not completely clear to me, but I tried
      > several
      > forms at the server side:
      >
      > return "<![CDATA[" . $xmlblob . "]]>"
      > return SOAP::Data->type(xml => ("<![CDATA[" . $xmlblob . "]]>"))
      > (or with
      > string as type)
      >
      > etc.. These didn't seem to work as well (still < and <![CDATA
      > tags still
      > in output.
      >
      >
      > I am hoping to do everything server-side so I don't have to do
      > anything
      > manual at the client side - does anyone have a cookbook example how
      > to use
      > an xml blob (including PI's) without the need for decoding (in the
      > event of
      > absence of the XML::Parser module) ?
      >
      > With kind regards,
      >
      > --
      > drs. Jean-Jack M. Riethoven
      >
      > EMBL Outstation - Hinxton pow@... ICQ#: 3433929
      > European Bioinformatics Institute Phone: (+44) 1223 494635
      > Wellcome Trust Genome Campus Fax : (+44) 1223 494468
      > Hinxton, Cambridge CB10 1SD URL :
      > http://industry.ebi.ac.uk/
      > UNITED KINGDOM
      >
      > Need to find bioinformatics or molecular biology web sites or
      > resources?
      > Use BioWurld at http://www.ebi.ac.uk/biowurld
      >
      >
      >
      >
      > 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/
      >
      >


      __________________________________________________
      Terrorist Attacks on U.S. - How can you help?
      Donate cash, emergency relief information
      http://dailynews.yahoo.com/fc/US/Emergency_Information/
    • Show all 7 messages in this topic