Return-Path: Delivered-To: apmail-ws-commons-dev-archive@locus.apache.org Received: (qmail 87001 invoked from network); 7 Nov 2006 23:03:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 23:03:15 -0000 Received: (qmail 39045 invoked by uid 500); 7 Nov 2006 23:03:25 -0000 Delivered-To: apmail-ws-commons-dev-archive@ws.apache.org Received: (qmail 39029 invoked by uid 500); 7 Nov 2006 23:03:25 -0000 Mailing-List: contact commons-dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commons-dev@ws.apache.org Delivered-To: mailing list commons-dev@ws.apache.org Received: (qmail 39012 invoked by uid 99); 7 Nov 2006 23:03:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 15:03:25 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 15:03:13 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3464F7142F6 for ; Tue, 7 Nov 2006 15:02:53 -0800 (PST) Message-ID: <1639159.1162940573212.JavaMail.jira@brutus> Date: Tue, 7 Nov 2006 15:02:53 -0800 (PST) From: "Davanum Srinivas (JIRA)" To: commons-dev@ws.apache.org Subject: [jira] Commented: (WSCOMMONS-122) AXIOMXPath throws exception when navigating on an OMElement with namespace prefixed elements In-Reply-To: <25005955.1162823258066.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/WSCOMMONS-122?page=comments#action_12447956 ] Davanum Srinivas commented on WSCOMMONS-122: -------------------------------------------- Works fine for me. Here's what i see when i run "run.bat" REQUEST = String RESPONSE = blah Here's the soap request captured by tcpmon: POST /axis2/services/SimpleService HTTP/1.1 SOAPAction: "urn:anonOutInOp" User-Agent: Axis2 Host: localhost:8080 Transfer-Encoding: chunked Content-Type: text/xml; charset=UTF-8 223 String 0 Here's the soap response captured by tcpmon: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=C8ADFF54CAD52CA6C4AD106013FC4C0C; Path=/axis2 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Tue, 07 Nov 2006 22:55:37 GMT 145 blah 0 -- dims > AXIOMXPath throws exception when navigating on an OMElement with namespace prefixed elements > -------------------------------------------------------------------------------------------- > > Key: WSCOMMONS-122 > URL: http://issues.apache.org/jira/browse/WSCOMMONS-122 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Reporter: Gul Onural > Priority: Blocker > Attachments: simpleclient.zip, simpleservice.zip > > > Hi, > I am trying to use AXIOMXPath to parse an OMElement, but I keep getting org.jaxen.UnresolvableException. Below I cut and paste my xml snippet, code and the exception. > Gul > xml snippet > ============================================= > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.somecompany.com CommonTypes.xsd"> > > String > > > > Code snippet > ============================================= > AXIOMXPath xpathExp = null; > String scheduleName = null; > String xpathScheduleName = "/tns:createSimpleXXX "; try { > xpathExp = new AXIOMXPath(xpathScheduleName); > OMElement selectedNode = > (OMElement)xpathExp.selectSingleNode(element); > }catch (JaxenException e) { > System.out.println(stack2string(e)); > } > Exception > =============================================== > org.jaxen.UnresolvableException: Cannot resolve namespace prefix 'tns' > at > org.jaxen.expr.DefaultNameStep.matches(DefaultNameStep.java:340) > at > org.jaxen.expr.DefaultNameStep.evaluate(DefaultNameStep.java:209) > at > org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:140 > ) > at > org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLocat > ionPath.java:113) > at > org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102) > at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:680) > at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:219) > at org.jaxen.BaseXPath.selectSingleNode(BaseXPath.java:240) > ... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org For additional commands, e-mail: commons-dev-help@ws.apache.org