Re: Problems using tcp sample
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://: list 4. Run the sample. java samples.transport.tcp.GetQuote -l tcp://: 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
AW: Problems using tcp sample
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 -Ursprüngliche Nachricht- Von: Ron Reynolds [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 14. Oktober 2005 16:56 An: axis-user@ws.apache.org Betreff: Re: Problems using tcp sample i've never seen a tcp URL - what protocol is that without ip? i'm no protocol expert, but... do you have a tcp server running on port ? so it's not http or ftp or...? [EMAIL PROTECTED] wrote: >Hi, > >I'm using Axis 1.2.1 and I try to use the tcp sample which can be found in >package 'samples\transport\tcp'. > >My CLASSPATH contain: an XML parser, JUnit, all the jars in the lib >directory, and the directory containing the samples subdirectory. > >When I execute > >java samples.transport.tcp.AdminClient -l tcp://localhost: deploy.wsdd > >then I receive the following Exception. > >- getURL failed to correctly process URL; protocol not supported >java.net.MalformedURLException: unknown protocol: tcp >java.net.MalformedURLException: unknown protocol: tcp >at java.net.URL.(Unknown Source) >at java.net.URL.(Unknown Source) >at java.net.URL.(Unknown Source) >at org.apache.axis.utils.Options.getURL(Options.java:237) >at org.apache.axis.utils.Options.(Options.java:65) >at org.apache.axis.client.AdminClient.process(AdminClient.java:281) >at samples.transport.tcp.AdminClient.main(AdminClient.java:53) > > >Why isn't the protocol registered? What's wrong?? >Thx for your help, > >Chris > > >
Re: Problems using tcp sample
i've never seen a tcp URL - what protocol is that without ip? i'm no protocol expert, but... do you have a tcp server running on port ? so it's not http or ftp or...? [EMAIL PROTECTED] wrote: Hi, I'm using Axis 1.2.1 and I try to use the tcp sample which can be found in package 'samples\transport\tcp'. My CLASSPATH contain: an XML parser, JUnit, all the jars in the lib directory, and the directory containing the samples subdirectory. When I execute java samples.transport.tcp.AdminClient -l tcp://localhost: deploy.wsdd then I receive the following Exception. - getURL failed to correctly process URL; protocol not supported java.net.MalformedURLException: unknown protocol: tcp java.net.MalformedURLException: unknown protocol: tcp at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at org.apache.axis.utils.Options.getURL(Options.java:237) at org.apache.axis.utils.Options.(Options.java:65) at org.apache.axis.client.AdminClient.process(AdminClient.java:281) at samples.transport.tcp.AdminClient.main(AdminClient.java:53) Why isn't the protocol registered? What's wrong?? Thx for your help, Chris
Problems using tcp sample
Hi, I'm using Axis 1.2.1 and I try to use the tcp sample which can be found in package 'samples\transport\tcp'. My CLASSPATH contain: an XML parser, JUnit, all the jars in the lib directory, and the directory containing the samples subdirectory. When I execute java samples.transport.tcp.AdminClient -l tcp://localhost: deploy.wsdd then I receive the following Exception. - getURL failed to correctly process URL; protocol not supported java.net.MalformedURLException: unknown protocol: tcp java.net.MalformedURLException: unknown protocol: tcp at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at org.apache.axis.utils.Options.getURL(Options.java:237) at org.apache.axis.utils.Options.(Options.java:65) at org.apache.axis.client.AdminClient.process(AdminClient.java:281) at samples.transport.tcp.AdminClient.main(AdminClient.java:53) Why isn't the protocol registered? What's wrong?? Thx for your help, Chris