aspose file tools*
The moose likes Web Services and the fly likes Server.userException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Server.userException" Watch "Server.userException" New topic
Author

Server.userException

mahesh ogale
Greenhorn

Joined: Jan 14, 2004
Posts: 8
I wrote a standalone Java program to access webservice(jws). My program is as follows:

String endpoint = "http://mahesho:8100/axis/HelloService.jws";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("getMessage");
call.addParameter("name", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING );
String ret = (String)call.invoke(new Object[] {"mahesh"});
System.out.println(ret);




I always get the following exception:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.lang.NullPointerException

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException

at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)

at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)

at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)

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.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at javax.xml.parsers.SAXParser.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 j2eeproject.WebservicesTest.main(WebservicesTest.java:35)



{http://xml.apache.org/axis/}hostname:mahesho



java.lang.NullPointerException

java.lang.NullPointerException

at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)

at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)

at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)

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.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at javax.xml.parsers.SAXParser.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 j2eeproject.WebservicesTest.main(WebservicesTest.java:35)
seth green
Greenhorn

Joined: Jun 02, 2006
Posts: 1
Did you ever fix this? I have the same problem. any help would be greatly appreciated.
Fredrik Andersson
Ranch Hand

Joined: May 03, 2005
Posts: 35
Hello guys!

Did you ever solved this problem!

I also getting the same problem!

Best regards
Fredrik


Best regards<br />Fredrik
Fredrik Andersson
Ranch Hand

Joined: May 03, 2005
Posts: 35
Hello!

Seems like the problem is solved.

I use Bea 8.1.4 and I had to put saaj.jar first in the server classpath.

Best regards
Fredrik
eva renjia
Greenhorn

Joined: Feb 29, 2012
Posts: 2
Fredrik Andersson wrote:Hello!

Seems like the problem is solved.

I use Bea 8.1.4 and I had to put saaj.jar first in the server classpath.

Best regards
Fredrik

I put saaj.jar in the classpath already,but it doesn't work . How can I do ? Best regards .
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

eva renjia wrote:
Fredrik Andersson wrote:Hello!

Seems like the problem is solved.

I use Bea 8.1.4 and I had to put saaj.jar first in the server classpath.

Best regards
Fredrik

I put saaj.jar in the classpath already,but it doesn't work . How can I do ? Best regards .

What problems you are having?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
eva renjia
Greenhorn

Joined: Feb 29, 2012
Posts: 2
Vijitha Kumara wrote:
eva renjia wrote:
Fredrik Andersson wrote:Hello!

Seems like the problem is solved.

I use Bea 8.1.4 and I had to put saaj.jar first in the server classpath.

Best regards
Fredrik

I put saaj.jar in the classpath already,but it doesn't work . How can I do ? Best regards .

What problems you are having?


oh,thanks very much. I have already solved the problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server.userException