[jboss-user] [JBossWS] - javax.xml.ws.WebServiceException: WSDL metadata is missing i

sumanta306 do-not-reply at jboss.com
Tue Jul 21 01:22:09 EDT 2009


I'm using JBoss-4.2.2GA with jbossws-native-3.1.2.GA.
i  deployed stateful webservice without any error.
But calling this Webservice I  get this exception in client: 

Exception in thread "main" javax.xml.ws.WebServiceException: WSDL metadata is missing in EPR
  | 	at com.sun.xml.ws.spi.ProviderImpl.getPort(ProviderImpl.java:147)
  | 	at javax.xml.ws.EndpointReference.getPort(Unknown Source)
  | 	at stateful.client.BookService.getPort(BookService.java:48)
  | 	at stateful.client.Main.main(Main.java:33)

my client code is :

BookService class:

@WebServiceClient(name = "BookService", targetNamespace = "http://server.stateful/", wsdlLocation = "http://localhost:8080/StatefulWS/book?wsdl")
  | public class BookService extends Service {
  | 
  | 	private final static URL SERVICE_WSDL_LOCATION;
  | 	static {
  | 		URL url = null;
  | 		try {
  | 			url = new URL("http://localhost:8080/StatefulWS/book?wsdl");
  | 		} catch (MalformedURLException e) {
  | 			e.printStackTrace();
  | 		}
  | 		SERVICE_WSDL_LOCATION = url;
  | 	}
  | 
  | 	public BookService(URL wsdlDocumentLocation, QName serviceName) {
  | 		super(wsdlDocumentLocation, serviceName);
  | 
  | 	}
  | 
  | 	public BookService() {
  | 		super(SERVICE_WSDL_LOCATION, new QName("http://server.stateful/",
  | 				"BookService"));
  | 	}
  | 
  | 	@WebEndpoint(name = "BookService")
  | 	public BookRemote getPort() {
  | 		return (BookRemote) super.getPort(new QName("http://server.stateful/", "BookPort"),	BookRemote.class);
  | 	}
  | 	
  | 	@WebEndpoint(name = "BookService")
  | 	public BookRemote getPort(EndpointReference ref, Class<BookRemote> cl) {
  | 
  | 		
  | 		return ref.getPort(cl);
  | 	}
  | 	
  | 
  | }




main class::::

 BookStoreRemote bookstore = new BookStoreService().getBookStorePort();
  |         BookService service = new BookService();
  | 
  |                
  |         BookRemote book1 = service.getPort(bookstore.getProduct("abc001"),BookRemote.class);
  | 


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244794#4244794

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244794



More information about the jboss-user mailing list