[jdom-interest] Error in parsing wsdl file using jdom

Madhuraj S V svmadhuraj at gmail.com
Mon Aug 8 05:56:30 PDT 2005

 I am a newbie to JDom. 
 I am trying a parse a wsdl file named CalculatorService to get the value of 
the *message* attribute of *input* element which happens to be the child of 
*operation *element. 
i created a Xpath instance for */definitions/portType/operation[@name 
="add"] *
but when i say *xpath.selectNodes() *it returns empty list even though it 
has element with the given value
  please find the code snippet i used 
 StringBuffer sb = new StringBuffer();
sb.append("/definitions/portType/operation[@name = \"");
Document doc = builder.build(new File("CalculatorService.wsdl"));
Namespace ns = Namespace.getNamespace("wsdl", "
XPath xp = XPath.newInstance(sb.toString());
List ele = xp.selectNodes(doc);
System.out.println(" the list is "+ele);
 any help please in getting the correct values 
  Awaiting ur response

Madhu Raj
svmadhuraj at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050808/38ef407f/attachment.htm

More information about the jdom-interest mailing list