JBoss Community

com.sun.xml.ws.client.ClientTransportException: HTTP Status-Code 404: Not Found

created by Joseph Hwang in JBoss Web Services Development - View the full discussion

Hello,

 

I'm coding Web Service in JBoss

 

OS : Windows Server 2008

JDK : JDK 1.6

Eclipse : Eclipse Galileo
JBoss : JBoss 5.1.0.GA
DB : MSSQL 2008

 

1.generating Interface file

 

package com.aaa.ws;

 

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.jws.WebParam;

 

@WebService
public interface WSHelloWorldPort {
   @WebMethod
   @WebResult(name="greetings")
   public String sayHello(@WebParam(name="name") String name);
}

 

2. implementing interface file

 

package com.aaa.ws;

 

import javax.jws.WebService;


 

@WebService
public class WSHelloWorld implements WSHelloWorldPort {
   public String sayHello(String name) {

   return name;

   }
}

 

3. In Eclipse Web Service Environment, Web Service files and Client Stub files were generated without Errors

4. Executing ClientSample.java

 

package com.aaa.ws.clientsample;

import com.aaa.ws.*;

 

public class ClientSample {

 

public static void main(String[] args) {

   System.out.println("***********************");
   System.out.println("Create Web Service Client...");
   WSHelloWorldService service1 = new WSHelloWorldService();
   System.out.println("Create Web Service...");
   WSHelloWorld port1 = service1.getWSHelloWorldPort();
   System.out.println("Call Web Service Operation..."); // No Exception occurs until this line
   System.out.println("Server said: " + port1.sayHello("aaa")); //Exception Occurs  

   System.out.println("***********************");
   System.out.println("Call Over!");
   }
}

 

5.Exception is like below

 

***********************
Create Web Service Client...
Create Web Service...
Call Web Service Operation...
Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: HTTP Status-Code 404: Not Found - Not Found
at com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:219)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:149)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.client.Stub.process(Stub.java:248)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy25.sayHello(Unknown Source)
at com.obci.ws.clientsample.ClientSample.main(ClientSample.java:14)

Any mistake in my coding?

I nees your advice. Thanks in advance!



Best Regards

Reply to this message by going to Community

Start a new discussion in JBoss Web Services Development at Community