axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavi Drudis Ferran (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3771) POX literal fault is not detected by client
Date Thu, 12 Jun 2008 12:06:45 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604501#action_12604501
] 

Xavi Drudis Ferran commented on AXIS2-3771:
-------------------------------------------

Sorry to have been so long without trying it. 

Today I tried to migrate to Axis 1.4 to see if this issue is indeed resolved, and it may be,
but 
I can't migrate because of a separate issue (AXIS2-3851). 

https://issues.apache.org/jira/browse/AXIS2-3851

I don't have time now to try to fix AXIS2-3851 and then try with the latest version. If I
can one day 
I'll tell you. 

Thank you very much. 

> POX literal fault is not detected by client 
> --------------------------------------------
>
>                 Key: AXIS2-3771
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3771
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.3
>         Environment: Debian etch. JVM 1.4 from blackdown (64 bits) 
>            Reporter: Xavi Drudis Ferran
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Minor
>
> Sorry if this is not a bug, I may well have misunderstood something. I tend to think
it's a bug because an exception 
> in the server does not reach the client when both use code generated by WSDL2Java, but
maybe what I'm trying can't be done. 
> I have to code a client for a webservice that answers with a xml response when accessed
through a GET with parameters. 
> The returned xml has a certain root element when things work and otherwise the root element
is <error description="..."/> 
> So I defined a wsdl for the web service with literal response and a literal fault that
describe the xml issued on 
> success and error respectively. 
> I generated a client and a server for tests (the real server is going to 
> be by a third partly, so I have to make my test server behave as close as
> the specification of the third party server as I can). The server seems to work as specified
(after some configuration tweaking for REST and namespacelessness). 
> The client works in case of success, but when the server skeleton throws the ERRORMessage
exception (generated by WSDL2Java) 
> an <error description="..."/> response gets to the client, and then the client
throws an exception like this: 
> java.lang.IllegalArgumentException: The MessageContext does not have an associated SOAPFault.
> 	org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:478)
> 	org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
> 	org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	...
> By a quick look at the code it would seem that because it's a REST client (POX, actually,
I think), the  OutInAxisOperationClient.handleResponse method has to make up an envelope it
didn't get, and calls 
> TransportUtils.createSOAPMessage(responseMessageContext);
> and with the generated envelope it somehow detects there's a fault and calls
>  Utils.getInboundFaultFromMessageContext(responseMessageContext);
> to throw the corresponding exception (which should be the ERRORMessage 
> generated by WSDL2Java). 
> But it seems to be unable to see it's an ERRORMessage the exception it should
> create and throw. 
> Might it be because TransportUtils.createSOAPMessage(responseMessageContext)
> calls (indirectly) createSOAPEnvelope with a document created from 
> the <error description="..."/> response, and so it treats the fault as the
> document, and later the getInboundFaultFromMessageContext cannot find 
> the fault because it has been mistakenly taken for the body ? 
> In other words, the code that parses a REST response in the client 
> does not seem (at first glance) to expect a literal fault as declared in 
> the wsdl when generating a fake envelope for the rest of axis2 to 
> treat as if it where a SOAP response. Should this be changed or 
> it's not a covered use case and so it should remain as is?.
> Sorry if I don't give enough detail, I thought of sending code, but 
> maybe it'd be best to build a simpler example than what I have (modifying
> the getVersion sample, or whatever), also helping to isolate the issue. 
> I may do it later this week if you think it's worthwhile. 
> I'm just sending this in order to know whether what I try to do 
> makes sense and should be further investigated or is just nonsense 
> and I should learn how to use Axis2 better. Wasn't sure whether I 
> should use JIRA or a mailing list, but thought we can close the bug if
> it's not one.  

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


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


Mime
View raw message