axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huang Xiandong <huangxiand...@gmail.com>
Subject Re: Problems using tcp sample
Date Mon, 17 Oct 2005 14:32:29 GMT
hi,
i am newer to axis, I also have problem when running tcp sample,
I followed readme of the smaple,

1.  Set up your CLASSPATH.
2.  Start a  server.
3.  Deploy the service.
   The list of currently deployed services can be seen using:
        java samples.transport.tcp.AdminClient -l
tcp://<SERVER_NAME>:<SERVER_PORT> list
4.  Run the sample.
	java samples.transport.tcp.GetQuote -l
tcp://<SERVER_NAME>:<SERVER_PORT> <SYMBOL>

when I finish step 3, I list services like reame file tell me, but it
doesn't work
some exception come out, and step 4 cannot work either like step 3. it tell
that the AXIS enigin could not find a target service to invoke, but I
already depoly the service at step 3.

some exception like these

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.utils.Admin.AdminService(Admin.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider
.java:126)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:
323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453
)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at samples.transport.tcp.TCPListener$SocketHandler.run(TCPListener.java:
213)
        at java.lang.Thread.run(Unknown Source)

running step 4

AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.NoService
 faultSubcode:
 faultString: The AXIS engine could not find a target service to
invoke!  targetService is null
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:The AXIS engine could
not find a target service to
e is null
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:270)
        at samples.transport.tcp.TCPListener$SocketHandler.run(TCPListener.java:213)
        at java.lang.Thread.run(Unknown Source)

        {http://xml.apache.org/axis/}hostname:my-bt911

The AXIS engine could not find a target service to invoke! 
targetService is null

>>Ron,

>>thx for your answer.
>>
>>I found the problem. If you want to use the tcp example, your sample
>>directory must contain a class 'Handler' which looks like this:
>>
>>public class Handler extends java.net.URLStreamHandler {
>>	static {
>>		/* Register the TCPTransport class */
>>		org.apache.axis.client.Call.setTransportForProtocol(
>>				"tcp", TCPTransport.class);
>>	}
>>
>>	protected URLConnection openConnection(URL u) {
>>		return null;
>>	}
>>}

>>Now, it works.
>>Chris

Mime
View raw message