[MOBY-dev] XML elements into serviceNote get scaped

Martin Senger martin.senger at gmail.com
Tue May 15 21:47:43 UTC 2007


> I've suffered these problems in the past with Java XML...


Yes, me too. And so far I always found that the problem was  on the service
side.  As it is here (see below).  Was this service generated by Moses?
Because if yes then it is also my problem :-)

The XML returned by the service in question is wrongly escaped. This is what
is on -the-wire:

...
<result xsi:type="xsd:string">&lt;?xml version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;
&lt;moby:MOBY xmlns:moby=&quot;http://www.biomoby.org/moby&quot;&gt;
  &lt;moby:mobyContent&gt;
    &lt;moby:serviceNotes&gt;&amp;lt;moby:mobyException
severity=&quot;2&quot; &amp;gt;
...

The beginning is as it should be: &lt;moby:MOBY...

But the service notes are double-escaped - because the ampersand which is
the part of the construct "&lt;" is again escaped so we get wrongly "
&gt;&amp;lt;moby:mobyException". And this is what the service sent over the
network (I caught it using a TCP monitor, not the Dashboard or other tool
that may already fiddle with the raw data).

Regards,
Martin


-- 
Martin Senger
   email: martin.senger at gmail.com
   skype: martinsenger



More information about the MOBY-dev mailing list