Grizzly – java. lang.NoSuchMethodError:javax. xml. ws. WebFault. messageName
I have a WSDL file for the web service I want to test the interaction between the client and the server To do this, I run a simulation server with an embedded grizzly bear
About the implementation of analog server I generated an interface from WSDL (and XSD) using the wsimport and write implementation When running on grizzly bear, I received the following error:
com.sun.xml.ws.server.ServerRtException: [Failed to localize] cannot.load.wsdl(Meta-INF/wsdl/test.wsdl)
I run the web service using the following code:
HttpHandler httpHandler = new JaxwsHandler(new TestImpl()); server.getServerConfiguration().addHttpHandler(httpHandler,"/test");
The problem is that grizzly cannot find WSDL and XSD files It works in embedded glass fish
EDIT1
I changed the WSDL location to "test. WSDL" and its work But now grizzly says:
java.lang.NoSuchMethodError: javax.xml.ws.WebFault.messageName()Ljava/lang/String;
EDIT2
If using jdk1 Just 7 But I need JDK 1.6
Solution
I'm not sure why you saw this mistake I can run the grizzly jaxws sample and use 1.6 or 1.7 to get the WSDL
I suggest you look at source1 of the example and compare it with what you have