Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 58192 invoked from network); 18 Jan 2005 15:42:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Jan 2005 15:42:47 -0000 Received: (qmail 39740 invoked by uid 500); 18 Jan 2005 15:42:23 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 39659 invoked by uid 500); 18 Jan 2005 15:42:22 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 39561 invoked by uid 99); 18 Jan 2005 15:42:21 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gatekeeper.volvo.com (HELO gatekeeper.volvo.com) (204.235.196.33) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 18 Jan 2005 07:42:19 -0800 Received: from vsgso1.it.volvo.com (vsgso1.it.volvo.com [204.156.74.10]) by gatekeeper.volvo.com (8.12.10/8.12.10) with ESMTP id j0IFgF31023891 for ; Tue, 18 Jan 2005 10:42:15 -0500 (EST) Received: from vwall1.it.volvo.com (localhost.localdomain [127.0.0.1]) by vsgso1.it.volvo.com (8.11.6/8.11.6) with ESMTP id j0IFgFX31271 for ; Tue, 18 Jan 2005 10:42:15 -0500 Received: from [157.171.39.68] (localhost [127.0.0.1]) by vwall1.it.volvo.com (8.11.6/8.11.0/volvo.se) with ESMTP id j0IFgEj12344 for ; Tue, 18 Jan 2005 10:42:14 -0500 (EST) Message-ID: <41ED2E61.10101@volvo.com> Date: Tue, 18 Jan 2005 10:42:25 -0500 From: Kevin Colussi User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 NETSCAPE 7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: really stumped... messageContext.getOperation() = null References: <41E406C3.4070801@volvo.com> In-Reply-To: <41E406C3.4070801@volvo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is just a follow up on what I found.... The OperationDesc in the MessageContext will be null when: 1) The deployed interface/impl has over loaded methods. 2) When the client envelope is well formed (ie SAX parser is happy) but the method the client is trying to invoke doesn't exist. So I did find a problem where the method was over loaded and that fixed one of my problem.... However, I still had intermittent problems w/ the MessageContext.getOperation() returning null for some calls... So i figured out this and it seems to be working... =========== snip ===================================== String operationName = ""; try { Iterator i = messageContext.getCurrentMessage(). getSOAPEnvelope().getBody().getChildElements(); while (i.hasNext()) { try { RPCElement o= (RPCElement) i.next(); operationName = o.getMethodName(); break; } catch (ClassCastException e) { } } if (operationName.equals("")) { throw new Exception("Invalid request. Only RPC is supported."); } } catch (NullPointerException ne) { throw new Exception( "Problem getting child elements: " + ne.toString()); } catch (SOAPException e) { throw new CallerIdException(e.toString()); } System.out.println("operationName = " + operationName); =========== snip ===================================== Hope this helps someone else... I would still like to see how others are getting the calling method from the MessageContext object... Cheers, -- Kevin Kevin Colussi wrote: > Hello, > > I have been running Axis 1.1 for a while... With a handler > that calls messageContext.getOperation() to log the client > method request... The service runs in a WAS 5.1 env on AIX... > > Out of the blue I start getting null pointers from the > handler... I traces it down this line: > > public void invoke(MessageContext messageContext) throws AxisFault { > ............ > String name = messageContext.getOperation().getName(); > ............ > } > > So I started searching.... Sure enough the getOperation() returns > null from an Axis test client and JMeter script... In the debugger > I can see the AxisServer.class and the msgContext in this line: > > setCurrentMessageContext(msgContext); > > whose operation is null.... huh? There are other services deployed > in this same container that use the same handler just fine..... > > The Axis JavaDoc says it's ok for the messageContext.getOperation() to > return null.... If that is the case how does the Axis servlet know > which method to call in the service class implementation? Should I be > using something other than messageContext.getOperation() to get the > method the client is calling? > > Thanks a ton for any advise.... > -- Kevin > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kevin Colussi Volvo IT North America Senior Web Developer Telephone: 336-393-2178 Fax: 336-393-2300 E-mail: kevin.colussi@volvo.com Office Hours: 6:00am - 3:00pm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~