Author: palin
Date: 2007-05-16 18:34:28 -0400 (Wed, 16 May 2007)
New Revision: 3114
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/Policy.xml
Removed:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/simple-encrypt/META-INF/jboss-wsse-client.xml
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
Log:
- Finished refactoring of policy metadata generation
- wsprovide running with policies from wsdl fragment
- Client running with policies from wsdl fragment
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/extensions/policy/metadata/PolicyMetaDataBuilder.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -39,7 +39,6 @@
import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.wsdl.WSDLBinding;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
@@ -48,9 +47,12 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
/**
+ * A meta data builder for policies; handles checks for policy support
+ * and their eventual deploy on both server side and client side.
+ *
* @author Alessio Soldano, <mailto:alessio.soldano@javalinux.it>
*
- * since 16-May-2007
+ * @since 16-May-2007
*/
public class PolicyMetaDataBuilder
{
@@ -186,7 +188,7 @@
private void processPolicies(List<WSDLExtensibilityElement> policyReferences,
PolicyScopeLevel scope, PolicyRegistry localPolicies, ExtensibleMetaData extMetaData)
{
- if (policyReferences != null && policyReferences.size() != 0 &&
extMetaData instanceof ServerEndpointMetaData)
+ if (policyReferences != null && policyReferences.size() != 0)
{
DOMPolicyReader reader = (DOMPolicyReader)
PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
for (WSDLExtensibilityElement element : policyReferences)
@@ -207,15 +209,7 @@
}
}
- /**
- * Implementors should add PolicyMetaDataExt to the provided ExtensibleMetaData
according
- * to the specified policy and policy scope.
- *
- * @param policy
- * @param scope
- * @param extMetaData
- */
- protected void deployPolicy(Policy policy, PolicyScopeLevel scope, ExtensibleMetaData
extMetaData)
+ private void deployPolicy(Policy policy, PolicyScopeLevel scope, ExtensibleMetaData
extMetaData)
{
PolicyDeployer deployer;
if (toolMode)
@@ -237,7 +231,7 @@
}
- protected void deployPolicyServerSide(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData, PolicyDeployer deployer)
+ private void deployPolicyServerSide(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData, PolicyDeployer deployer)
{
PolicyMetaExtension ext =
(PolicyMetaExtension)extMetaData.getExtension(Constants.URI_WS_POLICY);
if (ext == null)
@@ -260,7 +254,7 @@
}
- protected void deployPolicyClientSide(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData, PolicyDeployer deployer)
+ private void deployPolicyClientSide(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData, PolicyDeployer deployer)
{
PolicyMetaExtension ext =
(PolicyMetaExtension)extMetaData.getExtension(Constants.URI_WS_POLICY);
if (ext == null)
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -31,21 +31,15 @@
import javax.xml.namespace.QName;
import javax.xml.ws.BindingType;
-import org.apache.ws.policy.Policy;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactoryJAXWS;
-import org.jboss.ws.extensions.policy.PolicyScopeLevel;
-import org.jboss.ws.extensions.policy.deployer.PolicyDeployer;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
import org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder;
-import org.jboss.ws.extensions.policy.metadata.PolicyMetaExtension;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -96,7 +90,6 @@
{
PolicyMetaDataBuilder policyBuilder =
PolicyMetaDataBuilder.getClientSidePolicyMetaDataBuilder();
policyBuilder.processPolicyExtensions(epMetaData, wsdlDefinitions);
- //processPolicyMetaDataExtension(epMetaData, wsdlDefinitions);
}
// Read the WSDL and initialize the schema model
@@ -309,26 +302,4 @@
if(log.isDebugEnabled()) log.debug("END: rebuildMetaData\n" +
epMetaData.getServiceMetaData());
}
-
-// protected void deployPolicy(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData)
-// {
-// PolicyMetaExtension ext =
(PolicyMetaExtension)extMetaData.getExtension(Constants.URI_WS_POLICY);
-// if (ext == null)
-// {
-// ext = new PolicyMetaExtension(Constants.URI_WS_POLICY);
-// extMetaData.addExtension(ext);
-// }
-// try
-// {
-// PolicyDeployer.getInstance().deployClientSide(policy, extMetaData);
-// ext.addPolicy(scope, policy);
-// }
-// catch (UnsupportedPolicy e)
-// {
-// if (log.isDebugEnabled())
-// {
-// log.debug("Policy Not supported:" + policy.getPolicyURI());
-// }
-// }
-// }
}
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -55,11 +55,6 @@
import javax.xml.ws.addressing.Action;
import javax.xml.ws.addressing.AddressingProperties;
-import org.apache.ws.policy.Policy;
-import org.apache.ws.policy.PolicyReference;
-import org.apache.ws.policy.util.DOMPolicyReader;
-import org.apache.ws.policy.util.PolicyFactory;
-import org.apache.ws.policy.util.PolicyRegistry;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
@@ -67,14 +62,11 @@
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.jaxws.WrapperGenerator;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
-import org.jboss.ws.extensions.policy.PolicyScopeLevel;
-import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
import org.jboss.ws.metadata.acessor.JAXBAccessor;
import org.jboss.ws.metadata.builder.MetaDataBuilder;
import org.jboss.ws.metadata.j2ee.serviceref.HandlerChainsObjectFactory;
@@ -82,11 +74,9 @@
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
import org.jboss.ws.metadata.umdm.FaultMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
@@ -95,11 +85,7 @@
import org.jboss.ws.metadata.wsdl.WSDLBindingMessageReference;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
import org.jboss.ws.metadata.wsdl.WSDLMIMEPart;
-import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -973,129 +959,4 @@
this.wrapperGenerator = wrapperGenerator;
}
-
-// protected void processPolicyAnnotation(EndpointMetaData epMetaData, Class<?>
sepClass, UnifiedDeploymentInfo udi)
-// {
-// for (org.jboss.ws.extensions.policy.annotation.Policy policy :
sepClass.getAnnotation(PolicyAttachment.class).value())
-// {
-// InputStream is = null;
-// try
-// {
-// DOMPolicyReader reader = (DOMPolicyReader)
PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
-// is = udi.getMetaDataFileURL(policy.policyFileLocation()).openStream();
-// Policy unnormalizedPolicy = reader.readPolicy(is);
-// Policy normPolicy = (Policy)unnormalizedPolicy.normalize();
-// log.info("Deploying Annotated Policy =
"+policy.policyFileLocation());
-// PolicyScopeLevel scope = policy.scope();
-// if (PolicyScopeLevel.WSDL_PORT.equals(scope) ||
PolicyScopeLevel.WSDL_PORT_TYPE.equals(scope) ||
-// PolicyScopeLevel.WSDL_BINDING.equals(scope))
-// {
-// deployPolicy(normPolicy, scope, epMetaData);
-// }
-// else
-// {
-// throw new WSException("Policy scope "+scope+" not
supported yet!");
-// }
-// }
-// catch (Exception e)
-// {
-// e.printStackTrace();
-// } finally
-// {
-// try
-// {
-// is.close();
-// } catch (Exception e) {}
-// }
-// }
-// }
-//
-// protected void processPolicyMetaDataExtension(EndpointMetaData epMetaData,
WSDLDefinitions wsdlDefinitions)
-// {
-// //Collect all policies defined in our wsdl definitions
-// DOMPolicyReader reader = (DOMPolicyReader)
PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
-// PolicyRegistry localPolicyRegistry = new PolicyRegistry();
-// for (WSDLExtensibilityElement policyElement :
wsdlDefinitions.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY))
-// {
-// Policy policy = reader.readPolicy(policyElement.getElement());
-// localPolicyRegistry.register(policy.getPolicyURI(), policy);
-// }
-// //Port scope
-// WSDLService wsdlService =
wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName());
-// if (wsdlService != null)
-// {
-// WSDLEndpoint wsdlEndpoint =
wsdlService.getEndpoint(epMetaData.getPortName());
-// if (wsdlEndpoint != null)
-// {
-// List<WSDLExtensibilityElement> portPolicyRefList =
wsdlEndpoint.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE);
-// deployPolicies(portPolicyRefList, PolicyScopeLevel.WSDL_PORT,
localPolicyRegistry, epMetaData);
-// }
-// else
-// {
-// log.warn("Cannot get port
'"+epMetaData.getPortName()+"' from the given wsdl definitions! Eventual
policies attached to this port won't be considered.");
-// }
-// }
-// else
-// {
-// log.warn("Cannot get service
'"+epMetaData.getServiceMetaData().getServiceName()+"' from the given
wsdl definitions! Eventual policies attached to this service won't be
considered.");
-// }
-//
-// //Binding scope
-// WSDLBinding wsdlBinding =
wsdlDefinitions.getBindingByInterfaceName(epMetaData.getPortTypeName());
-// if (wsdlBinding != null)
-// {
-// List<WSDLExtensibilityElement> bindingPolicyRefList =
wsdlBinding.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE);
-// deployPolicies(bindingPolicyRefList, PolicyScopeLevel.WSDL_BINDING,
localPolicyRegistry, epMetaData);
-// }
-// else
-// {
-// log.warn("Cannot get binding for portType
'"+epMetaData.getPortTypeName()+"' from the given wsdl definitions!
Eventual policies attached to this binding won't be considered.");
-// }
-//
-// //PortType scope
-// WSDLInterface wsdlInterface =
wsdlDefinitions.getInterface(epMetaData.getPortTypeName());
-// if (wsdlInterface != null)
-// {
-// List<WSDLExtensibilityElement> portTypePolicyRefList =
wsdlInterface.getExtensibilityElements(Constants.WSDL_PROPERTY_POLICYURIS);
-// deployPolicies(portTypePolicyRefList, PolicyScopeLevel.WSDL_PORT_TYPE,
localPolicyRegistry, epMetaData);
-// }
-// else
-// {
-// log.warn("Cannot get portType
'"+epMetaData.getPortTypeName()+"' from the given wsdl definitions!
Eventual policies attached to this portType won't be considered.");
-// }
-// }
-//
-// private void deployPolicies(List<WSDLExtensibilityElement> policyReferences,
PolicyScopeLevel scope, PolicyRegistry localPolicies, ExtensibleMetaData extMetaData)
-// {
-// if (policyReferences != null && policyReferences.size() != 0 &&
extMetaData instanceof ServerEndpointMetaData)
-// {
-// DOMPolicyReader reader = (DOMPolicyReader)
PolicyFactory.getPolicyReader(PolicyFactory.DOM_POLICY_READER);
-// for (WSDLExtensibilityElement element : policyReferences)
-// {
-// PolicyReference policyRef =
reader.readPolicyReference(element.getElement());
-// Policy normPolicy;
-// try
-// {
-// normPolicy = (Policy)policyRef.normalize(localPolicies);
-// }
-// catch (RuntimeException e)
-// {
-// //TODO!!! not a local policy: get the policy definition and create the
policy
-// normPolicy = null;
-// }
-// deployPolicy(normPolicy, scope, extMetaData);
-// }
-// }
-// }
-//
-// /**
-// * Implementors should add PolicyMetaDataExt to the provided ExtensibleMetaData
according
-// * to the specified policy and policy scope.
-// *
-// * @param policy
-// * @param scope
-// * @param extMetaData
-// */
-// protected abstract void deployPolicy(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData);
-
}
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -26,17 +26,10 @@
import javax.jws.WebService;
import javax.xml.ws.WebServiceProvider;
-import org.apache.ws.policy.Policy;
-import org.jboss.ws.Constants;
import org.jboss.ws.annotation.EndpointConfig;
import org.jboss.ws.annotation.WebContext;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
-import org.jboss.ws.extensions.policy.PolicyScopeLevel;
-import org.jboss.ws.extensions.policy.deployer.PolicyDeployer;
-import org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy;
-import org.jboss.ws.extensions.policy.metadata.PolicyMetaExtension;
-import org.jboss.ws.metadata.umdm.ExtensibleMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -161,25 +154,4 @@
}
}
-// protected void deployPolicy(Policy policy, PolicyScopeLevel scope,
ExtensibleMetaData extMetaData)
-// {
-// PolicyMetaExtension ext =
(PolicyMetaExtension)extMetaData.getExtension(Constants.URI_WS_POLICY);
-// if (ext == null)
-// {
-// ext = new PolicyMetaExtension(Constants.URI_WS_POLICY);
-// extMetaData.addExtension(ext);
-// }
-// try
-// {
-// Policy deployedPolicy = PolicyDeployer.getInstance().deployServerside(policy,
extMetaData);
-// ext.addPolicy(scope,deployedPolicy);
-// }
-// catch (UnsupportedPolicy e)
-// {
-// if (log.isDebugEnabled())
-// {
-// log.debug("Policy Not supported:" + policy.getPolicyURI());
-// }
-// }
-// }
}
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -141,6 +141,7 @@
return sepMetaData;
//Process an optional @PolicyAttachment annotation
+ //TODO!! Move this before toolMode return after pacthing error with policy
annotation resource reading
if (sepClass.isAnnotationPresent(PolicyAttachment.class))
{
PolicyMetaDataBuilder policyBuilder =
PolicyMetaDataBuilder.getServerSidePolicyMetaDataBuilder(toolMode);
@@ -344,28 +345,18 @@
if (anPolicy!=null)
{
String policyLocation = anPolicy.wsdlFragmentLocation();
- System.out.println("Policy Location:
###"+policyLocation+"###");
if (policyLocation==null || policyLocation.length()==0)
throw new WSException("Missing wsdlFragmentLocation for @Policy on
" + sepClass.getName());
+
if (toolMode)
{
result.policyLocation =
Thread.currentThread().getContextClassLoader().getResource(policyLocation);
- }else
+ }
+ else
{
result.policyLocation = udi.getMetaDataFileURL(policyLocation);
}
-
-// if (result.policyLocation==null) {
-// try
-// {
-// result.policyLocation = new File(policyLocation).toURL();
-// }
-// catch (Exception e)
-// {
-// e.printStackTrace();
-// }
-// }
- System.out.println("Policy Location:
###"+result.policyLocation+"###");
+ log.debug("Policy Location: " + result.policyLocation);
}
return result;
Modified: branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-16 20:47:45
UTC (rev 3113)
+++ branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml 2007-05-16 22:34:28
UTC (rev 3114)
@@ -467,12 +467,10 @@
<webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy">
<include name="wsse.keystore"/>
<include name="wsse.truststore"/>
-
</webinf>
- <webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF">
-
- <include name="PolicyAttachmentFragment.wsdl"/>
- </webinf>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecuritypolicy/WEB-INF">
+ <include name="PolicyAttachmentFragment.wsdl"/>
+ </webinf>
</war>
<!-- jaxws-samples-wssecurityAnnotatedpolicy-encrypt -->
<war
warfile="${tests.output.dir}/libs/jaxws-samples-wssecurityAnnotatedpolicy-encrypt.war"
webxml="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/web.xml">
@@ -484,6 +482,8 @@
<webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy">
<include name="wsse.keystore"/>
<include name="wsse.truststore"/>
+ </webinf>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF">
<include name="Policy.xml"/>
</webinf>
</war>
Modified:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -31,7 +31,6 @@
import org.jboss.ws.annotation.PolicyWsdlFragment;
@WebService(name = "Hello", targetNamespace =
"http://org.jboss.ws/samples/wssecuritypolicy")
-//@PolicyWsdlFragment(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
@PolicyWsdlFragment(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class HelloJavaBean
Modified:
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java
===================================================================
---
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java 2007-05-16
22:34:28 UTC (rev 3114)
@@ -69,14 +69,11 @@
private Hello getPort() throws Exception
{
URL wsdlURL = new
File("wsprovide/resources/jaxws/samples/wssecuritypolicy/HelloService.wsdl").toURL();
- //URL securityURL = new
File("resources/jaxws/samples/wssecuritypolicy/simple-encrypt/META-INF/jboss-wsse-client.xml").toURL();
QName serviceName = new
QName("http://org.jboss.ws/samples/wssecuritypolicy",
"HelloService");
Service service = Service.create(wsdlURL, serviceName);
- //((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
Hello port = (Hello)service.getPort(Hello.class);
- //((StubExt)port).setConfigName("Standard WSSecurity Client");
Map<String, Object> reqContext =
((BindingProvider)port).getRequestContext();
reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" +
getServerHost() + ":8080/jaxws-samples-wssecuritypolicy-encrypt");
Deleted:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/Policy.xml 2007-05-16
22:34:28 UTC (rev 3114)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<wsp:Policy wsu:Id="X509EndpointPolicy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
-
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:jboss-ws-security
xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_...
- <sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
- <sp:key-store-password>jbossws</sp:key-store-password>
-
<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>
- <sp:trust-store-password>jbossws</sp:trust-store-password>
- <sp:config>
- <sp:encrypt type="x509v3" alias="wsse"/>
- <sp:requires>
- <sp:encryption/>
- </sp:requires>
- </sp:config>
- </sp:jboss-ws-security>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-
Added:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/Policy.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/Policy.xml
(rev 0)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecurityAnnotatedpolicy/WEB-INF/Policy.xml 2007-05-16
22:34:28 UTC (rev 3114)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<wsp:Policy wsu:Id="X509EndpointPolicy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:jboss-ws-security
xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_...
+ <sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>
+ <sp:key-store-password>jbossws</sp:key-store-password>
+
<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-file>
+ <sp:trust-store-password>jbossws</sp:trust-store-password>
+ <sp:config>
+ <sp:encrypt type="x509v3" alias="wsse"/>
+ <sp:requires>
+ <sp:encryption/>
+ </sp:requires>
+ </sp:config>
+ </sp:jboss-ws-security>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
Deleted:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/simple-encrypt/META-INF/jboss-wsse-client.xml
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/simple-encrypt/META-INF/jboss-wsse-client.xml 2007-05-16
20:47:45 UTC (rev 3113)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/simple-encrypt/META-INF/jboss-wsse-client.xml 2007-05-16
22:34:28 UTC (rev 3114)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security
xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <encrypt type="x509v3" alias="wsse"/>
- <requires>
- <encryption/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file