THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
@WebService @EndpointProperties( { @EndpointProperty(name = "my.property", value="some value"), @EndpointProperty(name = "my.other.property", value="some other value"), }) public interface MyService { String echoString(String s); } |
Anchor | ||||
---|---|---|---|---|
|
org.apache.cxf.annotations.Policy
org.apache.cxf.annotations.)Policies (since 2.3)
Used to attach WS-Policy fragments to a service or operation. The Policy supports the attributes:
uri | REQUIRED the location of the file containing the Policy definition |
includeInWSDL | Whether to include the policy in the generated WSDL when generating a wsdl. Default it true |
placement | Specify where to place the policy |
faultClass | if placement is a FAULT, this specifies which fault the policy would apply to |
Code Block | ||||
---|---|---|---|---|
| ||||
@Policies({
@Policy(uri = "annotationpolicies/TestInterfacePolicy.xml"),
@Policy(uri = "annotationpolicies/TestImplPolicy.xml",
placement = Policy.Placement.SERVICE_PORT),
@Policy(uri = "annotationpolicies/TestPortTypePolicy.xml",
placement = Policy.Placement.PORT_TYPE)
}
)
@WebService
public static interface TestInterface {
@Policies({
@Policy(uri = "annotationpolicies/TestOperationPolicy.xml"),
@Policy(uri = "annotationpolicies/TestOperationInputPolicy.xml",
placement = Policy.Placement.BINDING_OPERATION_INPUT),
@Policy(uri = "annotationpolicies/TestOperationOutputPolicy.xml",
placement = Policy.Placement.BINDING_OPERATION_OUTPUT),
@Policy(uri = "annotationpolicies/TestOperationPTPolicy.xml",
placement = Policy.Placement.PORT_TYPE_OPERATION),
@Policy(uri = "annotationpolicies/TestOperationPTInputPolicy.xml",
placement = Policy.Placement.PORT_TYPE_OPERATION_INPUT),
@Policy(uri = "annotationpolicies/TestOperationPTOutputPolicy.xml",
placement = Policy.Placement.PORT_TYPE_OPERATION_OUTPUT)
}
)
int echoInt(int i);
}
|