axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Hachmann" <pub...@thesofa.de>
Subject AW: NoSuchMethodException in Service that works fine without Axis
Date Mon, 25 Sep 2006 13:35:29 GMT
Hi,

The javax.xml.parsers.DocumentBuilderFactory is int the rt.jar of the SDK.
Thats the one the VM uses.
Even if i put in the jars from xalan-j.

And if I run the the ServiceMethod directly I have no problems with parsing
the Document. So I cannot think 
of the library not being able to run that method.

Or am I missing something??


-----Urspr√ľngliche Nachricht-----
Von: Martin Gainty [mailto:mgainty@hotmail.com] 
Gesendet: Montag, 25. September 2006 14:53
An: axis-user@ws.apache.org; dims@apache.org
Betreff: Re: NoSuchMethodException in Service that works fine without Axis

available in 2.7.0 distros
http://www.apache.org/dyn/closer.cgi/xml/xalan-j
M-
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message -----
From: "Davanum Srinivas" <davanum@gmail.com>
To: <axis-user@ws.apache.org>
Sent: Monday, September 25, 2006 8:35 AM
Subject: Re: NoSuchMethodException in Service that works fine without Axis


> Check the xml parser. getTextContent is not present in DOM2 which is
> the old parser. Make sure you have the latest xerces jar and ensure
> that it is being used.
> 
> -- dims
> 
> On 9/25/06, Alexander Hachmann <public@thesofa.de> wrote:
>>
>>
>>
>>
>> Hello everybody,
>>
>> I have a slightly strange problem which I am not able to fix at this
point.
>> I have a class that shall read a XML-Document through DOM and give back
some
>> data.
>>
>> The Class parses the file and than processes selected Nodes. This works
fine
>> when you Instantiate an Object from that class in a simple
JavaApplication.
>> But when you deploy that service in Axis, this method seems to be
throwing a
>> NoSuchMethodException which arrives as a InvocationTargetException at the
>> Axis Client. When I remove the line
>>
>>       content = n2.getTextContent();
>>
>> everything works fine in Axis. But in the normal Programm it even worked
>> with that line.
>>
>> When the Exception is thrown, the Eclipse Debugger just ends and does not
>> jump back to where the Exception would be caught.
>>
>> Has anyone had that problem too and give me some hints?
>>
>>
>>
>> Thx,
>>
>>       Alexander Hachmann
>>
>>
>>
>> P.S. This is the service Code:
>>
>>
>>
>> public int getBroadcasts(){
>>
>>             String name = "";
>>
>>             String content = null;
>>
>>             try{
>>
>>                   DocumentBuilder builder =
>> DocumentBuilderFactory.newInstance().newDocumentBuilder();
>>
>>                   d = builder.parse("text.xml");
>>
>>                   NodeList nl = d.getElementsByTagName("data"), nl2;
>>
>>                   for (int i=0; i < nl.getLength(); i++){
>>
>>                         Node n = nl.item(i);
>>
>>                         Node n2 = null;
>>
>>                         //System.out.println(n.getNodeName());
>>
>>                         nl2 = n.getChildNodes();
>>
>>                         int text;
>>
>>                         //ContentPosition p ;
>>
>>                         for (int j=0; j < nl2.getLength(); j++){
>>
>>                              n2 = nl2.item(j);
>>
>>                              text = n2.getNodeType();
>>
>>                              if (text == Node.ELEMENT_NODE &&
>> n2.getNodeName() != "data"){
>>
>>                                    name = n2.getNodeName();
>>
>>                                    try{
>>
>>                                          content =
>> n2.getTextContent();
>>
>>                                    }catch (Exception e){
>>
>>
>> System.out.println(e);
>>
>>                                    }
>>
>>                              }
>>
>>                         }
>>
>>                   }
>>
>>             }catch (ParserConfigurationException e){
>>
>>                   System.out.println(e);
>>
>>             }catch (IOException e){
>>
>>                   System.out.println(e);
>>
>>             }catch (SAXException e){
>>
>>                   System.out.println(e);
>>
>>             }
>>
>>             return 1;
>>
>>       }
> 
> 
> -- 
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
>


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


Mime
View raw message