Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 55554 invoked from network); 28 Apr 2008 16:49:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Apr 2008 16:49:37 -0000 Received: (qmail 70335 invoked by uid 500); 28 Apr 2008 16:49:35 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 70283 invoked by uid 500); 28 Apr 2008 16:49:35 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 70272 invoked by uid 99); 28 Apr 2008 16:49:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Apr 2008 09:49:35 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Apr 2008 16:48:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25217234C11A for ; Mon, 28 Apr 2008 09:45:56 -0700 (PDT) Message-ID: <539809179.1209401156137.JavaMail.jira@brutus> Date: Mon, 28 Apr 2008 09:45:56 -0700 (PDT) From: "Xavi Drudis Ferran (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Created: (AXIS2-3771) POX literal fault is not detected by client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 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 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 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 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