Discussion:
[jboss-user] [JBoss Web Services] - [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint.
Joseph Hwang
2013-08-19 13:20:34 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"[org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833066#833066

--------------------------------------------------------------
With WildFly Alpha 4, I try to implement Java Web Service.
This is my Web Services Interface,

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.xml.ws.soap.Addressing;
import org.jboss.ws.api.annotation.PolicySets;
@WebService(
name="HelloWorldPort",
portName="com.aaa.ws.IHelloWorld",
serviceName="HelloWorldService",
targetNamespace=" http://www.aaa.com/ http://www.aaa.com")
@SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.BARE)
@Addressing(enabled=true, required=false)
@PolicySets({"WS-RM_Policy_spec_example", "WS-SP-EX223_WSS11_Anonymous_X509_Sign_Encrypt"})
public interface IHelloWorld {
@WebMethod(operationName="callNameMethod")
@WebResult(name="helloEcho")
public String sayHello(@WebParam(name="helloName", mode=WebParam.Mode.IN) String name);
}

Deployment is successful, But When calling ws interface, Exception is thrown

[org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint.

Pls, I need your advice!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833066#833066]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-20 03:52:57 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833155#833155

--------------------------------------------------------------
I think WS-ReliableMessaging related annotation is to be developeded to invoke endpoint interface of web service with @PolicySets successfully like @Addressing(enabled=true, required=false) annotation.
.


--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833155#833155]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-20 14:33:29 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833217#833217

--------------------------------------------------------------
In the https://docs.jboss.org/author/display/JBWS/WS-Policy https://docs.jboss.org/author/display/JBWS/WS-Policy doc, jbossws-cxf-client.jar file have to be included into my project. But I can't find the file in the <wildfly-8.0.0.Alpha4_HOME>\modules\system\layers\base\org\jboss\ws\cxf\jbossws-cxf-client\main folder.

Where can I get jar file?

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833217#833217]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-08-20 16:03:06 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833234#833234

--------------------------------------------------------------
You can find that jar in modules/system/layers/base/org/jboss/ws/jaxws-client/main
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833234#833234]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-21 11:39:17 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833377#833377

--------------------------------------------------------------
Thank you for your reply, Alessio.
I use Eclipse IDE to deploy above web service endpoint interface. SEI is successfully deployed and wsdl file with <wsp:Policy> element is generated well.

The problem is that I have no idea what to do with jbossws-cxf-client-4.2.0.Final.jar in Eclipse IDE.
Up to now I follow this ref. site, http://docs.jboss.org/tools/archive/3.1.0.GA/en/ws_ref_guide/html/client.html http://docs.jboss.org/tools/archive/3.1.0.GA/en/ws_ref_guide/html/client.html to generate ws client code.
It had worked well until now, but wsdl with <ws-polocy> does not seem to be applied to ws-client codes. The client-code throws many types of exception.
How can I generate correct client-codes from the wsdl with ws-policy element? I need any ref site or sample codes.

Pls, help! Thanks in advance.
**
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833377#833377]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-08-22 10:43:35 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833513#833513

--------------------------------------------------------------
Hi Joseph,
can you clarify the situation a bit, so that I better understand? So, you have your endpoint (annotated with @PolicySets) properly published? Does the published wsdl contain the ws policies you'd expect?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833513#833513]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-22 11:11:34 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833521#833521

--------------------------------------------------------------
First I make Service Endpoint Interface like below,

package com.aaa.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
//import javax.xml.ws.soap.Addressing;

import org.jboss.ws.api.annotation.PolicySets;

@WebService
//@Addressing(enabled=true, required=false)
@PolicySets({"WS-RM_Policy_spec_example", "WS-SP-EX223_WSS11_Anonymous_X509_Sign_Encrypt", "WS-Addressing"})
public interface IHelloWorld {
@WebMethod
@WebResult
public String sayHello(@WebParam String name);
}

,and deploy it on eclipse IDE
Loading Image... Loading Image...

Loading Image... Loading Image...

Deployment is successful. The wsdl is generated successfully. The console shows the messages :

19:49:11,763 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "WSHelloWorldEAR.ear" (runtime-name: "WSHelloWorldEAR.ear")
19:49:11,904 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "null" (runtime-name: "WSHelloWorld.war")
19:49:13,635 INFO  [org.jboss.ws.cxf.metadata] (MSC service thread 1-1) JBWS024061: Adding service endpoint metadata: id=HelloWorld
address= http://localhost:8080/WSHelloWorld/HelloWorld http://localhost:8080/WSHelloWorld/HelloWorld
implementor=com.aaa.ws.HelloWorld
serviceName={ http://ws.aaa.com/ http://ws.aaa.com/}HelloWorldService
portName={ http://ws.aaa.com/ http://ws.aaa.com/}HelloWorldPort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
19:49:13,886 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-1) Creating Service { http://ws.aaa.com/ http://ws.aaa.com/}HelloWorldService from class com.aaa.ws.IHelloWorld
19:49:14,369 INFO  [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING policy attachment with id='WS-RM_Policy_spec_example_binding_policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO  [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING policy attachment with id='WS-SP-EX223_binding_policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO  [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING policy attachment with id='WS-Addressing_binding_policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO  [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING_OPERATION_INPUT policy attachment with id='WS-SP-EX223_Binding_Operation_Input_Policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO  [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING_OPERATION_OUTPUT policy attachment with id='WS-SP-EX223_Binding_Operation_Output_Policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,697 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-1) Setting the server's publish address to be http://localhost:8080/WSHelloWorld/HelloWorld http://localhost:8080/WSHelloWorld/HelloWorld
19:49:14,823 INFO  [org.jboss.ws.cxf.deployment] (MSC service thread 1-1) JBWS024074: WSDL published to: file:/C:/wildfly-8.0.0.Alpha4/standalone/data/wsdl/WSHelloWorldEAR.ear/WSHelloWorld.war/HelloWorldService.wsdl
19:49:14,870 INFO  [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015539: Starting service jboss.ws.endpoint."WSHelloWorldEAR.ear"."WSHelloWorld.war".HelloWorld
19:49:15,197 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS018210: Register web context: /WSHelloWorld
19:49:15,291 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "WSHelloWorldEAR.ear" (runtime-name : "WSHelloWorldEAR.ear")

But the problem is generating web service client codes from the wsdl which contains WS-Policy. I try to generate the client codes with Web Service Client Wizard of eclipse ide.
Loading Image... Loading Image...
Loading Image... Loading Image...
Loading Image... Loading Image...
The client codes from the Web Service Client Wizard seems not to be applied by WS-Policy annotation.
The below client code throws many types of exceptions.

HelloWorldService service = new HelloWorldService();
IHelloWorld port = service.getHelloWorldPort();
out.println(port.sayHello("Joseph"));

Is there any option which make the WS client wizard generate correct client codes with WS-Policy?

I need your help!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833521#833521]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Alessio Soldano
2013-08-23 08:18:21 UTC
Permalink
Alessio Soldano [https://community.jboss.org/people/asoldano] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833650#833650

--------------------------------------------------------------
Joseph, that's (unfortunately) the expected behaviour. The @PolicySets stuff is a replacement for the need of manually setting policies on server side. The tooling will generate a basic jaxws client for you. So once you have that client you need to configure it properly; that would mean e.g. providing the ws-security props, there's no way the tool can guess where you have that on client side, which usernames to use, etc. Below is a partial example:
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");


Consider having a look at e.g. org.jboss.test.ws.jaxws.samples.wsse.policy.oasis.WSSecurityPolicyExamples22xTestCase which has a client of endpoint using the same policy you get with "WS-SP-EX223_WSS11_Anonymous_X509_Sign_Encrypt",
and/or reference the documentation at https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation (e.g. https://docs.jboss.org/author/display/JBWS/WS-Security https://docs.jboss.org/author/display/JBWS/WS-Security for ws-security stuff).
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833650#833650]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-23 11:31:09 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833671#833671

--------------------------------------------------------------
Thank you, Alessio :)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833671#833671]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Joseph Hwang
2013-08-23 03:14:14 UTC
Permalink
Joseph Hwang [https://community.jboss.org/people/aupres] created the discussion

"Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-ReliableMessaging is required by this endpoint."

To view the discussion, visit: https://community.jboss.org/message/833632#833632

--------------------------------------------------------------
Hi, Alessio!
I used SoapUI to check the soap message generated from the wsdl file. But soap message was not affected by the WS-Policy annotation.
And it throws the same exceptions.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/833632#833632]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
Loading...