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 11:46:53 GMT
Hi,
Ok, then i just did forget to write that the XMLDocuments i am processing
are soapmessges for the
Servicerequest. The XML data that is being processed is coming from files on
the filesystem on the Server.


Alexander 

-----Urspr√ľngliche Nachricht-----
Von: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Gesendet: Montag, 25. September 2006 13:39
An: axis-user@ws.apache.org
Betreff: Re: NoSuchMethodException in Service that works fine without Axis

Alexander,

If you use the RPC provider, then Axis will always convert the incoming
message elements into Java objects; therefore, you don't have the option to
directly manipulate the XML nodes. If you want to directly manipulate the
XML, you must use the MSG provider.

Anne

On 9/25/06, Alexander Hachmann <public@thesofa.de> wrote:
> Hello Anne,
> Thx for your reply.
>
> At this point, i do not want the Service to return that XMLDocument. I 
> just want to use the information in that document for creating own 
> beans and send them back. While getting the TextContent of the 
> processed Nodes the Service Crashes.
> Right now the Service even simply retunrs an Integer value, though 
> crashes anyway.
>
> Thx,
>    Alexander
>
>
> -----Urspr√ľngliche Nachricht-----
> Von: Anne Thomas Manes [mailto:atmanes@gmail.com]
> Gesendet: Montag, 25. September 2006 13:10
> An: axis-user@ws.apache.org
> Betreff: Re: NoSuchMethodException in Service that works fine without 
> Axis
>
> Make sure that you are using provider="MSG", which will then deliver 
> the message to you as a DOM element.
>
> Anne
>
> On 9/25/06, Alexander Hachmann <public@thesofa.de> wrote:
> > Sorry for having sent the email in html before. Wont happen again 
> > ;-)
> >
> > 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 catch the exception in the catch block :-o
> >
> > 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;
> >       }
> >
> >
> > --------------------------------------------------------------------
> > - 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
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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