Skip to main content

problem MEX protocol (WS-MetadataExchange implemented in Metro)

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
UmbertoPalo
Offline
Joined: 2013-05-09

Hi, i have a big problem.
First: sorry for my bad english
I want to use the WS-Metadata Exchange for my web services to exchange information such as metadata (XML-Schema, XSD) whit the client.

PLEASE, if you do not see them, please see the attached file: https://dl.dropboxusercontent.com/u/257710/question.txt

I created the file sun-jaxws.xml that contains:

?xml version="1.0" encoding="UTF-8"?>
#
#

#
#

the web.xml contains:

# xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
#
#
com.sun.xml.ws.transport.http.servlet.WSServletContextListener #
#
# mex2.impl.ServerMexUmbGetMetadataResponse
#com.sun.xml.ws.transport.http.servlet.WSServlet
#1
#

#
# mex2.impl.ServerMexUmbGetMetadataResponse
#/ServerMexUmbGetMetadataResponse
#

#
#mex2.impl.ServerMexUmbGetMetadataResponse
#/ServerMexUmbGetMetadataResponse/mex
#

#
#
30
#

#

#

MEXEndpoint.java contained in the library "webservices-osgi.jar" of Glassfish/Metro implement WS-MetadataExchange v1.1
MEXEndpoint, in fragment of code below, accept the GET_REQUEST where GET_REQUEST=http://schemas.xmlsoap.org/ws/2004/09/transfer/Get (See MetadataConstantants.java)
the base implementation, in METRO, it returns only a WSDL file, as far as I understand.

[Note GetMetadata not supported in Metro implementation]

if (action == null) {
// TODO: Better error message
throw new WebServiceException("No wsa:Action specified");
}
else if (action.equals(GET_REQUEST)) {
final String toAddress = headers.getTo(wsaVersion, soapVersion);
return processGetRequest(requestMsg, toAddress, wsaVersion, soapVersion);
}
else if (action.equals(GET_MDATA_REQUEST)) {
String faultText = MessagesMessages.MEX_0017_GET_METADATA_NOT_IMPLEMENTED(GET_MDATA_REQUEST, GET_REQUEST);
logger.warning(faultText);
final Message faultMessage = createFaultMessage(faultText, GET_MDATA_REQUEST,
wsaVersion, soapVersion);
wsContext.getMessageContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, wsaVersion.getDefaultFaultAction());
return faultMessage;
}
// If here, either action is unsupported
// TODO: Better error message
throw new UnsupportedOperationException(action);

but i receive always the same error:

SEVERE:
http://schemas.xmlsoap.org/ws/2004/09/transfer/Get

java.lang.UnsupportedOperationException:
http://schemas.xmlsoap.org/ws/2004/09/transfer/Get

at com.sun.xml.ws.mex.server.MEXEndpoint.invoke(MEXEndpoint.java:135)
at com.sun.xml.ws.mex.server.MEXEndpoint.invoke(MEXEndpoint.java:87)
at com.sun.xml.ws.api.server.InstanceResolver$1.invokeProvider(InstanceResolver.java:260)
at com.sun.xml.ws.server.InvokerTube$2.invokeProvider(InvokerTube.java:159)
at com.sun.xml.ws.server.provider.SyncProviderInvokerTube.processRequest(SyncProviderInvokerTube.java:85)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:420)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:687)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:266)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:225)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:161)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:197)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:722)

What i wrong?