Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server.userException

 
mahesh ogale
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you ever fix this? I have the same problem. any help would be greatly appreciated.
 
Fredrik Andersson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys!

Did you ever solved this problem!

I also getting the same problem!

Best regards
Fredrik
 
Fredrik Andersson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
eva renjia
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic