Doc/Lit/Bare with JAXB object but no ObjectFactory
--------------------------------------------------
Key: AXIS2-2310
URL: https://issues.apache.org/jira/browse/AXIS2-2310
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Reporter: Davanum Srinivas
Web Service looks like this.
==============================================================
@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.BARE)
public class myEchoWebService {
@WebMethod(operationName="helloString2", action="urn:HelloString2")
@WebResult()
public String hello2(Name name2) {
return name2.toString();
}
}
==============================================================
Here's a sample soap request.
==============================================================
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns3:helloString2
xmlns:ns3="http://server.webresult1.webresult/">
<firstName>abc</firstName>
<lastName>def</lastName>
</ns3:helloString2>
</soapenv:Body>
</soapenv:Envelope>
==============================================================
We get an jaxb unmarshalexception below:
==============================================================
[javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://server.webresult1.webresult/", local:"helloString2"). Expected
elements are <{http://server.webresult1.webresult/}NameException>]
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:395)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:304)
at
org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl.unmarshalByElement(JAXBBlockImpl.java:273)
at
org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._getBOFromReader(JAXBBlockImpl.java:111)
at
org.apache.axis2.jaxws.message.impl.BlockImpl.getBusinessObject(BlockImpl.java:144)
at
org.apache.axis2.jaxws.message.impl.XMLSpineImpl._getBlockFromOMElement(XMLSpineImpl.java:485)
at
org.apache.axis2.jaxws.message.impl.XMLSpineImpl.getBodyBlock(XMLSpineImpl.java:315)
at
org.apache.axis2.jaxws.message.impl.XMLPartBase.getBodyBlock(XMLPartBase.java:502)
at
org.apache.axis2.jaxws.message.impl.MessageImpl.getBodyBlock(MessageImpl.java:456)
at
org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.getPDElements(MethodMarshallerUtils.java:238)
at
org.apache.axis2.jaxws.marshaller.impl.alt.DocLitBareMethodMarshaller.demarshalRequest(DocLitBareMethodMarshaller.java:143)
==============================================================
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]