I'm working with a web service that someone else has designed and I have to host one or two operations.
I'm using AXIS2 & XMLBeans databindings. I've got one operation in my *skeleton class which returns a complex type. I've set the object up correctly in my skeleton class, and if you invoke the .xmlText method, you get correctly formatted XML and I can also get values correctly from the XMLBeans objects. The problem comes though when this is returned through AXIS to the client - the XML that gets returned has no data in it and simply contains the text "unknown" - but looking closer, it's an AxisFault that's returned not the response I expect. I've done some digging and found some options in the axis2.xml which gives me more details on the exception I'm getting. Would anyone be able to suggest what I need to do to fix this? Dumping the XML just prior to this exception shows and it all looks ok. <xml-fragment xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><typ:CERS2EXTSYS_H azmat_Request_Ack xmlns:typ="urn:hazreq/types"><typ:ack_msg CERSRefId="12736383783" StatusCode="Ok" StatusMessage="Message Processed Succesfully!"/></typ:CERS2EXTSYS_Hazmat_Request_Ack></xml-fragment> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body> <soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown </faultstring><detail><Exception>org.apache.axis2.AxisFault
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
 at com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.in vokeBusinessLogic(EXTSYS2CERSServiceTxMessageReceiverInOut.java:599)
 ; at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine ssLogic(AbstractInOutSyncMessageReceiver.java:42)
 at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessa geReceiver.java:96)
 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
 at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques t(HTTPTransportUtils.java:275)
 at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java:1077)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:465)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:348)
 at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java:7047)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu bject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121 )
 at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl etContext.java:3902)
 at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. java:2773)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
 Caused by: org.apache.axiom.om.OMException
 at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:2 33)
 at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocu mentImpl.java:130)
 at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOM Builder.java:359)
 at com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.to OM(EXTSYS2CERSServiceTxMessageReceiverInOut.java:947)
 at com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.to Envelope(EXTSYS2CERSServiceTxMessageReceiverInOut.java:1522)
 at com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.in vokeBusinessLogic(EXTSYS2CERSServiceTxMessageReceiverInOut.java:208)
 ; ... 17 more
 </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> ]