Can someone help -
For the past few days I've been looking into a problem with a WS built
from WSDL using WSDL2Java, XMLBeans databindings and Axis2 deployed on
Weblogic 8.1.
I've been receiving SOAP messages, creating the response xmlbeans
object, and returning that to the client - this is where the problem has
been happening.
I've been getting the exception below from the StAXOMBuilder class and
specifically the next() method.
I've taken the AXIOM source code and modified it to add some debugging
code. What I found was that the data coming into the next() method was
actually an ATTRIBUTE and not one of the options that is included in the
case statement in the next() method. The exception below was coming from
the "default" part of the case statement which simply threw an
OMException.
I'm not that familiar with the AXIOM code, so I simply added in an extra
case statement to pick up an attribute - my code now works, and my SOAP
response is correctly formatted.
All I did to the next() method was add the following
Case XMLStreamConstants.ATTRIBUTE:
System.out.println......
Break;
If I display the attributeLocalName, it's shown as "nil"
I've written some test code outside WebLogic to simulate what my web
service is doing and I can't recreate it which made me thing that it's
server specific, so I tried on tomcat, and the problem is the same, so
it's not app server specific.
Have I done something wrong, or have I for some reason found a bug??
org.apache.axis2.AxisFault
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at
com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.in
vokeBusinessLogic(EXTSYS2CERSServiceTxMessageReceiverInOut.java:601)
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:960)
at
com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.to
Envelope(EXTSYS2CERSServiceTxMessageReceiverInOut.java:1545)
at
com.mcpplc.destin8.cers.soap.EXTSYS2CERSServiceTxMessageReceiverInOut.in
vokeBusinessLogic(EXTSYS2CERSServiceTxMessageReceiverInOut.java:210)
... 17 more