aspose file tools*
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
Author

InvocationTargetException

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

When I tried the following
url:http://localhost:8080/axis/

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
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:albertlam

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.

Yours,

Frustrated.
 
Consider Paul's rocket mass heater.
 
subject: InvocationTargetException