I am trying to implement a web service that does both MTOM-XOP and reliable messaging. I
have the service running with MTOM-XOP and patterned it after the MTOMEndPoint EJB3
example provided in the jboss native ws 3.0.2. I am running JBoss 4.2.2.
I then tried to implement the steps from the Reliable Messaging Tutorial at
http://jbws.dyndns.org/mediawiki/index.php?title=Native_WS-ReliableMessag...
I had problems with the wsdl I modified, so I added the following annotations to the
endpoint and let JBOSS build the wsdl instead
@WebService(
| name = "EflexServiceEndpoint",
| serviceName = "EflexService",
| endpointInterface = "com.eflex.webservice.EflexServiceEndpoint"
| // wsdlLocation = "WEB-INF/wsdl/EflexService.wsdl"
| )
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
| @EndpointConfig
| (
| configFile = "META-INF/wsrm-jaxws-endpoint-config.xml",
| configName = "Standard WSRM Endpoint"
| )
| @PolicyAttachment(@Policy(
| policyFileLocation =
"META-INF/wsrm-exactly-once-in-order-policy.xml",
| scope = PolicyScopeLevel.WSDL_BINDING)
| )
|
| public class EflexServiceEndpointBean implements EflexServiceEndpoint
| {
|
|
Here is the exception I get:
anonymous wrote : org.jboss.ws.extensions.wsrm.RMFault: The RM Destination requires the
use of WSRM
| at
org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.prepareResponseContext(RMInvocationHandler.java:134)
| at
org.jboss.ws.extensions.wsrm.server.RMInvocationHandler.invoke(RMInvocationHandler.java:306)
| at
org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:221)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)
| at
org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
|
Which seems to say that my service is expecting WSRM, but that the client has not
implemented it.
Here is my client code.
| public final class EflexServiceClient
| {
|
| private static final String serviceURL =
"http://localhost:80/wseflex/EflexService";
|
| public static void main(String[] args) throws Exception
| {
| InputStream is = null;
| if (args.length != 0)
| {
| is = new FileInputStream(args[0]);
| } else {
| is = new
ByteArrayInputStream("<test>reqest</test>".getBytes());
| }
|
| QName serviceName = new
QName("http://webservice.eflex.com/",
"EflexService");
| URL wsdlURL = new URL(serviceURL + "?wsdl");
| Service service = Service.create(wsdlURL, serviceName);
| EflexServiceEndpoint port =
(EflexServiceEndpoint)service.getPort(EflexServiceEndpoint.class);
| SOAPBinding binding = (SOAPBinding)((BindingProvider)port).getBinding();
| binding.setMTOMEnabled(true);
| ((StubExt)port).setConfigName("Standard Anonymous WSRM Client",
"META-INF/wsrm-jaxws-client-config.xml");
|
| Source src = new StreamSource(is);
| SourceRequest request = new SourceRequest();
| request.setData(src);
|
| SourceResponse response = port.echoSource(request);
| Source respSource = response.getData();
|
| ((RMProvider)port).closeSequence();
| ...
|
|
Any help on this is greatly appreciated. Thanks.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172930#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...