aspose file tools
The moose likes Web Services and the fly likes Jax-ws error :No JAX-WS context information available. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Jax-ws error :No JAX-WS context information available." Watch "Jax-ws error :No JAX-WS context information available." New topic
Author

Jax-ws error :No JAX-WS context information available.

Abhi Barik
Greenhorn

Joined: Feb 16, 2011
Posts: 2
Hi,

I am new to java web services. i am using Jax-ws to create a simple web service.
I have created below classes.

Hello.java
-----------

package Hello;

import javax.jws.*;

@WebService

public interface Hello
{
@WebMethod
public String sayHello(String name);
}


Helloimpl.java
-----------------


package Hello;


import javax.jws.*;

@WebService(endpointInterface="Hello.Hello")
public class Helloimpl implements Hello{

@Override
public String sayHello(String name) {
// TODO Auto-generated method stub
return "Hello " + name;
}


}




HelloPublisher.java
---------------------------

package Hello;
import java.io.IOException;

import javax.jws.*;
import javax.xml.ws.Endpoint;

public class HelloPublisher {

public static void main(String[] args) throws IOException {
Endpoint.publish("http://localhost:9876/hello", new Helloimpl());
System.in.read();
}
}


After compiling all these classes , I had used below command to generate jax-ws artifacts.

> wsgen -cp . Hello.Helloimpl

It generates two classes SayHello.class and SayHelloResponse.class .

Then i had tried to execute this service by below command.

> java Hellopublisher

This throws me error " no class def found"


Then i just tried to run this from eclipse. it ran successfully. Then I had tried to acces that web service from IE by URL " http://localhost:9876/hello" . It throws me the error "No JAX-WS context information available."

I am not sure where i have gone wrong. Please suggest me what causes this error. am i doing something wrong ?


Thanks,
AR
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Please include complete stack-traces from the errors you get - it will make it easier to locate the problem.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Kota Takahashi
Greenhorn

Joined: Mar 01, 2011
Posts: 1
Hi,

I'm studying English.(and I love snoopy so much!)
So I'm sorry if I'm wrong.

-----
It throws me, too.

But I can get the correct WSDL by use the following URL,
and I can also connect from the web services client(that generated by JAX-WS) to the web service.

http://localhost:9876/hello?wsdl

I think you didn't do anything wrong at all!

Thanks.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Jax-ws error :No JAX-WS context information available.
 
Similar Threads
WS-Security
Basic of a web service client
Error while deploying the war file using command "asant deploy"
Package usage problem
Issue while deploying web service jwstutorial example CLI171