You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Amitesh Pandya <am...@gmail.com> on 2006/05/16 13:36:33 UTC

Exception in returning SOAP Fault.

Hi,
I'm currently working on project and we are using Axis2 + Sandesha2
(Both Version 1.0) for the WS-RM.

One of my requirements is to return a SOAP Fault after the validation fails.

I've created the service using WSDL2Java. The service works fine.
But when I try to throw an exception (Axis Fault) from the generated
"Skeleton" I get another Axis exception.

I looked into it and it seems to be a problem with the AXIOM.
The real problem happens when I try to call

inMessage.getEnvelope().getHeader()

Actually this method is called in the "AxisEngine" which is causing
all the troubles.

Please let me know if this is the known problem or If I'm missing something.

Kindly suggest what is the best way of sending the Custom SOAP Fault.

Your response to this query is greatly appreciated.

Thanks in advance
Amitesh

Please find the attached Stacktrace:

##################################################

[16/05/06 11:22:49:505 BST] 00000035 SystemErr     R
org.apache.axiom.om.OMException
	at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
	at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
Code))
	at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
	at uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
	at org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
	at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
	at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
	at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

 The from the

RE: Exception in returning SOAP Fault.

Posted by Derek <de...@crc-corp.com>.
Take a look at http://issues.apache.org/jira/browse/AXIS2-919. It seems like
it might be the same issue.

Derek

> -----Original Message-----
> From: JayG [mailto:jay.gillibrand@gmail.com] 
> Sent: Thursday, July 06, 2006 11:18 AM
> To: axis-user@ws.apache.org
> Subject: Re: Exception in returning SOAP Fault.
> 
> 
> 
> I'm having the same problem. I can return values from the 
> generated skeleton code, but trying to throw an excepion 
> causes an OMException. The exception I'm throwing was created 
> by wsdl2java and maps to the fault I declared in the WSDL. It 
> looks like it should be very straighforward (the exception 
> was already created and declared for me, I'm just newing one 
> and throwing it), but it just doesn't work. My stack trace 
> looks slightly different.
> 
> org.apache.axiom.om.OMException
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(O
> MElementImpl.java:265)
> 	at
> org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasN
> ext(OMChildrenQNameIterator.java:75)
> 	at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithN
> ame(OMElementImpl.java:222)
> 	at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOA
> PEnvelopeImpl.java:76)
> 	at
> org.apache.axis2.engine.AxisEngine.createFaultMessageContext(A
> xisEngine.java:183)
> 	at
> org.apache.axis2.transport.http.AxisServlet.handleFault(AxisSe
> rvlet.java:168)
> 	at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet
> .java:153)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> ...
> -- 
> View this message in context: 
> http://www.nabble.com/Exception-in-returning-SOAP-Fault.-tf162
6630.html#a5205008
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Exception in returning SOAP Fault.

Posted by JayG <ja...@gmail.com>.
I'm having the same problem. I can return values from the generated skeleton
code, but trying to throw an excepion causes an OMException. The exception
I'm throwing was created by wsdl2java and maps to the fault I declared in
the WSDL. It looks like it should be very straighforward (the exception was
already created and declared for me, I'm just newing one and throwing it),
but it just doesn't work. My stack trace looks slightly different.

org.apache.axiom.om.OMException
	at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
	at
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java:75)
	at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
	at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
	at
org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
	at
org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
...
-- 
View this message in context: http://www.nabble.com/Exception-in-returning-SOAP-Fault.-tf1626630.html#a5205008
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org