ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gi...@apache.org
Subject svn commit: r1172285 [47/48] - in /webservices/wss4j/branches/swssf: ./ cxf-integration/ cxf-integration/src/ cxf-integration/src/main/ cxf-integration/src/main/java/ cxf-integration/src/main/java/org/ cxf-integration/src/main/java/org/swssf/ cxf-integ...
Date Sun, 18 Sep 2011 13:51:36 GMT
Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/policy/policy1.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/policy/policy1.xml?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/policy/policy1.xml (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/policy/policy1.xml Sun Sep 18 13:51:23 2011
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy wsu:Id="SigOnly" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+	<wsp:ExactlyOne>
+		<wsp:All>
+			<sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+					<sp:InitiatorToken>
+						<wsp:Policy>
+							<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:InitiatorToken>
+					<sp:RecipientToken>
+						<wsp:Policy>
+							<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:TripleDesRsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+					<sp:IncludeTimestamp/>
+					<sp:OnlySignEntireHeadersAndBody/>
+				</wsp:Policy>
+			</sp:AsymmetricBinding>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+					<sp:MustSupportRefKeyIdentifier/>
+					<sp:MustSupportRefIssuerSerial/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+			</sp:SignedParts>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/recursiveDTD.txt
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/recursiveDTD.txt?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/recursiveDTD.txt (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/recursiveDTD.txt Sun Sep 18 13:51:23 2011
@@ -0,0 +1,104 @@
+<?xml version="1.0" ?>
+<!DOCTYPE foobar [
+	<!ENTITY x0 "hello">
+	<!ENTITY x1 "&x0;&x0;">
+	<!ENTITY x2 "&x1;&x1;">
+	<!ENTITY x3 "&x2;&x2;">
+	<!ENTITY x4 "&x3;&x3;">
+	<!ENTITY x5 "&x4;&x4;">
+	<!ENTITY x6 "&x5;&x5;">
+	<!ENTITY x7 "&x6;&x6;">
+	<!ENTITY x8 "&x7;&x7;">
+	<!ENTITY x9 "&x8;&x8;">
+	<!ENTITY x10 "&x9;&x9;">
+	<!ENTITY x11 "&x10;&x10;">
+	<!ENTITY x12 "&x11;&x11;">
+	<!ENTITY x13 "&x12;&x12;">
+	<!ENTITY x14 "&x13;&x13;">
+	<!ENTITY x15 "&x14;&x14;">
+	<!ENTITY x16 "&x15;&x15;">
+	<!ENTITY x17 "&x16;&x16;">
+	<!ENTITY x18 "&x17;&x17;">
+	<!ENTITY x19 "&x18;&x18;">
+	<!ENTITY x20 "&x19;&x19;">
+	<!ENTITY x21 "&x20;&x20;">
+	<!ENTITY x22 "&x21;&x21;">
+	<!ENTITY x23 "&x22;&x22;">
+	<!ENTITY x24 "&x23;&x23;">
+	<!ENTITY x25 "&x24;&x24;">
+	<!ENTITY x26 "&x25;&x25;">
+	<!ENTITY x27 "&x26;&x26;">
+	<!ENTITY x28 "&x27;&x27;">
+	<!ENTITY x29 "&x28;&x28;">
+	<!ENTITY x30 "&x29;&x29;">
+	<!ENTITY x31 "&x30;&x30;">
+	<!ENTITY x32 "&x31;&x31;">
+	<!ENTITY x33 "&x32;&x32;">
+	<!ENTITY x34 "&x33;&x33;">
+	<!ENTITY x35 "&x34;&x34;">
+	<!ENTITY x36 "&x35;&x35;">
+	<!ENTITY x37 "&x36;&x36;">
+	<!ENTITY x38 "&x37;&x37;">
+	<!ENTITY x39 "&x38;&x38;">
+	<!ENTITY x40 "&x39;&x39;">
+	<!ENTITY x41 "&x40;&x40;">
+	<!ENTITY x42 "&x41;&x41;">
+	<!ENTITY x43 "&x42;&x42;">
+	<!ENTITY x44 "&x43;&x43;">
+	<!ENTITY x45 "&x44;&x44;">
+	<!ENTITY x46 "&x45;&x45;">
+	<!ENTITY x47 "&x46;&x46;">
+	<!ENTITY x48 "&x47;&x47;">
+	<!ENTITY x49 "&x48;&x48;">
+	<!ENTITY x50 "&x49;&x49;">
+	<!ENTITY x51 "&x50;&x50;">
+	<!ENTITY x52 "&x51;&x51;">
+	<!ENTITY x53 "&x52;&x52;">
+	<!ENTITY x54 "&x53;&x53;">
+	<!ENTITY x55 "&x54;&x54;">
+	<!ENTITY x56 "&x55;&x55;">
+	<!ENTITY x57 "&x56;&x56;">
+	<!ENTITY x58 "&x57;&x57;">
+	<!ENTITY x59 "&x58;&x58;">
+	<!ENTITY x60 "&x59;&x59;">
+	<!ENTITY x61 "&x60;&x60;">
+	<!ENTITY x62 "&x61;&x61;">
+	<!ENTITY x63 "&x62;&x62;">
+	<!ENTITY x64 "&x63;&x63;">
+	<!ENTITY x65 "&x64;&x64;">
+	<!ENTITY x66 "&x65;&x65;">
+	<!ENTITY x67 "&x66;&x66;">
+	<!ENTITY x68 "&x67;&x67;">
+	<!ENTITY x69 "&x68;&x68;">
+	<!ENTITY x70 "&x69;&x69;">
+	<!ENTITY x71 "&x70;&x70;">
+	<!ENTITY x72 "&x71;&x71;">
+	<!ENTITY x73 "&x72;&x72;">
+	<!ENTITY x74 "&x73;&x73;">
+	<!ENTITY x75 "&x74;&x74;">
+	<!ENTITY x76 "&x75;&x75;">
+	<!ENTITY x77 "&x76;&x76;">
+	<!ENTITY x78 "&x77;&x77;">
+	<!ENTITY x79 "&x78;&x78;">
+	<!ENTITY x80 "&x79;&x79;">
+	<!ENTITY x81 "&x80;&x80;">
+	<!ENTITY x82 "&x81;&x81;">
+	<!ENTITY x83 "&x82;&x82;">
+	<!ENTITY x84 "&x83;&x83;">
+	<!ENTITY x85 "&x84;&x84;">
+	<!ENTITY x86 "&x85;&x85;">
+	<!ENTITY x87 "&x86;&x86;">
+	<!ENTITY x88 "&x87;&x87;">
+	<!ENTITY x89 "&x88;&x88;">
+	<!ENTITY x90 "&x89;&x89;">
+	<!ENTITY x91 "&x90;&x90;">
+	<!ENTITY x92 "&x91;&x91;">
+	<!ENTITY x93 "&x92;&x92;">
+	<!ENTITY x94 "&x93;&x93;">
+	<!ENTITY x95 "&x94;&x94;">
+	<!ENTITY x96 "&x95;&x95;">
+	<!ENTITY x97 "&x96;&x96;">
+	<!ENTITY x98 "&x97;&x97;">
+	<!ENTITY x99 "&x98;&x98;">
+	<!ENTITY x100 "&x99;&x99;">
+]>

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/StockQuote.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/StockQuote.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/StockQuote.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/StockQuote.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,54 @@
+<wsdl11:definitions name="StockQuote"
+        targetNamespace="http://www.example.com/stock/binding"
+        xmlns:tns="http://www.example.com/stock/binding"
+        xmlns:fab="http://www.example.com/stock"
+        xmlns:rmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+        xmlns:wsp="http://www.w3.org/ns/ws-policy"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" >
+   <wsp:Policy wsu:Id="RmPolicy" >
+     <rmp:RMAssertion>
+       <wsp:Policy/>
+     </rmp:RMAssertion>
+   </wsp:Policy>
+     <wsp:Policy wsu:Id="X509EndpointPolicy" >
+       <sp:AsymmetricBinding>
+         <wsp:Policy>
+               <!-- Details omitted for readability -->
+           <sp:IncludeTimestamp />
+           <sp:OnlySignEntireHeadersAndBody />
+         </wsp:Policy>
+       </sp:AsymmetricBinding>
+     </wsp:Policy>
+     <wsp:Policy wsu:Id="SecureMessagePolicy" >
+       <sp:SignedParts>
+         <sp:Body />
+       </sp:SignedParts>
+       <sp:EncryptedParts>
+         <sp:Body />
+       </sp:EncryptedParts>
+     </wsp:Policy>
+<!--     <wsdl11:import namespace="http://www.example.com/stock"
+            location="http://www.example.com/stock/stock.wsdl" /> -->
+     <wsdl11:binding name="StockQuoteSoapBinding" type="fab:Quote" >
+       <wsoap12:binding style="document"
+          transport="http://schemas.xmlsoap.org/soap/http" />
+       <wsp:PolicyReference URI="#RmPolicy" wsdl11:required="true" />
+       <wsp:PolicyReference URI="#X509EndpointPolicy" wsdl11:required="true" />
+       <wsdl11:operation name="GetLastTradePrice" >
+         <wsoap12:operation soapAction="http://www.example.com/stock/Quote/GetLastTradePriceRequest" />
+           <wsdl11:input>
+             <wsoap12:body use="literal" />
+             <wsp:PolicyReference URI="#SecureMessagePolicy"
+                                      wsdl11:required="true" />
+           </wsdl11:input>
+           <wsdl11:output>
+             <wsoap12:body use="literal" />
+             <wsp:PolicyReference URI="#SecureMessagePolicy"
+                                  wsdl11:required="true" />
+           </wsdl11:output>
+       </wsdl11:operation>
+     </wsdl11:binding>
+ </wsdl11:definitions>

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/actionSpoofing.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/actionSpoofing.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/actionSpoofing.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/actionSpoofing.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp:Basic256Rsa15/>
+                            </wsp12:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:IncludeTimestamp/>
+                    </wsp12:Policy>
+                </sp:AsymmetricBinding>
+                <sp:SignedParts>
+                    <sp:Body/>
+                </sp:SignedParts>
+                <sp:EncryptedParts>
+                    <spBody/>
+                </sp:EncryptedParts>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequestNoPolicy">
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="emptyPolicyOperation">
+            <wsdl:input message="tns:WsdlRequestNoPolicy">
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="goodPolicy" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="emptyPolicyOperation">
+            <soap:operation soapAction="emptyPolicy" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndProtectionOrderSignBeforeEncryptAndSignedUsernameSupportingTokenPolicyNegativeTest.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndProtectionOrderSignBeforeEncryptAndSignedUsernameSupportingTokenPolicyNegativeTest.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndProtectionOrderSignBeforeEncryptAndSignedUsernameSupportingTokenPolicyNegativeTest.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndProtectionOrderSignBeforeEncryptAndSignedUsernameSupportingTokenPolicyNegativeTest.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:InitiatorToken>
+                            <wsp12:Policy>
+                                <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>CN=transmitter,OU=swssf,C=CH</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <!-- 9 WSS: SOAP Message Security Options
+                                        Optional and not implemented:-->
+                                        <!--<sp1:RequireKeyIdentifierReference/> -->
+                                        <!--<sp1:RequireIssuerSerialReference/>-->
+                                        <!--
+                                        <sp1:RequireEmbeddedTokenReference/>
+                                        <sp1:RequireThumbprintReference/>
+                                        -->
+                                        <sp1:WssX509V3Token11/>
+                                        <!--
+                                      <sp1:WssX509Pkcs7Token10/>
+                                      <sp1:WssX509PkiPathV1Token10/>
+                                      <sp1:WssX509V1Token11/>
+                                      <sp1:WssX509V3Token11/>
+                                      <sp1:WssX509Pkcs7Token11/>
+                                      <sp1:WssX509PkiPathV1Token11/>
+                                      -->
+                                    </wsp12:Policy>
+                                </sp1:X509Token>
+                            </wsp12:Policy>
+                        </sp1:InitiatorToken>
+                        <sp1:RecipientToken>
+                            <wsp12:Policy>
+                              <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                  <sp1:IssuerName>CN=receiver,OU=swssf,C=CH</sp1:IssuerName>
+                                  <wsp12:Policy>
+                                      <!--
+                                      <sp1:RequireIssuerSerialReference/>
+                                      -->
+                                      <sp1:WssX509V3Token11/>
+                                  </wsp12:Policy>
+                              </sp1:X509Token>
+                            </wsp12:Policy>
+                         </sp1:RecipientToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <sp1:IncludeTimestamp/>
+                        <!--<sp1:EncryptBeforeSigning/>-->
+                        <sp1:EncryptSignature/>
+                        <sp1:ProtectTokens/>
+                        <sp1:OnlySignEntireHeadersAndBody/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                </sp1:EncryptedParts>
+                <sp1:SignedSupportingTokens>
+                    <wsp12:Policy>
+                        <sp1:UsernameToken IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <wsp12:Policy>
+                                <!--<sp1:HashPassword/>-->
+                                <sp1:NoPassword/>
+                                <!--<sp1:Created/>
+                                <sp1:Nonce/>-->
+                            </wsp12:Policy>
+                        </sp1:UsernameToken>
+                    </wsp12:Policy>
+                </sp1:SignedSupportingTokens>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:InitiatorToken>
+                            <wsp12:Policy>
+                                <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>CN=transmitter,OU=swssf,C=CH</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <!-- 9 WSS: SOAP Message Security Options
+                                        Optional and not implemented:-->
+                                        <!--<sp1:RequireKeyIdentifierReference/> -->
+                                        <!--<sp1:RequireIssuerSerialReference/>-->
+                                        <!--
+                                        <sp1:RequireEmbeddedTokenReference/>
+                                        <sp1:RequireThumbprintReference/>
+                                        -->
+                                        <sp1:WssX509V3Token11/>
+                                        <!--
+                                      <sp1:WssX509Pkcs7Token10/>
+                                      <sp1:WssX509PkiPathV1Token10/>
+                                      <sp1:WssX509V1Token11/>
+                                      <sp1:WssX509V3Token11/>
+                                      <sp1:WssX509Pkcs7Token11/>
+                                      <sp1:WssX509PkiPathV1Token11/>
+                                      -->
+                                    </wsp12:Policy>
+                                </sp1:X509Token>
+                            </wsp12:Policy>
+                        </sp1:InitiatorToken>
+                        <sp1:RecipientToken>
+                            <wsp12:Policy>
+                              <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                  <sp1:IssuerName>CN=receiver,OU=swssf,C=CH</sp1:IssuerName>
+                                  <wsp12:Policy>
+                                      <!--
+                                      <sp1:RequireIssuerSerialReference/>
+                                      -->
+                                      <sp1:WssX509V3Token11/>
+                                  </wsp12:Policy>
+                              </sp1:X509Token>
+                            </wsp12:Policy>
+                         </sp1:RecipientToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <sp1:IncludeTimestamp/>
+                        <!--<sp1:EncryptBeforeSigning/>-->
+                        <sp1:EncryptSignature/>
+                        <sp1:ProtectTokens/>
+                        <sp1:OnlySignEntireHeadersAndBody/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+                <sp1:SignedSupportingTokens>
+                    <wsp12:Policy>
+                        <sp1:UsernameToken IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <wsp12:Policy>
+                                <!--<sp1:HashPassword/>-->
+                                <sp1:NoPassword/>
+                                <!--<sp1:Created/>
+                                <sp1:Nonce/>-->
+                            </wsp12:Policy>
+                        </sp1:UsernameToken>
+                    </wsp12:Policy>
+                </sp1:SignedSupportingTokens>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicy.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicy.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicy.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicy.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:InitiatorToken>
+                            <wsp12:Policy>
+                                <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>CN=transmitter,OU=swssf,C=CH</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <!-- 9 WSS: SOAP Message Security Options
+                                        Optional and not implemented:-->
+                                        <!--<sp1:RequireKeyIdentifierReference/> -->
+                                        <!--<sp1:RequireIssuerSerialReference/>-->
+                                        <!--
+                                        <sp1:RequireEmbeddedTokenReference/>
+                                        <sp1:RequireThumbprintReference/>
+                                        -->
+                                        <sp1:WssX509V3Token11/>
+                                        <!--
+                                      <sp1:WssX509Pkcs7Token10/>
+                                      <sp1:WssX509PkiPathV1Token10/>
+                                      <sp1:WssX509V1Token11/>
+                                      <sp1:WssX509V3Token11/>
+                                      <sp1:WssX509Pkcs7Token11/>
+                                      <sp1:WssX509PkiPathV1Token11/>
+                                      -->
+                                    </wsp12:Policy>
+                                </sp1:X509Token>
+                            </wsp12:Policy>
+                        </sp1:InitiatorToken>
+                        <sp1:RecipientToken>
+                            <wsp12:Policy>
+                              <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                  <sp1:IssuerName>CN=receiver,OU=swssf,C=CH</sp1:IssuerName>
+                                  <wsp12:Policy>
+                                      <!--
+                                      <sp1:RequireIssuerSerialReference/>
+                                      -->
+                                      <sp1:WssX509V3Token11/>
+                                  </wsp12:Policy>
+                              </sp1:X509Token>
+                            </wsp12:Policy>
+                         </sp1:RecipientToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <sp1:IncludeTimestamp/>
+                        <sp1:EncryptSignature/>
+                        <sp1:ProtectTokens/>
+                        <sp1:OnlySignEntireHeadersAndBody/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+            </wsp12:All>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256Rsa15/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:IncludeTimestamp/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsds"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsds"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+                <sp1:RequiredParts>
+                    <sp1:Header Name="Header1" Namespace="www.example.org"/>
+                </sp1:RequiredParts>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicyNegativeTest.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicyNegativeTest.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicyNegativeTest.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testAsymmetricBindingIncludeTimestampPolicyNegativeTest.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:InitiatorToken>
+                            <wsp12:Policy>
+                                <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>CN=transmitter,OU=swssf,C=CH</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <!-- 9 WSS: SOAP Message Security Options
+                                        Optional and not implemented:-->
+                                        <!--<sp1:RequireKeyIdentifierReference/> -->
+                                        <!--<sp1:RequireIssuerSerialReference/>-->
+                                        <!--
+                                        <sp1:RequireEmbeddedTokenReference/>
+                                        <sp1:RequireThumbprintReference/>
+                                        -->
+                                        <sp1:WssX509V3Token11/>
+                                        <!--
+                                      <sp1:WssX509Pkcs7Token10/>
+                                      <sp1:WssX509PkiPathV1Token10/>
+                                      <sp1:WssX509V1Token11/>
+                                      <sp1:WssX509V3Token11/>
+                                      <sp1:WssX509Pkcs7Token11/>
+                                      <sp1:WssX509PkiPathV1Token11/>
+                                      -->
+                                    </wsp12:Policy>
+                                </sp1:X509Token>
+                            </wsp12:Policy>
+                        </sp1:InitiatorToken>
+                        <sp1:RecipientToken>
+                            <wsp12:Policy>
+                              <sp1:X509Token IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                  <sp1:IssuerName>CN=receiver,OU=swssf,C=CH</sp1:IssuerName>
+                                  <wsp12:Policy>
+                                      <!--
+                                      <sp1:RequireIssuerSerialReference/>
+                                      -->
+                                      <sp1:WssX509V3Token11/>
+                                  </wsp12:Policy>
+                              </sp1:X509Token>
+                            </wsp12:Policy>
+                         </sp1:RecipientToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <!--<sp1:IncludeTimestamp/>-->
+                        <sp1:EncryptSignature/>
+                        <sp1:ProtectTokens/>
+                        <sp1:OnlySignEntireHeadersAndBody/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+            </wsp12:All>
+            <wsp12:All>
+                <sp1:AsymmetricBinding>
+                    <wsp12:Policy>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256Rsa15/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:IncludeTimestamp/>
+                    </wsp12:Policy>
+                </sp1:AsymmetricBinding>
+                <sp1:SignedParts>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsds"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsds"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+                <sp1:RequiredParts>
+                    <sp1:Header Name="Header1" Namespace="www.example.org"/>
+                </sp1:RequiredParts>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingBasicAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingBasicAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingBasicAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingBasicAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:TransportBinding>
+                    <wsp12:Policy>
+                        <sp1:TransportToken>
+                            <wsp12:Policy>
+                                <sp1:HttpsToken>
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>transmitter</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <sp1:HttpBasicAuthentication/>
+                                    </wsp12:Policy>
+                                </sp1:HttpsToken>
+                            </wsp12:Policy>
+                        </sp1:TransportToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <sp1:IncludeTimestamp/>
+                    </wsp12:Policy>
+                </sp1:TransportBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+                <sp1:SignedSupportingTokens>
+                    <wsp12:Policy>
+                        <sp1:UsernameToken IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <wsp12:Policy>
+                                <!--<sp1:HashPassword/>-->
+                                <sp1:NoPassword/>
+                                <!--<sp1:Created/>
+                                <sp1:Nonce/>-->
+                            </wsp12:Policy>
+                        </sp1:UsernameToken>
+                    </wsp12:Policy>
+                </sp1:SignedSupportingTokens>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file

Added: webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingHttpsClientAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingHttpsClientAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl?rev=1172285&view=auto
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingHttpsClientAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl (added)
+++ webservices/wss4j/branches/swssf/streaming-ws-security/src/test/resources/testdata/wsdl/testTransportBindingHttpsClientAuthenticationIncludeTimestampAndSignedUsernameSupportingTokenPolicy.wsdl Sun Sep 18 13:51:23 2011
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        name="PlainService"
+        targetNamespace="http://www.example.net/WSDLService"
+        xmlns:tns="http://www.example.net/WSDLService"
+        xmlns:wsp12="http://schemas.xmlsoap.org/ws/2004/09/policy"
+        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"
+        xmlns:sp1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        >
+
+    <wsdl:types>
+        <xs:schema>
+            <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
+                       schemaLocation="wsdl.xsd"/>
+        </xs:schema>
+    </wsdl:types>
+
+    <wsp12:Policy wsu:Id="MessagePolicy3">
+        <wsp12:ExactlyOne>
+            <wsp12:All>
+                <sp1:TransportBinding>
+                    <wsp12:Policy>
+                        <sp1:TransportToken>
+                            <wsp12:Policy>
+                                <sp1:HttpsToken>
+                                    <!--<sp1:Issuer>wsa:EndpointReferenceType</sp1:Issuer>-->
+                                    <sp1:IssuerName>CN=transmitter,OU=swssf,C=CH</sp1:IssuerName>
+                                    <wsp12:Policy>
+                                        <sp1:RequireClientCertificate/>
+                                    </wsp12:Policy>
+                                </sp1:HttpsToken>
+                            </wsp12:Policy>
+                        </sp1:TransportToken>
+                        <sp1:AlgorithmSuite>
+                            <wsp12:Policy>
+                                <sp1:Basic256/>
+                            </wsp12:Policy>
+                        </sp1:AlgorithmSuite>
+                        <sp1:Layout>
+                            <wsp12:Policy>
+                                <sp1:Lax/>
+                            </wsp12:Policy>
+                        </sp1:Layout>
+                        <sp1:IncludeTimestamp/>
+                    </wsp12:Policy>
+                </sp1:TransportBinding>
+                <sp1:SignedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header1" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:SignedParts>
+                <sp1:SignedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:SignedElements>
+                <sp1:EncryptedParts>
+                    <sp1:Body/>
+                    <sp1:Header Name="Header2" Namespace="..."/>
+                    <sp1:Header Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+                </sp1:EncryptedParts>
+                <sp1:EncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Created</sp1:XPath>
+                </sp1:EncryptedElements>
+                <sp1:ContentEncryptedElements>
+                    <sp1:XPath xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">wsu:Expires</sp1:XPath>
+                </sp1:ContentEncryptedElements>
+                <sp1:SignedSupportingTokens>
+                    <wsp12:Policy>
+                        <sp1:UsernameToken IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <wsp12:Policy>
+                                <!--<sp1:HashPassword/>-->
+                                <sp1:NoPassword/>
+                                <!--<sp1:Created/>
+                                <sp1:Nonce/>-->
+                            </wsp12:Policy>
+                        </sp1:UsernameToken>
+                    </wsp12:Policy>
+                </sp1:SignedSupportingTokens>
+            </wsp12:All>
+        </wsp12:ExactlyOne>
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="MessagePolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortTypePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy2">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="BindingPolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OperationPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="InputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="OutputPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="FaultPolicy1">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="ServicePolicy">
+    </wsp12:Policy>
+    <wsp12:Policy wsu:Id="PortPolicy">
+    </wsp12:Policy>
+
+    <wsdl:message name="WsdlRequest">
+        <wsp12:PolicyReference URI="#MessagePolicy3"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlResponse">
+        <wsp12:PolicyReference URI="#MessagePolicy2"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+    <wsdl:message name="WsdlFault">
+        <wsp12:PolicyReference URI="#MessagePolicy1"/>
+        <wsdl:part name="parameters" element="wsdl:definitions"/>
+    </wsdl:message>
+
+    <wsdl:portType name="WsdlPort">
+        <wsp12:PolicyReference URI="#PortTypePolicy"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy2"/>
+            <wsdl:input message="tns:WsdlRequest">
+                <!-- attaching policies is per wsdl.xsd not allowed here. But the spec
+                http://www.w3.org/TR/2007/REC-ws-policy-attach-20070904/#MessagePolicySubject
+                states it's possible... hmmm -->
+                <wsp12:PolicyReference URI="#InputPolicy2"/>
+            </wsdl:input>
+            <wsdl:output message="tns:WsdlResponse">
+                <wsp12:PolicyReference URI="#OutputPolicy2"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault" message="tns:WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy2"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+
+    <wsdl:binding name="WsdlSOAPBinding" type="tns:WsdlPort">
+        <wsp12:PolicyReference URI="#BindingPolicy"/>
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+        <wsdl:operation name="definitions">
+            <wsp12:PolicyReference URI="#OperationPolicy1"/>
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input>
+                <wsp12:PolicyReference URI="#InputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <wsp12:PolicyReference URI="#OutputPolicy1"/>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="WsdlFault">
+                <wsp12:PolicyReference URI="#FaultPolicy1"/>
+                <soap:fault name="WsdlFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+
+    <wsdl:service name="WsdlService">
+        <wsp12:PolicyReference URI="#ServicePolicy"/>
+        <wsdl:port name="Wsdl" binding="tns:WsdlSOAPBinding">
+            <wsp12:PolicyReference URI="#PortPolicy"/>
+            <soap:address
+                    location="http://localhost:8080/WsdlService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
+        
\ No newline at end of file



Mime
View raw message