summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-31 16:28:21 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-31 16:28:21 +0000
commit9e3ff0e8b2032a3240095c6f3fa4e336d2b13557 (patch)
treedb8883ebcafc41b39f5b106c2bb270e59372916f
parent81505d21ce27cd4d17483df4bbba5280cfcc5ced (diff)
Add intents to the policy contributions and remove from the ordinary contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@809652 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite2
-rw-r--r--sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java9
-rw-r--r--sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite4
-rw-r--r--sandbox/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java3
4 files changed, 9 insertions, 9 deletions
diff --git a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite
index e594f677d8..4a91a96255 100644
--- a/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite
+++ b/sandbox/travelsample/contributions/creditcard-payment-jaxb-policy/src/main/resources/creditcard.composite
@@ -25,7 +25,7 @@
<implementation.java class="com.tuscanyscatours.payment.creditcard.impl.CreditCardPaymentImpl" />
<service name="CreditCardPayment">
<interface.wsdl interface="http://www.tuscanyscatours.com/CreditCardPayment/#wsdl.interface(CreditCardPayment)" />
- <binding.ws uri="http://localhost:8082/CreditCardPayment" requires=""/>
+ <binding.ws uri="http://localhost:8082/CreditCardPayment" requires="authentication"/>
<binding.sca/>
</service>
</component>
diff --git a/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
index e47102f9ac..16e91d7284 100644
--- a/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
+++ b/sandbox/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
@@ -25,6 +25,7 @@ import javax.annotation.security.RunAs;
import org.osoa.sca.annotations.Authentication;
import org.osoa.sca.annotations.Property;
import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Requires;
import org.osoa.sca.annotations.Service;
import com.tuscanyscatours.customer.Customer;
@@ -33,22 +34,22 @@ import com.tuscanyscatours.customer.CustomerRegistry;
import com.tuscanyscatours.emailgateway.EmailGateway;
import com.tuscanyscatours.payment.Payment;
import com.tuscanyscatours.payment.creditcard.AuthorizeFault_Exception;
-import com.tuscanyscatours.payment.creditcard.CreditCardDetailsType;
import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
/**
* The payment implementation
*/
@Service(Payment.class)
-@RolesAllowed({"Admin", "Billing"})
-@RunAs("Billing")
+//@RolesAllowed({"Admin", "Billing"})
+//@RunAs("Billing")
public class PaymentImpl implements Payment {
@Reference
protected CustomerRegistry customerRegistry;
@Reference
- @Authentication
+ //@Authentication - not supported
+ @Requires("{http://www.osoa.org/xmlns/sca/1.0}authentication")
protected CreditCardPayment creditCardPayment;
@Reference
diff --git a/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite b/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
index 90e16b2293..710583ae5d 100644
--- a/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
+++ b/sandbox/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
@@ -28,7 +28,9 @@
<binding.ws uri="http://localhost:8081/Payment"/>
</service>
<reference name="customerRegistry" target="CustomerRegistry"/>
- <reference name="creditCardPayment" requires="">
+ <!-- reference name="creditCardPayment" policySets="BasicAuthenticationPolicySet"-->
+ <!-- reference name="creditCardPayment" requires="authentication"-->
+ <reference name="creditCardPayment">
<binding.ws uri="http://localhost:8082/CreditCardPayment"/>
</reference>
<reference name="emailGateway" target="EmailGateway"/>
diff --git a/sandbox/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sandbox/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
index 8fb56c67e7..e5010c88e9 100644
--- a/sandbox/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
+++ b/sandbox/travelsample/contributions/payment-java/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
@@ -40,15 +40,12 @@ import com.tuscanyscatours.payment.creditcard.CreditCardPayment;
* The payment implementation
*/
@Service(Payment.class)
-@RolesAllowed({"Admin", "Billing"})
-@RunAs("Billing")
public class PaymentImpl implements Payment {
@Reference
protected CustomerRegistry customerRegistry;
@Reference
- @Authentication
protected CreditCardPayment creditCardPayment;
@Reference