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

Joseph Hwang <[email protected]> Thu, 22 Aug 2013 07:11:34 -0400
Newsgroups gmane.comp.java.jboss.user
Message-ID <[email protected]>
------=_Part_647153_697738358.1377169894705
Content-Type: multipart/alternative; 
	boundary="----=_Part_647152_190295763.1377169894705"

------=_Part_647152_190295763.1377169894705
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Joseph Hwang [https://community.jboss.org/people/aupres] created the discus=
sion

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

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

--------------------------------------------------------------
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=3Dtrue, required=3Dfalse)
@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
 https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-21326/p=
olicy_1.jpg  https://community.jboss.org/servlet/JiveServlet/downloadImage/=
2-833521-21326/450-428/policy_1.jpg=20
=EF=BB=BF
 https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-21327/p=
olicy_2.jpg  https://community.jboss.org/servlet/JiveServlet/downloadImage/=
2-833521-21327/450-557/policy_2.jpg=20

Deployment is successful. The wsdl is generated successfully. The console s=
hows the messages :

19:49:11,763 INFO=C2=A0 [org.jboss.as.server.deployment] (MSC service threa=
d 1-2) JBAS015876: Starting deployment of "WSHelloWorldEAR.ear" (runtime-na=
me: "WSHelloWorldEAR.ear")
19:49:11,904 INFO=C2=A0 [org.jboss.as.server.deployment] (MSC service threa=
d 1-7) JBAS015876: Starting deployment of "null" (runtime-name: "WSHelloWor=
ld.war")
19:49:13,635 INFO=C2=A0 [org.jboss.ws.cxf.metadata] (MSC service thread 1-1=
) JBWS024061: Adding service endpoint metadata: id=3DHelloWorld
 address=3D http://localhost:8080/WSHelloWorld/HelloWorld http://localhost:=
8080/WSHelloWorld/HelloWorld
 implementor=3Dcom.aaa.ws.HelloWorld
 serviceName=3D{ http://ws.aaa.com/ http://ws.aaa.com/}HelloWorldService
 portName=3D{ http://ws.aaa.com/ http://ws.aaa.com/}HelloWorldPort
 annotationWsdlLocation=3Dnull
 wsdlLocationOverride=3Dnull
 mtomEnabled=3Dfalse
19:49:13,886 INFO=C2=A0 [org.apache.cxf.service.factory.ReflectionServiceFa=
ctoryBean] (MSC service thread 1-1) Creating Service { http://ws.aaa.com/ h=
ttp://ws.aaa.com/}HelloWorldService from class com.aaa.ws.IHelloWorld
19:49:14,369 INFO=C2=A0 [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024=
092: Adding BINDING policy attachment with id=3D'WS-RM_Policy_spec_example_=
binding_policy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO=C2=A0 [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024=
092: Adding BINDING policy attachment with id=3D'WS-SP-EX223_binding_policy=
' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO=C2=A0 [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024=
092: Adding BINDING policy attachment with id=3D'WS-Addressing_binding_poli=
cy' to honor requirement from interface com.aaa.ws.IHelloWorld.
19:49:14,369 INFO=C2=A0 [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024=
092: Adding BINDING_OPERATION_INPUT policy attachment with id=3D'WS-SP-EX22=
3_Binding_Operation_Input_Policy' to honor requirement from interface com.a=
aa.ws.IHelloWorld.
19:49:14,369 INFO=C2=A0 [org.jboss.ws.cxf] (MSC service thread 1-1) JBWS024=
092: Adding BINDING_OPERATION_OUTPUT policy attachment with id=3D'WS-SP-EX2=
23_Binding_Operation_Output_Policy' to honor requirement from interface com=
.aaa.ws.IHelloWorld.
19:49:14,697 INFO=C2=A0 [org.apache.cxf.endpoint.ServerImpl] (MSC service t=
hread 1-1) Setting the server's publish address to be  http://localhost:808=
0/WSHelloWorld/HelloWorld http://localhost:8080/WSHelloWorld/HelloWorld
19:49:14,823 INFO=C2=A0 [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=C2=A0 [org.jboss.as.webservices] (MSC service thread 1-3)=
 JBAS015539: Starting service jboss.ws.endpoint."WSHelloWorldEAR.ear"."WSHe=
lloWorld.war".HelloWorld
19:49:15,197 INFO=C2=A0 [org.wildfly.extension.undertow] (MSC service threa=
d 1-8) JBAS018210: Register web context: /WSHelloWorld
19:49:15,291 INFO=C2=A0 [org.jboss.as.server] (DeploymentScanner-threads - =
1) JBAS018559: Deployed "WSHelloWorldEAR.ear" (runtime-name : "WSHelloWorld=
EAR.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 Cli=
ent Wizard of eclipse ide.
 https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-21328/p=
olicy_3.jpg  https://community.jboss.org/servlet/JiveServlet/downloadImage/=
2-833521-21328/450-428/policy_3.jpg=20
 https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-21329/p=
olicy_4.jpg  https://community.jboss.org/servlet/JiveServlet/downloadImage/=
2-833521-21329/450-409/policy_4.jpg=20
 https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-21330/p=
olicy_5.jpg  https://community.jboss.org/servlet/JiveServlet/downloadImage/=
2-833521-21330/450-473/policy_5.jpg=20
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 =3D new HelloWorldService();
 IHelloWorld port =3D 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=3D1&co=
ntainerType=3D14&container=3D2044]


------=_Part_647152_190295763.1377169894705
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link=3D"#355491" alink=3D"#4262a1" vlink=3D"#355491" style=3D"backgro=
und: #e2e2e2; margin: 0; padding: 20px;">

<div>
=09<table cellpadding=3D"0" bgcolor=3D"#FFFFFF" border=3D"0" cellspacing=3D=
"0" style=3D"border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -=
moz-border-radius: 6px; -webkit-border-radius: 6px;">
=09=09<tbody>
=09=09=09<tr>

=09=09=09=09<td>

=09=09=09=09=09<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" bgco=
lor=3D"#FFFFFF" style=3D"border: solid 2px #ccc; background: #dadada; width=
: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
=09=09=09=09=09=09<tbody>
=09=09=09=09=09=09=09<tr>
=09=09=09=09=09=09=09=09<td bgcolor=3D"#000000" valign=3D"middle" height=3D=
"58px" style=3D"border-bottom: 1px solid #ccc; padding: 20px; -moz-border-r=
adius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-ri=
ght-radius: 5px; -webkit-border-top-left-radius: 5px;">
=09=09=09=09=09=09=09=09=09<h1 style=3D"color: #333333; font: bold 22px Ari=
al, Helvetica, sans-serif; margin: 0; display: block !important;">
=09=09=09=09=09=09=09=09=09<!-- To have a header image/logo replace the nam=
e below with your img tag -->
=09=09=09=09=09=09=09=09=09<!-- Email clients will render the images when t=
he message is read so any image -->
=09=09=09=09=09=09=09=09=09<!-- must be made available on a public server, =
so that all recipients can load the image. -->
=09=09=09=09=09=09=09=09=09<a href=3D"https://community.jboss.org/index.jsp=
a" style=3D"text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
=09=09=09=09=09=09=09=09</td>

=09=09=09=09=09=09=09</tr>
=09=09=09=09=09=09=09<tr>
=09=09=09=09=09=09=09=09<td bgcolor=3D"#FFFFFF" style=3D"font: normal 12px =
Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-ra=
dius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-b=
ottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style=
=3D"margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: [org.apache.cxf.ws.rm.RMInInterceptor] (default task-57) WS-Reliabl=
eMessaging is required by this endpoint.
</h3>
<span style=3D"margin-bottom: 10px;">
    created by <a href=3D"https://community.jboss.org/people/aupres">Joseph=
 Hwang</a> in <i>JBoss Web Services</i> - <a href=3D"https://community.jbos=
s.org/message/833521#833521">View the full discussion</a>
</span>
<hr style=3D"margin: 20px 0; border: none; background-color: #dadada; heigh=
t: 1px;">

<div class=3D"jive-rendered-content"><p>First I make Service Endpoint Inter=
face like below,</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;=
">&#160;</p><p>package com.aaa.ws;</p><p style=3D"min-height: 8pt; height: =
8pt; padding: 0px;">&#160;</p><p>import javax.jws.WebMethod;<br/>import jav=
ax.jws.WebParam;<br/>import javax.jws.WebResult;<br/>import javax.jws.WebSe=
rvice;<br/>//import javax.xml.ws.soap.Addressing;</p><p style=3D"min-height=
: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>import org.jboss.ws.api.ann=
otation.PolicySets;</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0=
px;">&#160;</p><p>@WebService<br/><a class=3D"jive-link-anchor-small" rel=
=3D"nofollow">//@Addressing(enabled=3Dtrue</a>, required=3Dfalse)<br/>@Poli=
cySets({"WS-RM_Policy_spec_example", "WS-SP-EX223_WSS11_Anonymous_X509_Sign=
_Encrypt", "WS-Addressing"})<br/>public interface IHelloWorld {</p><p> @Web=
Method<br/> @WebResult<br/> public String sayHello(@WebParam String name);<=
br/>}</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p=
><p>,and deploy it on eclipse IDE</p><p><a href=3D"https://community.jboss.=
org/servlet/JiveServlet/showImage/2-833521-21326/policy_1.jpg"><span> https=
://community.jboss.org/servlet/JiveServlet/downloadImage/2-833521-21326/450=
-428/policy_1.jpg </span></a></p><div class=3D"mcePaste" id=3D"_mcePaste" s=
tyle=3D"position: absolute; top: 0px; left: 0px;">=EF=BB=BF</div><p><a href=
=3D"https://community.jboss.org/servlet/JiveServlet/showImage/2-833521-2132=
7/policy_2.jpg"><span> https://community.jboss.org/servlet/JiveServlet/down=
loadImage/2-833521-21327/450-557/policy_2.jpg </span></a></p><p style=3D"mi=
n-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Deployment is succe=
ssful. The wsdl is generated successfully. The console shows the messages :=
</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1=
9:49:11,763 INFO&#160; [org.jboss.as.server.deployment] (MSC service thread=
 1-2) JBAS015876: Starting deployment of "WSHelloWorldEAR.ear" (runtime-nam=
e: "WSHelloWorldEAR.ear")<br/>19:49:11,904 INFO&#160; [org.jboss.as.server.=
deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "nu=
ll" (runtime-name: "WSHelloWorld.war")<br/>19:49:13,635 INFO&#160; [org.jbo=
ss.ws.cxf.metadata] (MSC service thread 1-1) JBWS024061: Adding service end=
point metadata: id=3DHelloWorld<br/><span> address=3D</span><a class=3D"jiv=
e-link-external-small" href=3D"http://localhost:8080/WSHelloWorld/HelloWorl=
d" rel=3D"nofollow" target=3D"_blank">http://localhost:8080/WSHelloWorld/He=
lloWorld</a><br/> implementor=3Dcom.aaa.ws.HelloWorld<br/><span> serviceNam=
e=3D{</span><a class=3D"jive-link-external-small" href=3D"http://ws.aaa.com=
/" rel=3D"nofollow" target=3D"_blank">http://ws.aaa.com/</a><span>}HelloWor=
ldService</span><br/><span> portName=3D{</span><a class=3D"jive-link-extern=
al-small" href=3D"http://ws.aaa.com/" rel=3D"nofollow" target=3D"_blank">ht=
tp://ws.aaa.com/</a><span>}HelloWorldPort</span><br/> annotationWsdlLocatio=
n=3Dnull<br/> wsdlLocationOverride=3Dnull<br/> mtomEnabled=3Dfalse<br/><spa=
n>19:49:13,886 INFO&#160; [org.apache.cxf.service.factory.ReflectionService=
FactoryBean] (MSC service thread 1-1) Creating Service {</span><a class=3D"=
jive-link-external-small" href=3D"http://ws.aaa.com/" rel=3D"nofollow" targ=
et=3D"_blank">http://ws.aaa.com/</a><span>}HelloWorldService from class com=
.aaa.ws.IHelloWorld</span><br/>19:49:14,369 INFO&#160; [org.jboss.ws.cxf] (=
MSC service thread 1-1) JBWS024092: Adding BINDING policy attachment with i=
d=3D'WS-RM_Policy_spec_example_binding_policy' to honor requirement from in=
terface com.aaa.ws.IHelloWorld.<br/>19:49:14,369 INFO&#160; [org.jboss.ws.c=
xf] (MSC service thread 1-1) JBWS024092: Adding BINDING policy attachment w=
ith id=3D'WS-SP-EX223_binding_policy' to honor requirement from interface c=
om.aaa.ws.IHelloWorld.<br/>19:49:14,369 INFO&#160; [org.jboss.ws.cxf] (MSC =
service thread 1-1) JBWS024092: Adding BINDING policy attachment with id=3D=
'WS-Addressing_binding_policy' to honor requirement from interface com.aaa.=
ws.IHelloWorld.<br/>19:49:14,369 INFO&#160; [org.jboss.ws.cxf] (MSC service=
 thread 1-1) JBWS024092: Adding BINDING_OPERATION_INPUT policy attachment w=
ith id=3D'WS-SP-EX223_Binding_Operation_Input_Policy' to honor requirement =
from interface com.aaa.ws.IHelloWorld.<br/>19:49:14,369 INFO&#160; [org.jbo=
ss.ws.cxf] (MSC service thread 1-1) JBWS024092: Adding BINDING_OPERATION_OU=
TPUT policy attachment with id=3D'WS-SP-EX223_Binding_Operation_Output_Poli=
cy' to honor requirement from interface com.aaa.ws.IHelloWorld.<br/>19:49:1=
4,697 INFO&#160; [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1=
-1) Setting the server's publish address to be <a class=3D"jive-link-extern=
al-small" href=3D"http://localhost:8080/WSHelloWorld/HelloWorld" rel=3D"nof=
ollow">http://localhost:8080/WSHelloWorld/HelloWorld</a><br/>19:49:14,823 I=
NFO&#160; [org.jboss.ws.cxf.deployment] (MSC service thread 1-1) JBWS024074=
: WSDL published to: file:/C:/wildfly-8.0.0.Alpha4/standalone/data/wsdl/WSH=
elloWorldEAR.ear/WSHelloWorld.war/HelloWorldService.wsdl<br/>19:49:14,870 I=
NFO&#160; [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015539: S=
tarting service jboss.ws.endpoint."WSHelloWorldEAR.ear"."WSHelloWorld.war".=
HelloWorld<br/>19:49:15,197 INFO&#160; [org.wildfly.extension.undertow] (MS=
C service thread 1-8) JBAS018210: Register web context: /WSHelloWorld<br/>1=
9:49:15,291 INFO&#160; [org.jboss.as.server] (DeploymentScanner-threads - 1=
) JBAS018559: Deployed "WSHelloWorldEAR.ear" (runtime-name : "WSHelloWorldE=
AR.ear")</p><p style=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;=
</p><p>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 Serv=
ice Client Wizard of eclipse ide.</p><p><a href=3D"https://community.jboss.=
org/servlet/JiveServlet/showImage/2-833521-21328/policy_3.jpg"><span> https=
://community.jboss.org/servlet/JiveServlet/downloadImage/2-833521-21328/450=
-428/policy_3.jpg </span></a></p><p><a href=3D"https://community.jboss.org/=
servlet/JiveServlet/showImage/2-833521-21329/policy_4.jpg"><span> https://c=
ommunity.jboss.org/servlet/JiveServlet/downloadImage/2-833521-21329/450-409=
/policy_4.jpg </span></a></p><p><a href=3D"https://community.jboss.org/serv=
let/JiveServlet/showImage/2-833521-21330/policy_5.jpg"><span> https://commu=
nity.jboss.org/servlet/JiveServlet/downloadImage/2-833521-21330/450-473/pol=
icy_5.jpg </span></a></p><p>The client codes from the Web Service Client Wi=
zard seems not to be applied by WS-Policy annotation.</p><p>The below clien=
t code throws many types of exceptions.</p><p style=3D"min-height: 8pt; hei=
ght: 8pt; padding: 0px;">&#160;</p><p> HelloWorldService service =3D new He=
lloWorldService();<br/> IHelloWorld port =3D service.getHelloWorldPort();<b=
r/> out.println(port.sayHello("Joseph"));</p><p style=3D"min-height: 8pt; h=
eight: 8pt; padding: 0px;">&#160;</p><p>Is there any option which make the =
WS client wizard generate correct client codes with WS-Policy?</p><p style=
=3D"min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I need your h=
elp! </p></div>

<div style=3D"background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style=3D"margin: 0;">Reply to this message by <a href=3D"https://com=
munity.jboss.org/message/833521#833521">going to Community</a></p>
=09<p style=3D"margin: 0;">Start a new discussion in JBoss Web Services at =
<a href=3D"https://community.jboss.org/choose-container!input.jspa?contentT=
ype=3D1&containerType=3D14&container=3D2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>
------=_Part_647152_190295763.1377169894705--

------=_Part_647153_697738358.1377169894705
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
------=_Part_647153_697738358.1377169894705--