Hi, It's not the namespace mismatch, it's the localname mismatch. Per the annotation here @XmlElement(name="org.aaaa.schemas.spotradioorder.Transmission", namespace="uri:http://www.AAAA.org/schemas/spotRadioOrder") you really should send an xml using org.aaaa.schemas.spotradioorder.Transmission but not Transmission as element name
Freeman ------------- Freeman Fang FuseSource Email:[email protected] Web: fusesource.com Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: http://weibo.com/u/1473905042 On 2012-8-7, at 上午5:31, surfercherokee wrote: > Hello all, > > I'm getting an unmarshalling error. I am trying to use a web service where > the top level xml node is ReceiveXml which contains a Transmission node. > The transmission node will have a different namespace. > > WSDL: > > <s:schema elementFormDefault="qualified" > targetNamespace="urn:SpotBuySpot:InboundOrders-to-Reps"> > <s:element name="ReceiveXml"> > <s:complexType> > <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="xmlDoc"> > <s:complexType mixed="true"> > <s:sequence> > <s:any/> > </s:sequence> > </s:complexType> > </s:element> > </s:sequence> > </s:complexType> > </s:element> > > > My java class ReceiveXml has a class for XmlDoc which is supposed to hold > the Transmission node. I tried to change the namespace to correspond the > the soap call: > > public static class XmlDoc { > @XmlElement(name="org.aaaa.schemas.spotradioorder.Transmission", > namespace="uri:http://www.AAAA.org/schemas/spotRadioOrder") > protected List content; > > > > When I use the SoapUI, I get the following error message: > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Body> > <soap:Fault> > <faultcode>soap:Client</faultcode> > <faultstring>Unmarshalling Error: unexpected element > (uri:"http://www.AAAA.org/schemas/spotRadioOrder", local:"Transmission"). > Expected elements are > <{uri:http://www.AAAA.org/schemas/spotRadioOrder}org.aaaa.schemas.spotradioorder.Transmission></faultstring> > </soap:Fault> > </soap:Body> > </soap:Envelope> > > > Any help will be appreciated. > > Thanks. > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Unmarshal-error-tp5712088.html > Sent from the cxf-user mailing list archive at Nabble.com.
