Wednesday, June 26, 2013

JBossWS 4.2.0.CR1 and the WS-Policy sets

Another WildFly release has just been announced... and it comes with the first 4.2.0 candidate release of JBossWS!
The latest JBossWS release comes with some bug fixes over the former Beta build as well as with the last  new feature we planned for addition in 4.2.0, that is additional WS-Policy functionalities for code-first development.
I've just written some documentation, but let me summarize the new features here: some users noticed that writing policy assertions for endpoint wsdl contracts is usually quite difficult and often represents an obstacle to quick development of ws-policy enabled endpoints prototypes.
So we basically decided to provide means for users to choose desired policy assertions among a list of pre-defined groups serving well known needs / scenarios. The result is a custom @PolicySets annotation to list groups of policy assertions; those will be automatically attached to the proper elements in the wsdl contract that is generated at deployment time and the ws stack will behave accordingly at runtime.
The JBossWS 4.2.0.CR1 artifacts come with some initial sets, more are to be added before going final (the feature is implemented, it's just a matter of deciding which set/combination of policies to grant a label). So this is yet another example where feedback is welcome... if you have suggestions for the pre-defined set to add, just post on the JBoss forum!

You can try JBossWS 4.2.0.CR1 either consuming it from the recent WildFly 8.0.0.Alpha2 or by pulling the artifacts from the Maven repository.


urban said...

Alessio i love the policy sets idea and i am trying play with it but for testing from client side there isn't a good document i am aware of couldly kindly guide me if there is a good example about subject.

For now what i get is from my generated ws client is :

Create Web Service Client...
Oct 17, 2016 9:03:59 PM [] selectAlternatives
WARNING: WSP0075: Policy assertion "{}RMAssertion" was evaluated as "UNKNOWN".
Oct 17, 2016 9:03:59 PM [] selectAlternatives
WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
Create Web Service...
Call Web Service Operation...
Exception in thread "main" Client received SOAP Fault from server: These policy alternatives can not be satisfied:
{}RMAssertion Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.proxy.$Proxy31.registerMember(Unknown Source)
at org.arasti.example.wssecurity.securejaxws.clientsample.ClientSample.main(

what should i do?

Alessio Soldano said...

Judging from the exception, the JBossWS / CXF stack is not being used, as I see classes from Metro / JDK impl of JAX-WS. Be sure to set the client classpath properly and post to the jbossws user forum in case you have further problems / doubts. Thanks.

JBossWS 5.2.0.Final is available

After some micro bug fix releases on the 5.1 stream, JBossWS 5.2.0.Final has eventually been released . The latest versions brings a lot o...