[jbossws-commits] JBossWS SVN: r3178 - in branches/JBWS-856: jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws and 6 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue May 22 04:34:52 EDT 2007


Author: palin
Date: 2007-05-22 04:34:52 -0400 (Tue, 22 May 2007)
New Revision: 3178

Added:
   branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/
   branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl
Removed:
   branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
   branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl
   branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl
Modified:
   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/build.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:
Removed annotation @PolicyWsdlFragment; changed wssecuritypolicy sample to deal with policies in a user provided wsdl



Deleted: branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java
===================================================================
--- branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java	2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/annotation/PolicyWsdlFragment.java	2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,47 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Defines a policy attachment.
- *
- * @author Alessio Soldano, <alessio.soldano at javalinux.it>
- * @since 25-Apr-2007
- */
- at Retention(value = RetentionPolicy.RUNTIME)
- at Target(value = { ElementType.TYPE, ElementType.METHOD})
-public @interface PolicyWsdlFragment {
-   
-   /**
-    * The location of a pre-defined policy expression.
-    * The policyLocation is a URL (relative or absolute) that refers to a file containing
-    * WSLD fragment in which one or more policy expression(s) are provided and attached.
-    * 
-    */
-   String wsdlFragmentLocation();
-   
-}

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-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-05-22 08:34:52 UTC (rev 3178)
@@ -23,7 +23,10 @@
 
 // $Id$
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.Writer;
 import java.net.URL;
 
 import javax.jws.HandlerChain;
@@ -34,26 +37,30 @@
 
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.PolicyWsdlFragment;
 import org.jboss.ws.core.server.UnifiedDeploymentInfo;
 import org.jboss.ws.core.utils.IOUtils;
 import org.jboss.ws.extensions.policy.annotation.PolicyAttachment;
 import org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder;
 import org.jboss.ws.metadata.builder.MetaDataBuilder;
-import org.jboss.ws.metadata.umdm.*;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+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.HandlerMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
 import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.metadata.wsdl.WSDLUtils;
 import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
 import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
 import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
 import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.ws.metadata.webservices.WebservicesMetaData;
-import org.jboss.ws.metadata.webservices.WebservicesFactory;
-import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
 import org.jboss.ws.tools.ToolsUtils;
 import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
@@ -141,7 +148,7 @@
          
          // The server must always generate WSDL
          if (generateWsdl || !toolMode)
-            processOrGenerateWSDL(seiClass, serviceMetaData, result.wsdlLocation, sepMetaData, result.policyLocation);
+            processOrGenerateWSDL(seiClass, serviceMetaData, result.wsdlLocation, sepMetaData);
 
          // No need to process endpoint items if we are in tool mode
          if (toolMode)
@@ -339,29 +346,10 @@
       result.serviceMetaData.addEndpoint(result.sepMetaData);
       wsMetaData.addService(result.serviceMetaData);
       
-      //Check for policy attachment file
-      PolicyWsdlFragment anPolicy = sepClass.getAnnotation(PolicyWsdlFragment.class);
-      if (anPolicy!=null)
-      {
-         String policyLocation = anPolicy.wsdlFragmentLocation();
-         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 
-         {
-            result.policyLocation = udi.getMetaDataFileURL(policyLocation);
-         }
-         log.debug("Policy Location: " + result.policyLocation);
-      }
-
       return result;
    }
 
-   private void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, URL wsdlLocation, EndpointMetaData epMetaData, URL policyLocation)
+   private void processOrGenerateWSDL(Class wsClass, ServiceMetaData serviceMetaData, URL wsdlLocation, EndpointMetaData epMetaData)
    {
       PolicyMetaDataBuilder policyBuilder = PolicyMetaDataBuilder.getServerSidePolicyMetaDataBuilder(toolMode);
       try
@@ -374,12 +362,6 @@
             //need to look for policies and eventually choose the supported policy alternatives
             WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation);
             policyBuilder.processPolicyExtensions(epMetaData, wsdlDefinitions);
