cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2266) Problem with one-way operation - CXF cannot send fault message due to IOException
Date Mon, 08 Jun 2009 14:42:08 GMT

     [ https://issues.apache.org/jira/browse/CXF-2266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2266.
------------------------------

       Resolution: Won't Fix
    Fix Version/s: Invalid


This was actually a bug in 2.0.5.   According to specs (JAX-WS spec, SOAP spec, WSDL spec,
and WS-I Basic Profile), one way operations CANNOT send a fault back to the client.    All
the client can get is a notice from the transport that the message was delivered or not. 


For truely asyncronous transports like JMS, there is physically no way to get a fault back
to the client.   For a one way, the client would just post the message to the JMS queue and
move on to other things.   The client could have even shutdown and be completely disconnected.
  

Anyway, this is working as designed. If you need to get any information back from the server,
you need to use a two way operation.   That CAN be a "void" return message, but it does need
to be two way.

> Problem with one-way operation - CXF cannot send fault message due to IOException 
> ----------------------------------------------------------------------------------
>
>                 Key: CXF-2266
>                 URL: https://issues.apache.org/jira/browse/CXF-2266
>             Project: CXF
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: 2.2
>         Environment: Windows XP/ Tomcat 6.0.18
>            Reporter: Przemek Gadomski
>             Fix For: Invalid
>
>
> I created web service with one-way operation, using wsdl2java (CXF 2.2).
> CXF does not generate fault message in case of fault  (e.g. when it is invoked with wrong
message (according to XSD))
> Instead I'm getting HTTP 500 on client side and exception with following stack trace
on Tomcat console:
> 2009-06-08 09:01:11 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: cvc-datatype-valid.1.2.1: '2009-32-12'
is not a valid value for 'dateTime'. 
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:622)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:527)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:108)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:102)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
> 	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:337)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:182)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:163)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '2009-32-12' is not a valid
value for 'dateTime'.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:425)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:339)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:607)
> 	... 24 more
> Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '2009-32-12' is not
a valid value for 'dateTime'.
> 	at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
> 	at com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(ErrorHandlerAdaptor.java:104)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
> 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3113)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3025)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2178)
> 	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:814)
> 	at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.endElement(ValidatorHandlerImpl.java:345)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.endElement(ValidatingUnmarshaller.java:94)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:250)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:214)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 26 more
> 2009-06-08 09:01:11 org.apache.cxf.transport.http.AbstractHTTPDestination flushHeaders
> WARNING: Response object is null
> 2009-06-08 09:01:11 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:283)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
> 	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:337)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:182)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:163)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.IOException: Response object is null
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:476)
> 	at org.apache.cxf.transport.http.AbstractHTTPDestination$WrappedOutputStream.close(AbstractHTTPDestination.java:541)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 23 more
> It works correctly with two-way operation (correct fault message appears) so I think
that problem is only connected with one-way operation.
> I build the same service with CXF 2.0.5 incubator and fault in one-way operation is returned
properly.
> I'm using SOAP UI 2.5.1 for testing web services.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message