wood burning stoves*
The moose likes Web Services and the fly likes InvocationTargetException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "InvocationTargetException" Watch "InvocationTargetException" New topic


John Smith
Ranch Hand

Joined: Aug 21, 2004
Posts: 48
Hi All:

I am using Tomcat 5.5, Axis 1.4, and myEclipse 5.5.
I am new to java web services and Axis.
I am trying an example from the book "Beginning Java Web Services" by
Henry Bequet. This is the Stock Quote example on Chapter 3 page

When I tried the following

It gives me a list of web services deployed.
There is a link:
List -View the list of deployed Web Services

Here is the source code for StockCore.java:

Here is the client code that calls the method getQuote in the StockCore.java
class. I passed the parameter "IBM" to the StockQuote class below:

Before I ran the client code that calls the web service. I needed to tell Axis that
StockQuote is a valid web service. This is done with the help of a deployment
descriptor and the Axis AdminClient(make sure that Tomcat is running before launching these commands).

Here is the value of the StockQuote.wsdd:

Here is the command I ran:
C:\Beginning_JWS_Examples\Chp03\StockQuote\src>java org.apache.axis.client.AdminClient ..\StockQuote.wsdd
Processing file ..\StockQuote.wsdd
<Admin>Done processing</Admin>

Here is the error message I get when I called the client code StockQuote.java :
StockQuote.main: java.lang.reflect.InvocationTargetException
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultString: java.lang.reflect.InvocationTargetException

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.wrox.jws.stockquote.StockQuote.main(StockQuote.java:45)

Any hint would be greatly appreciated.


I agree. Here's the link: http://aspose.com/file-tools
subject: InvocationTargetException
Similar Threads
Confusion in writing web service client + jax-ws
Unable to send mail via Web Service
InvocationTargetException when transferring a custom class in inheritance
Simple Web Service using Axis
Unable to test webservice using a client