-            if (policyLocation != null)
-            {
-               //process wsdl fragment with additional policies
-               WSDLDefinitions policyDefinitions = factory.parse(policyLocation);
-               policyBuilder.processPolicyExtensions(epMetaData, policyDefinitions);
-            }
             //now we have the UMDM containing policy data; anyway we can't write a new wsdl file with
             //the supported alternatives and so on, since we need to publish the file the user provided
             serviceMetaData.setWsdlLocation(wsdlLocation);
@@ -387,20 +369,7 @@
          else
          {
                WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
-               //we write the generated wsdl right now only if we have no additional policies
-               //otherwise we first parse them since they may change the actual wsdl to be written
-               if (policyLocation == null)
-               {
-                  writeWsdl(serviceMetaData,wsdlDefinitions,epMetaData);
-               }
-               else
-               {
-                  WSDLDefinitions policyDefinitions = factory.parse(policyLocation);
-                  policyBuilder.processPolicyExtensions(epMetaData, policyDefinitions);
-                  //generate the wsdl4j model again for the actual UMDM containing policy data
-                  WSDLDefinitions actualWsdlDefinitions = generator.generate(serviceMetaData);
-                  writeWsdl(serviceMetaData,actualWsdlDefinitions,epMetaData);
-               }
+               writeWsdl(serviceMetaData,wsdlDefinitions,epMetaData);
          }
       }
       catch (RuntimeException rte)

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-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/ant-import/build-samples-jaxws.xml	2007-05-22 08:34:52 UTC (rev 3178)
@@ -468,9 +468,9 @@
         <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="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">

Modified: branches/JBWS-856/jbossws-tests/build.xml
===================================================================
--- branches/JBWS-856/jbossws-tests/build.xml	2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/build.xml	2007-05-22 08:34:52 UTC (rev 3178)
@@ -261,7 +261,7 @@
     <wsconsume wsdl="${tests.resources.dir}/jaxws/complex/META-INF/wsdl/RegistrationService.wsdl" package="org.jboss.test.ws.jaxws.complex" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
     <wsconsume wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl" package="org.jboss.test.ws.jaxws.holder" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
     <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecurity/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecurity" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
-    <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
+    <wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
   	<wsconsume wsdl="${tests.resources.dir}/jaxws/samples/wssecurityAnnotatedpolicy/META-INF/wsdl/HelloService.wsdl" package="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy" sourcedestdir="${tests.output.dir}/wsconsume/java" keep="true"/>
   		  	
   </target>
@@ -359,7 +359,6 @@
     </taskdef>    
     
     <wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurity" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean"/>
-	<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecuritypolicy" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecuritypolicy.HelloJavaBean"/>
 	<wsprovide resourcedestdir="${tests.output.dir}/wsprovide/resources/jaxws/samples/wssecurityAnnotatedpolicy" genwsdl="true" sei="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy.HelloJavaBean"/>
 
   </target>

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-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java	2007-05-22 08:34:52 UTC (rev 3178)
@@ -28,10 +28,8 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.annotation.PolicyWsdlFragment;
 
