JCA 11011 Add SOAP intent to the interface if any method in the interface is annotated with @WebResult
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@983744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b81d7bea2
commit
95b667cfdc
2 changed files with 17 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ JCA_10050=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oa
|
|||
JCA_10051=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90059] The array of interfaces or classes specified by the value attribute of the @Service annotation
|
||||
JCA_10052=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: org.apache.tuscany.sca.implementation.java.IntrospectionException: [JCA90060] The value of each element in the @Service names array MUST be unique amongst all the other element values in the array
|
||||
JCA_11005=org.oasisopen.sca.ServiceRuntimeException: [Component: TEST_JCA_11005Component1, Service: Service1] - [JCA100006] JAX-WS client-side asynchronous polling and callback methods are not allowed in service interfaces
|
||||
JCA_11011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11011Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 are mutually exclusive
|
||||
JCA_11012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11012Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP.v1_1 are mutually exclusive
|
||||
JCA_11013=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_JCA_11013Component1, Service: Service1] - [POL40009,ASM60009,ASM60010,JCA70001,JCA70003] Intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}antiSoap and {http://docs.oasis-open.org/ns/opencsa/sca/200912}SOAP are mutually exclusive
|
||||
JCA_11014=org.oasisopen.sca.ServiceRuntimeException: [Contribution: JCA_11014, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_JCA_11014] - [JCA100018] Forbidden annotation interface javax.xml.ws.WebServiceClient found in class org.oasisopen.sca.test.Service1WithWebServiceClient
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.jws.WebResult;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
|
|
@ -107,12 +108,14 @@ public class PolicyJavaInterfaceVisitor implements JavaInterfaceVisitor {
|
|||
}
|
||||
}
|
||||
|
||||
if ( clazz.getAnnotation(SOAPBinding.class) != null ) {
|
||||
if ( clazz.isAnnotationPresent(SOAPBinding.class) ) {
|
||||
// add soap intent
|
||||
Intent intent = policyFactory.createIntent();
|
||||
intent.setName(Constants.SOAP_INTENT);
|
||||
requiredIntents.add(intent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void readIntents(Requires intentAnnotation, List<Intent> requiredIntents) {
|
||||
|
|
@ -155,6 +158,17 @@ public class PolicyJavaInterfaceVisitor implements JavaInterfaceVisitor {
|
|||
}
|
||||
}
|
||||
|
||||
public void readWebResult(Method m, Class<?> clazz, List<Intent> requiredIntents) {
|
||||
WebResult webResultAnnotation = m.getAnnotation(WebResult.class);
|
||||
if (webResultAnnotation != null) {
|
||||
if (webResultAnnotation.header()) {
|
||||
// Add SOAP intent
|
||||
Intent intent = policyFactory.createIntent();
|
||||
intent.setName(Constants.SOAP_INTENT);
|
||||
requiredIntents.add(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void visitInterface(JavaInterface javaInterface) throws InvalidInterfaceException {
|
||||
|
||||
if (javaInterface.getJavaClass() != null) {
|
||||
|
|
@ -169,6 +183,7 @@ public class PolicyJavaInterfaceVisitor implements JavaInterfaceVisitor {
|
|||
readIntents(method.getAnnotation(Requires.class), op.getRequiredIntents());
|
||||
readSpecificIntents(method.getAnnotations(), op.getRequiredIntents());
|
||||
readPolicySets(method.getAnnotation(PolicySets.class), op.getPolicySets());
|
||||
readWebResult(method, javaInterface.getJavaClass(), javaInterface.getRequiredIntents());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue