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

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>