jax ws - Client classes generated by cxf-codegen-plugin:wsdl2java missing Policies attached in WSDL -


i used cxf-codegen-plugin generate client classes:

<plugin>     <groupid>org.apache.cxf</groupid>     <artifactid>cxf-codegen-plugin</artifactid>     <version>2.7.4</version>     <executions>         <execution>             <goals>                 <goal>wsdl2java</goal>             </goals>             <phase>generate-sources</phase>             <configuration>                 <wsdloptions>                     <wsdloption>                         <wsdlartifact>                             <groupid>webservices</groupid>                             <artifactid>ws-dosomething</artifactid>                             <version>1.0-snapshot</version>                         </wsdlartifact>                     </wsdloption>                 </wsdloptions>             </configuration>         </execution>     </executions> </plugin> 

i found policies attached in "webservices:ws-something:1.0-snapshot:wsdl" not found in generated classes. when send requests using client:

<cxf:bus>     <cxf:features>         <p:policies />     </cxf:features> </cxf:bus>  <jaxws:client id="dosomethingservice" address="http://localhost/cxf/services/dosomething" serviceclass="webservices.dosomething.dosomethingservice">     <jaxws:properties>         <entry key="ws-security.signature.properties" value="crypto.properties" />         <entry key="ws-security.callback-handler" value="webservices.dosomething.wspasswordprovider" />     </jaxws:properties> </jaxws:client> 

, server complains:

org.apache.cxf.interceptor.fault: these policy alternatives can not satisfied:  {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}asymmetricbinding: received timestamp not match requirements {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}x509token: received token not match token inclusion requirement {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}x509token {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}initiatortoken {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}recipienttoken {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}includetimestamp: received timestamp not match requirements {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}signedparts: {http://schemas.xmlsoap.org/soap/envelope/}body not signed 

jax-ws annotations present in client classes, while apache cxf annotations "@policies" , "@policy" missing.

is normal? should apply policies @ client side?

provide wsdllocation attribute jaxws:client. policies pulled wsdl whenever possible.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -