Search in sources :

Example 1 with ModelTranslator

use of com.sun.xml.ws.api.policy.ModelTranslator in project metro-jax-ws by eclipse-ee4j.

the class AlternativeSelectorTest method setUp.

@Override
protected void setUp() throws PolicyException {
    final PolicySourceModel model = PolicySourceModel.createPolicySourceModel(NamespaceVersion.v1_5, "id", null);
    final ModelNode root = model.getRootNode();
    final ModelNode alternatives = root.createChildExactlyOneNode();
    final ModelNode alternative1 = alternatives.createChildAllNode();
    final ModelNode alternative2 = alternatives.createChildAllNode();
    final AssertionData assertion1 = AssertionData.createAssertionData(assertion1Name);
    alternative1.createChildAssertionNode(assertion1);
    final AssertionData assertion2 = AssertionData.createAssertionData(assertion2Name);
    alternative2.createChildAssertionNode(assertion2);
    final ModelTranslator translator = ModelTranslator.getTranslator();
    this.multipleAlternativesPolicy = translator.translate(model);
}
Also used : PolicySourceModel(com.sun.xml.ws.policy.sourcemodel.PolicySourceModel) ModelTranslator(com.sun.xml.ws.api.policy.ModelTranslator) ModelNode(com.sun.xml.ws.policy.sourcemodel.ModelNode) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Aggregations

ModelTranslator (com.sun.xml.ws.api.policy.ModelTranslator)1 AssertionData (com.sun.xml.ws.policy.sourcemodel.AssertionData)1 ModelNode (com.sun.xml.ws.policy.sourcemodel.ModelNode)1 PolicySourceModel (com.sun.xml.ws.policy.sourcemodel.PolicySourceModel)1