Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[axis] NullPointer przy deserializacji

0 views
Skip to first unread message

Tomasz Minkowski

unread,
Jan 13, 2005, 2:02:35 PM1/13/05
to
Witam.
Odpaliłem w axisie usługę sieciową .jws (pobiera i zwraca zwraca
stringa). Wszystko od strony serwera jest ok (sprawdzone TCPMonem)

Klient usługi wygląda tak jak przykład na ws.apache.org:

public class WsClient {

public String callService() throws Exception {

String target = "http://localhost:8080/axis/Fws.jws";

Service service = new Service();

Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(target));
call.setOperationName(new QName("http://siala.la/", "doIt"));

String ret = (String) call.invoke(new Object[] { "Pupa" });
return ret;
}

public static void main(String[] args) throws Exception {
// TODO code application logic here
WsClient w = new WsClient();
System.out.println(w.callService());
}

}

I po odpaleniu wywala się (z klienta):

Exception in thread "main" 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 java.util.Hashtable.put(Hashtable.java:396)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at WsClient.callService(WsClient.java:28)
at WsClient.main(WsClient.java:35)


java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.client.Call.invoke(Call.java:2251)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at WsClient.callService(WsClient.java:28)
at WsClient.main(WsClient.java:35)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
... 4 more


Dzięki za odpowiedzi,
TM

0 new messages