- at WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/samples/wssecuritypolicy")
- at PolicyWsdlFragment(wsdlFragmentLocation="WEB-INF/PolicyAttachmentFragment.wsdl")
+ at WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/samples/wssecuritypolicy", wsdlLocation="WEB-INF/wsdl/HelloService.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-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java	2007-05-22 08:34:52 UTC (rev 3178)
@@ -68,7 +68,7 @@
 
    private Hello getPort() throws Exception
    {
-      URL wsdlURL = new File("wsprovide/resources/jaxws/samples/wssecuritypolicy/HelloService.wsdl").toURL();
+      URL wsdlURL = new File("resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl").toURL();
       QName serviceName = new QName("http://org.jboss.ws/samples/wssecuritypolicy", "HelloService");
 
       Service service = Service.create(wsdlURL, serviceName);

Deleted: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl	2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl	2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='HelloService' targetNamespace='http://org.jboss.ws/samples/wssecurity' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecurity' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types>
-  <xs:schema targetNamespace='http://org.jboss.ws/samples/wssecurity' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
-   <xs:complexType name='UserType'>
-    <xs:sequence>
-     <xs:element minOccurs='0' name='msg' type='xs:string'/>
-    </xs:sequence>
-   </xs:complexType>
-  </xs:schema>
- </types>
- <message name='Hello_echoUserType'>
-  <part name='user' type='tns:UserType'/>
- </message>
- <message name='Hello_echoUserTypeResponse'>
-  <part name='return' type='tns:UserType'/>
- </message>
- <portType name='Hello'>
-  <operation name='echoUserType' parameterOrder='user'>
-   <input message='tns:Hello_echoUserType'/>
-   <output message='tns:Hello_echoUserTypeResponse'/>
-  </operation>
- </portType>
- <binding name='HelloBinding' type='tns:Hello'>
-  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
-  <operation name='echoUserType'>
-   <soap:operation soapAction=''/>
-   <input>
-    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
-   </input>
-   <output>
-    <soap:body namespace='http://org.jboss.ws/samples/wssecurity' use='literal'/>
-   </output>
-  </operation>
- </binding>
- <service name='HelloService'>
-  <port binding='tns:HelloBinding' name='HelloPort'>
-   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
-  </port>
- </service>
-</definitions>
\ No newline at end of file

Deleted: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl	2007-05-22 08:33:54 UTC (rev 3177)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/PolicyAttachmentFragment.wsdl	2007-05-22 08:34:52 UTC (rev 3178)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<definitions name="TestService" targetNamespace="http://org.jboss.ws/samples/wssecuritypolicy" 
-	xmlns:tns="http://org.jboss.ws/samples/wssecuritypolicy" 
-	     xmlns="http://schemas.xmlsoap.org/wsdl/" 
-	     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-	     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
-	     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
-	     xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd"
-	     xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" 
-	     xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <wsp:Policy wsu:Id="X509EndpointPolicy">
- 	<wsp:ExactlyOne>
-		<wsp:All>
-  			<sp:jboss-ws-security xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
-                <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>
- <binding name='HelloBinding' type='tns:Hello'>
-  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
-  <wsp:PolicyReference URI="#X509EndpointPolicy" wsdl:required="true" />		
- </binding>
- <service name='HelloService'>
-  <port binding='tns:HelloBinding' name='HelloPort'>
-   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
-  </port>
- </service>
-</definitions>

Added: branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl
===================================================================
--- branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl	                        (rev 0)
+++ branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/WEB-INF/wsdl/HelloService.wsdl	2007-05-22 08:34:52 UTC (rev 3178)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='HelloService' targetNamespace='http://org.jboss.ws/samples/wssecuritypolicy' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://org.jboss.ws/samples/wssecurity' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/wssecuritypolicy' xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/09/policy' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+  <xs:schema targetNamespace='http://org.jboss.ws/samples/wssecurity' version='1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+   <xs:complexType name='UserType'>
+    <xs:sequence>
+     <xs:element minOccurs='0' name='msg' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+ </types>
+ <wsp:Policy wsu:Id='X509EndpointPolicy' xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
+  <wsp:All>
+   <sp:jboss-ws-security xmlns:sp='http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd'>
+    <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 alias='wsse' type='x509v3'/>
+     <sp:requires>
+      <sp:encryption/>
+     </sp:requires>
+    </sp:config>
+   </sp:jboss-ws-security>
+  </wsp:All>
+ </wsp:Policy>
+ <message name='Hello_echoUserType'>
+  <part name='user' type='ns1:UserType'/>
+ </message>
+ <message name='Hello_echoUserTypeResponse'>
+  <part name='return' type='ns1:UserType'/>
+ </message>
+ <portType name='Hello'>
+  <operation name='echoUserType' parameterOrder='user'>
+   <input message='tns:Hello_echoUserType'/>
+   <output message='tns:Hello_echoUserTypeResponse'/>
+  </operation>
+ </portType>
+ <binding name='HelloBinding' type='tns:Hello'>
+  <wsp:PolicyReference URI='#X509EndpointPolicy'/>
+  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='echoUserType'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body namespace='http://org.jboss.ws/samples/wssecuritypolicy' use='literal'/>
+   </input>
+   <output>
+    <soap:body namespace='http://org.jboss.ws/samples/wssecuritypolicy' use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='HelloService'>
+  <port binding='tns:HelloBinding' name='HelloPort'>
+   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file




More information about the jbossws-commits mailing list