[
https://issues.apache.org/jira/browse/CXF-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255601#comment-13255601
]
Aki Yoshida commented on CXF-4241:
----------------------------------
Hi,
Okay. I suppose you have this problem for status 400 but not for 500.
Being aligned with Basic Profile[1], the soap fault is expected for status 500
in default by CXF.
To accept the soap fault for other error status like 400, you can set the
context property
org.apache.cxf.http.no_io_exceptions to true at your client endpoint.
In java, assuming port is your client proxy, you can get its request context
and set this property:
((BindingProvider)port).getRequestContext().put("org.apache.cxf.http.no_io_exceptions",
"true");
or in jaxws endpoint you can set the property within the jaxws:properties block.
<jaxws:properties>
<entry key="org.apache.cxf.http.no_io_exceptions" value="true"/>
...
regards, aki
1. http://www.ws-i.org/profiles/basicprofile-1.1-2004-08-24.html
> Http Conduit doesnt honor soap fault if server sends with 400 or 500 error
> --------------------------------------------------------------------------
>
> Key: CXF-4241
> URL: https://issues.apache.org/jira/browse/CXF-4241
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 2.4.6
> Environment: Linux;JDK 1.6.25
> Reporter: kanagamahendran Velusamy
> Labels: conduit, http
>
> We have a situation where server sends Soap-fault with 400(http error)
> however cxf throws exception saying that "400: Bad Request" without the
> details of the message.
> my point is, even though server sends 400 or 500, CXF should read the message
> and if it is soap fault,it should construct soap fault not just the exception
> . in this way we are not restricting server to send the soap fault in 200 OK
> level.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira