Hi All,
I am using latest JiBX downloaded from
http://kent.dl.sourceforge.net/sourceforge/jibx/jibx-rc0.zip.
When I compile my binding.xml I am getting below error. Can anyone
please suggest what am I missing here. I guess the problem is because
of the utf-16 encoding declaration in the input.xml. Is utf-16
encoding supported by JiBX RC0 ? Please suggest ...
Error
-------
Error parsing document (line 1, col 1)
org.xmlpull.v1.XmlPullParserException: only whitespace content allowed
before start tag and not \u3c3f (position: START_DOCUM
ENT seen \u3c3f... @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1542)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1418)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1137)
at
org.jibx.runtime.impl.UnmarshallingContext.toStart(UnmarshallingContext.java:505)
at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2508)
at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2675)
input.xml that I am trying to deserialize
------------------------------------------
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope 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">
<soap:Body>
<getDummyBean xmlns="http://ws.as.com/wsdl/typesws">
<VOILA>
<ns1:j
xmlns:ns1="http://ws.as.com/schema/typesws">100</ns1:j>
<ns2:st
xmlns:ns2="http://ws.as.com/schema/typesws">ram</ns2:st>
<ns3:i
xmlns:ns3="http://ws.as.com/schema/typesws">99</ns3:i>
</VOILA>
</getDummyBean>
</soap:Body>
</soap:Envelope>
binding.xml
-----------------
<binding>
<namespace prefix="typews" uri="http://ws.as.com/schema/typesws"
default="elements"/>
<namespace prefix="soap" uri="http://schemas.xmlsoap.org/soap/envelope/" />
<namespace prefix="wsdl" uri="http://ws.as.com/wsdl/typesws" />
<mapping name="Envelope" class="DummyBean"
ns="http://schemas.xmlsoap.org/soap/envelope/">
<structure name="Body"
ns="http://schemas.xmlsoap.org/soap/envelope/">
<structure name="getDummyBean"
ns="http://ws.as.com/wsdl/typesws">
<structure name="VOILA"
ns="http://ws.as.com/wsdl/typesws">
<value name="j" field="j" />
<value name="st" field="st"/>
<value name="i" field="i"/>
</structure>
</structure>
</structure>
</mapping>
</binding>
Thanks & Regards,
Kumar.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users