Perhaps there's more going on here than is clear on the surface, but in XML '<' must be escaped (typically as '<') within text content. '>', however, need not be escaped. Often it's escaped using '>' just for symmetry. Changing the serialization from '>' to '>' makes no difference whatsoever to the infoset (information content) of the document.
Also, at the infoset level, <Value> has no element children - it's a string, which is obvious from inspection, and also declared as such using xsi:type. In this case the string value happens to look like it might be parsed as XML. If you want it parsed as XML, you typically have to pass it to an XML parser yourself - there's nothing at the XML level to indicate that this is string-escaped XML. The typical reason for passing XML as a string in this manner is that you want it transmitted even in the case where it's not well-formed (e.g. plain old HTML). If you can guarantee this <Table> is always well-formed, you should consider changing the content model of <Value> in the schema to be a <Table> element within the service so it gets parsed at the same time as the rest of the message. Jonathan Marsh - http://www.wso2.com - http://auburnmarshes.spaces.live.com > -----Original Message----- > From: Sanjiva Weerawarana [mailto:[EMAIL PROTECTED] > Sent: Monday, October 30, 2006 9:25 PM > To: [EMAIL PROTECTED] > Cc: axis-dev@ws.apache.org > Subject: Re: [axis2] bad xml > > Simple test case also please Tony? :) > > Sanjiva. > > On Mon, 2006-10-30 at 17:35 -0500, Davanum Srinivas wrote: > > JIRA please? > > > > thanks, > > dims > > > > On 10/30/06, Tony Dean <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > The following SOAP is sent from .NET to a > org.apache.axis2.receivers.RawXMLINOutMessageReceiver Axis2 endpoint: > > > > > > POST /axis2/services/myService HTTP/1.1 > > > User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client > Protocol 2.0.50727.42) > > > VsDebuggerCausalityData: > uIDPoy26NIt2oGVMu3AaAaVfY/EAAAAAtJkH+jUVSkSoJtku7vQ/4n/vP3Qd2/BFs7BqUl9s3G > UACAAA > > > SOAPAction: "" > > > Host: d4639:8080 > > > Content-Type: multipart/related; type="application/xop+xml"; > boundary=--MIMEBoundary632978239375477793; > start="<[EMAIL PROTECTED]>"; start-info="text/xml; > charset=utf-8" > > > Content-Length: 2018 > > > Expect: 100-continue > > > Connection: Keep-Alive > > > > > > > > > ----MIMEBoundary632978239375477793 > > > content-id: <[EMAIL PROTECTED]> > > > content-type: application/xop+xml; charset=utf-8; type="text/xml; > charset=utf-8" > > > content-transfer-encoding: binary > > > > > > <soap:Envelope xmlns:xop="http://www.w3.org/2004/08/xop/include" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- > wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis- > open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility- > 1.0.xsd"><soap:Header><wsa:Action></wsa:Action><wsa:MessageID>urn:uuid:319 > 0bf5b-4944-4d5f-8362- > fed2fdaf294c</wsa:MessageID><wsa:ReplyTo><wsa:Address>http://schemas.xmlso > ap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:ReplyTo><ws > a:To>http://d4639:8080/axis2/services/myService</wsa:To><wsse:Security><ws > u:Timestamp > > > wsu:Id="Timestamp-444822f9-5e62-401d-9537- > 85bff44e5248"><wsu:Created>2006-10- > 30T21:52:17Z</wsu:Created><wsu:Expires>2006-10- > 30T21:57:17Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><s > oap:Body><copyintoout > xmlns="http://tempuri.org/myService"><parameters><parm1><String>hi</String > ></parm1><parm2><String>value1</String></parm2><parm3><Int>300</Int></parm > 3><parm4><Int>200</Int></parm4><parm5><Double>14.5</Double></parm5><parm6> > <Double>100</Double></parm6><parm7><Date>2006-10- > 13</Date></parm7><parm12><Date>13:30:00.0000000- > 05:00</Date></parm12><parm14><Color r="3" g="2" b="1" > /></parm14><parm15><String>hi15</String></parm15><parm16><IntegerRange > minValue="78" maxValue="89" /></parm16><parm17><Date>2006-10- > 30</Date></parm17></parameters><streams><instream><Value > xsi:type="xsd:string"><TABLE><InData><col1>1</col1> > ;<col2>2</col2></InData></TABLE></Value></instream > ></streams></copyintoout></soap:Body></soap:Envelope> > > > ----MIMEBoundary632978239375477793-- > > > > > > > > > Notice that .NET escaped the contents of the <Value> element. > > > > > > <Value > xsi:type="xsd:string"><TABLE><InData><col1>1</col1> > ;<col2>2</col2></InData></TABLE></Value> > > > > > > When I receive the contents of the <Value> element at runtime, I see > that Axis2 has the following content: > > > > > > <Value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:type="xsd:string"><TABLE><InData><col1>1</col1><col2>2& > lt;/col2></InData></TABLE></Value> > > > > > > > > > Notice that < is still escaped, but the > are unescaped. When I > ask the Axis2 engine for <Value> children, it thinks that it has none. > <TABLE> should be its one and only child element. > > > > > > Can someone explain what's going on here? Why < remains escaped as > < and > are unescaped. > > > > > > Thanks. > > > > > > Tony Dean > > > SAS Institute Inc. > > > 919.531.6704 > > > [EMAIL PROTECTED] > > > > > > SAS... The Power to Know > > > http://www.sas.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service > Developers) > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]