Author: palin
Date: 2007-05-07 15:39:05 -0400 (Mon, 07 May 2007)
New Revision: 2990
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
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
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/PolicyAttachmentFragment.wsdl
Log:
Partial commit: working on ws security policy sample
Modified:
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-07
13:03:45 UTC (rev 2989)
+++
branches/JBWS-856/jbossws-core/src/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-05-07
19:39:05 UTC (rev 2990)
@@ -482,6 +482,25 @@
}
WSDLService wsdlService =
wsdlDefinitions.getService(epMetaData.getServiceMetaData().getServiceName().getLocalPart());
+
+ System.out.println("****** getPortName="+epMetaData.getPortName());
+ System.out.println("******
getPortTypeName="+epMetaData.getPortTypeName());
+ System.out.println("****** get mio
endpoint="+wsdlService.getEndpoint(epMetaData.getPortName()));
+ System.out.println("****** Endpoints: ");
+ for (int i=0;i<wsdlService.getEndpoints().length; i++) {
+ WSDLEndpoint end = wsdlService.getEndpoints()[i];
+ System.out.println("****** "+i+") "+end);
+ System.out.println("****** "+i+") qname: "+end.getName());
+ }
+ System.out.println("****** Interfaces: ");
+ for (int i=0;i<wsdlDefinitions.getInterfaces().length; i++) {
+ System.out.println("****** "+i+")
"+wsdlDefinitions.getInterfaces()[i]);
+ }
+ System.out.println("****** Bindings: ");
+ for (int i=0;i<wsdlDefinitions.getBindings().length; i++) {
+ System.out.println("****** "+i+")
"+wsdlDefinitions.getBindings()[i]);
+ }
+
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getPortName());
WSDLInterface wsdlInterface =
wsdlDefinitions.getInterface(epMetaData.getPortTypeName());
WSDLBinding wsdlBinding =
wsdlDefinitions.getBindingByInterfaceName(epMetaData.getPortTypeName());
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-07
13:03:45 UTC (rev 2989)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/HelloJavaBean.java 2007-05-07
19:39:05 UTC (rev 2990)
@@ -30,7 +30,7 @@
import org.jboss.ws.annotation.EndpointConfig;
import org.jboss.ws.annotation.Policy;
-@WebService(name = "Hello", targetNamespace =
"http://org.jboss.ws/samples/wssecurity")
+@WebService(name = "Hello", targetNamespace =
"http://org.jboss.ws/samples/wssecuritypolicy")
@Policy(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-07
13:03:45 UTC (rev 2989)
+++
branches/JBWS-856/jbossws-tests/src/java/org/jboss/test/ws/jaxws/samples/wssecuritypolicy/SimpleEncryptTestCase.java 2007-05-07
19:39:05 UTC (rev 2990)
@@ -76,7 +76,7 @@
((ServiceExt)service).setSecurityConfig(securityURL.toExternalForm());
Hello port = (Hello)service.getPort(Hello.class);
- ((StubExt)port).setConfigName("Standard wssecuritypolicy Client");
+ ((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");
Modified:
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-07
13:03:45 UTC (rev 2989)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/META-INF/wsdl/HelloService.wsdl 2007-05-07
19:39:05 UTC (rev 2990)
@@ -1,7 +1,7 @@
<?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'>
+<definitions name='HelloService'
targetNamespace='http://org.jboss.ws/samples/wssecuritypolicy'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://org.jboss.ws/samples/wssecuritypolicy'
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:schema targetNamespace='http://org.jboss.ws/samples/wssecuritypolicy'
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'/>
@@ -38,4 +38,4 @@
<soap:address location='REPLACE_WITH_ACTUAL_URL'/>
</port>
</service>
-</definitions>
\ No newline at end of file
+</definitions>
Modified:
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl
===================================================================
---
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl 2007-05-07
13:03:45 UTC (rev 2989)
+++
branches/JBWS-856/jbossws-tests/src/resources/jaxws/samples/wssecuritypolicy/PolicyAttachmentFragment.wsdl 2007-05-07
19:39:05 UTC (rev 2990)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<definitions name="TestService"
targetNamespace="http://org.jboss.ws/jaxrpc"
- xmlns:tns="http://org.jboss.ws/jaxrpc"
+<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"
@@ -11,36 +11,15 @@
xmlns:sp="http://www.jboss.com/ws-security/schema/jboss-ws-security_...
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:Policy wsu:Id="X509EndpointPolicy" >
- <sp: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: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" />
- <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>
+ <wsp:Policy wsu:Id="X509EndpointPolicy" >
+ </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>