public CI[] getCIDetailsTest(String ci_type,String selectedCI) throws Exception{
String endpoint = getProperty(customerID+"_endpoint");
System.out.println("reached here .......done.."+endpoint);
//here failed
Service service = new Service();
System.out.println("reached here .......done..........."+service);
That is my statements in Java file
But, to my surprise it was unable to create Service Object..
It is printing first println statement and not printing second println statement. That means It was unable to creat Service object.
Is it jar problem? If it is jar problem, Which jar to be included?
Friends, Kindly Help me out to resolve this issue....
you should add this jar:
The problem is the version of JAX-WS API
. The classloader for your application first loaded the version included in Java SE or Java EE.
For Java SE 6 or Java EE 5, JAX-WS API 2.1.
The constructors in javax.xml.ws.Service :
javax.xml.ws.Service.Service(URL, QName)
For Java SE 7 or Java EE 6, JAX-WS API 2.2.
The constructors in javax.xml.ws.Service :
javax.xml.ws.Service.Service(URL, QName)
javax.xml.ws.Service.Service(URL, QName, WebServiceFeature...) // You need this!
There are three possible solutions (depends on whether it is a web application or standalone application):
Java SE 7 or Java EE 6
. jaxws21
to generate JAX-WS 2.1
compliant code instead. you should refer this link
Are you sure the Service is (a not) abstract class and not an interface. It must also have a public constructor.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.