Could you supply a test-case + I'll take a look?

Colm.


On Thu, Apr 25, 2013 at 5:09 PM, simonlmartin
<[email protected]>wrote:

> Hi Colm & Xilai,
>
> Thanks for your help.
>
> I am doing the java first and am using a Policy annotation to get the
> PolicyReference into the generated wsdl.
> I changed the annotation to
> @Policies({
>         @Policy(uri = "classpath:usernamepassword.xml", placement =
> Policy.Placement.DEFAULT)
> })
> from
> @Policies({
>         @Policy(uri = "classpath:usernamepassword.xml", placement =
> Policy.Placement.SERVICE)
> })
>
>
> and it no longer generates two PolicyReferences in the wsdl which now looks
> like the file I will tack on below.
> I still get the
>
> These policy alternatives can not be satisfied:
> {
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}UsernameToken
>
> Thanks for any help you can give me.
>
> Simon.
>
> ---------------------Generated WSDL----------------------------
>
>
> <?xml version="1.0" ?><wsdl:definitions
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:wsp="http://www.w3.org/ns/ws-policy";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:tns="http://test.example.com/semanticServices";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:ns1="http://schemas.xmlsoap.org/soap/http";
> name="semanticServicesIcdUpdateService"
> targetNamespace="http://test.example.com/semanticServices";>
>   <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="http://test.example.com/semanticServices";
> xmlns:ns0="http://icdupdateservice.ontology";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://test.example.com/semanticServices";>
>   <xsd:import namespace="http://icdupdateservice.ontology";></xsd:import>
>   <xsd:complexType name="ArrayOfString">
>     <xsd:sequence>
>       <xsd:element maxOccurs="unbounded" minOccurs="0" name="string"
> nillable="true" type="xsd:string"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="updateICD" type="tns:updateICD"></xsd:element>
>   <xsd:complexType name="updateICD">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="ICDUpdateServiceRequest"
> type="ns0:ArrayOfICDUpdateServiceRequest"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:element name="updateICDResponse"
> type="tns:updateICDResponse"></xsd:element>
>   <xsd:complexType name="updateICDResponse">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="updateICDResponse"
> type="ns0:ArrayOfICDUpdateServiceResponse"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:schema>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="http://icdupdateservice.ontology";
> xmlns:ns1="http://test.example.com/semanticServices";
> xmlns:ns0="http://jastor.rdf.opentest.org";
> attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://icdupdateservice.ontology";>
>   <xsd:import
> namespace="http://test.example.com/semanticServices";></xsd:import>
>   <xsd:import namespace="http://jastor.rdf.opentest.org";></xsd:import>
>   <xsd:complexType name="ArrayOfICDUpdateServiceRequest">
>     <xsd:sequence>
>       <xsd:element maxOccurs="unbounded" minOccurs="0"
> name="ICDUpdateServiceRequest" nillable="true"
> type="tns:ICDUpdateServiceRequest"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:complexType name="ICDUpdateServiceRequest">
>     <xsd:complexContent>
>       <xsd:extension base="ns0:Thing">
>         <xsd:sequence>
>           <xsd:element minOccurs="0" name="applicationName"
> type="xsd:string"></xsd:element>
>           <xsd:element minOccurs="0" name="businessObject"
> type="ns1:ArrayOfString"></xsd:element>
>           <xsd:element minOccurs="0" name="icdIdentifier"
> type="xsd:string"></xsd:element>
>           <xsd:element minOccurs="0" name="interfacePurpose"
> type="xsd:string"></xsd:element>
>           <xsd:element minOccurs="0" name="userID"
> type="xsd:string"></xsd:element>
>         </xsd:sequence>
>       </xsd:extension>
>     </xsd:complexContent>
>   </xsd:complexType>
>   <xsd:complexType name="ArrayOfICDUpdateServiceResponse">
>     <xsd:sequence>
>       <xsd:element maxOccurs="unbounded" minOccurs="0"
> name="ICDUpdateServiceResponse" nillable="true"
> type="tns:ICDUpdateServiceResponse"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
>   <xsd:complexType name="ICDUpdateServiceResponse">
>     <xsd:complexContent>
>       <xsd:extension base="ns0:Thing">
>         <xsd:sequence>
>           <xsd:element minOccurs="0" name="failureMessage"
> type="xsd:string"></xsd:element>
>           <xsd:element minOccurs="0" name="icdIdentifier"
> type="xsd:string"></xsd:element>
>           <xsd:element minOccurs="0" name="updateStatus"
> type="xsd:boolean"></xsd:element>
>         </xsd:sequence>
>       </xsd:extension>
>     </xsd:complexContent>
>   </xsd:complexType>
> </xsd:schema>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="http://rdf.opentest.org"; attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://rdf.opentest.org";>
>   <xsd:complexType name="URI">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="localName" nillable="true"
> type="xsd:string"></xsd:element>
>       <xsd:element minOccurs="0" name="namespace" nillable="true"
> type="xsd:string"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:schema>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:tns="http://jastor.rdf.opentest.org";
> xmlns:ns0="http://rdf.opentest.org"; attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://jastor.rdf.opentest.org";>
>   <xsd:import namespace="http://rdf.opentest.org";></xsd:import>
>   <xsd:complexType name="Thing">
>     <xsd:sequence>
>       <xsd:element minOccurs="0" name="URI" nillable="true"
> type="xsd:string"></xsd:element>
>       <xsd:element minOccurs="0" name="typeURI" nillable="true"
> type="ns0:URI"></xsd:element>
>     </xsd:sequence>
>   </xsd:complexType>
> </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="updateICDResponse">
>     <wsdl:part element="tns:updateICDResponse" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="updateICD">
>     <wsdl:part element="tns:updateICD" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:portType name="IcdUpdate">
>     <wsdl:operation name="updateICD">
>       <wsdl:input message="tns:updateICD" name="updateICD">
>     </wsdl:input>
>       <wsdl:output message="tns:updateICDResponse"
> name="updateICDResponse">
>     </wsdl:output>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="semanticServicesIcdUpdateServiceSoapBinding"
> type="tns:IcdUpdate">
>     <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http";></soap:binding>
>     <wsp:PolicyReference URI="#policy"></wsp:PolicyReference>
>     <wsdl:operation name="updateICD">
>       <soap:operation soapAction="" style="document"></soap:operation>
>       <wsdl:input name="updateICD">
>         <soap:body use="literal"></soap:body>
>       </wsdl:input>
>       <wsdl:output name="updateICDResponse">
>         <soap:body use="literal"></soap:body>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="semanticServicesIcdUpdateService">
>     <wsdl:port binding="tns:semanticServicesIcdUpdateServiceSoapBinding"
> name="IcdUpdatePort">
>       <soap:address
> location="http://localhost/ws-soap/ICDUpdateService/ICDUpdateService
> "></soap:address>
>     </wsdl:port>
>     <wsp:PolicyReference URI="#policy"></wsp:PolicyReference>
>   </wsdl:service>
>     <wsp:Policy
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> xmlns:wsp="http://www.w3.org/ns/ws-policy";
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";
> wsu:Id="policy">
>     <sp:SupportingTokens>
>             <wsp:Policy>
>                 <sp:UsernameToken
> sp:IncludeToken="
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient
> ">
>                     <wsp:Policy></wsp:Policy>
>                 </sp:UsernameToken>
>             </wsp:Policy>
>         </sp:SupportingTokens>
> </wsp:Policy>
> </wsdl:definitions>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Plain-text-password-ws-policy-tp5726729p5726777.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to