Ok, I've got WS-ReliableMessaging to work. The problem was that the WS-Policy
information had to be removed from the WSDL and put into a separate file, using the
@PolicyAttachment annotation to refer to it.
The tutorial at
http://jbws.dyndns.org/mediawiki/index.php?title=Native_WS-ReliableMessag...
imports the WS-Policy namespace in the WSDL file and embeds the policy there. But JBoss
generates and publishes its own WSDL for the web service, using the information from the
annotations.
The solution can be found at:
http://jbws.dyndns.org/mediawiki/index.php?title=WS_Reliable_Messaging
You need to create a separate XML file (e.g. wsrm-exactly-once-in-order-policy.xml)
containing the policy: <?xml version="1.0" encoding="UTF-8"?>
| <wsp:Policy
| wsu:Id="exactly_one_in_order_rm_delivery"
|
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
|
xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"
|
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
| <wsrmp:DeliveryAssurance>
| <wsp:Policy>
| <wsrmp:ExactlyOnce/>
| <wsrmp:InOrder/>
| </wsp:Policy>
| </wsrmp:DeliveryAssurance>
| </wsp:Policy>
|
Then, in the web service implementation, use annotations to link that policy to the web
service:
@WebService
| @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 MyRMService { ...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169799#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...