web services - Getting error while creating a secured proxy -


i trying configure wss4jininterceptor in cxf endpoint through camel-config.xml

below camel-config.xml

<?xml version="1.0" encoding="utf-8"?>  <!-- start snippet: e1 --> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xmlns:camel="http://camel.apache.org/schema/spring"        xmlns:cxf="http://camel.apache.org/schema/cxf"        xmlns:context="http://www.springframework.org/schema/context"        xsi:schemalocation="        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">    <!-- spring property placeholder, ignore resource not found file resource unit testing -->   <context:property-placeholder location="classpath:incident.properties,file:target/custom.properties"                                 ignore-resource-not-found="true"/>    <!-- bean enriches soap request -->   <bean id="enrichbean" class="org.apache.camel.example.cxf.proxy.enrichbean"/>    <bean id="loggingoutinterceptor" class="org.apache.cxf.interceptor.loggingoutinterceptor"/>   <bean id="loggingininterceptor" class="org.apache.cxf.interceptor.loggingininterceptor"/>       <bean id="wss4jininterceptor" class="org.apache.cxf.ws.security.wss4j.wss4jininterceptor">                   <property name="properties">                       <map>                           <entry key="action" value="usernametoken timestamp"/>                           <entry key="passwordtype" value="passworddigest"/>                           <entry key="ws-security.is-bsp-compliant" value="false"/>                          <entry key="passwordcallbackclass" value="org.apache.camel.example.cxf.proxy.utpasswordcallback"/>                      </map>                   </property>               </bean>     <!-- cxf web service use front end -->   <cxf:cxfendpoint id="versionservice"                    address="http://localhost:${proxy.port}/camel-example-cxf-proxy/webservices/versionadapter"                    endpointname="s:versionhttpsoap11endpoint"                                      servicename="s:version"                    wsdlurl="etc/versionadapter.wsdl"                    xmlns:s="http://axisversion.sample">      <cxf:ininterceptors>             <ref bean="loggingininterceptor"/>             <ref bean="wss4jininterceptor"/>     </cxf:ininterceptors>     <cxf:outinterceptors>             <ref bean="loggingoutinterceptor"/>     </cxf:outinterceptors>    </cxf:cxfendpoint>    <!-- camel route proxies real web service , forwards soap requests -->   <camelcontext xmlns="http://camel.apache.org/schema/spring">      <!-- property contains port number -->     <propertyplaceholder id="properties" location="classpath:incident.properties,file:target/custom.properties"/>      <endpoint id="callrealwebservice" uri="http://localhost:${real.port}/axis2/services/version?bridgeendpoint=true&amp;throwexceptiononfailure=false"/>      <route>       <!-- cxf consumer using message format -->       <from uri="cxf:bean:versionservice?dataformat=message"/>       <!-- log input received -->       <to uri="log:input"/>       <!-- enrich input ensure incidentid parameter set -->       <to uri="bean:enrichbean"/>       <!-- opp removing headers... testing -->       <removeheaders pattern="*" />       <!-- send proxied request real web service -->       <to uri="callrealwebservice"/>       <!-- log answer real web service -->       <to uri="log:output"/>     </route>    </camelcontext>  </beans> <!-- end snippet: e1 --> 

when invoke proxy webservice getting error. here complete error trace..

info: inbound message ---------------------------- id: 1 address: http://localhost:9080/camel-example-cxf-proxy/webservices/versionadapter encoding: utf-8 http-method: post content-type: text/xml;charset=utf-8 headers: {accept-encoding=[gzip,deflate], connection=[keep-alive], content-length=[1097], content-type=[text/xml;charset =utf-8], host=[localhost:9080], soapaction=["urn:getversion"], user-agent=[apache-httpclient/4.1.1 (java 1.5)]} payload: <soapenv:envelope xmlns:axis="http://axisversion.sample" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop e/">    <soapenv:header><wsse:security soapenv:mustunderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-20 0401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit y-1.0.xsd"><wsu:timestamp wsu:id="ts-42"><wsu:created>2014-11-19t12:41:10z</wsu:created><wsu:expires>2014-11-19t13:14:30 z</wsu:expires></wsu:timestamp><wsse:usernametoken wsu:id="usernametoken-41"><wsse:username>opp</wsse:username><wsse:pas sword type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passworddigest">m0c8nw1n+ /jfhzwm5lhc9f3+b1g=</wsse:password><wsse:nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soa p-message-security-1.0#base64binary">vur9fauf1j/uywebmdtala==</wsse:nonce><wsu:created>2014-11-19t12:41:10.455z</wsu:cre ated></wsse:usernametoken></wsse:security></soapenv:header>    <soapenv:body>       <axis:getversion/>    </soapenv:body> </soapenv:envelope> -------------------------------------- inside utpasswordcallback method @ utpasswordcallback class wed nov 19 18:10:33 ist 2014 inside utpasswordcallback()--> utpasswordcallback class nov 19, 2014 6:10:33 pm org.apache.cxf.ws.security.wss4j.wss4jininterceptor checkactions warning: security processing failed (actions mismatch) nov 19, 2014 6:10:33 pm org.apache.cxf.phase.phaseinterceptorchain dodefaultlogging warning: interceptor {http://axisversion.sample}version has thrown exception, unwinding org.apache.cxf.binding.soap.soapfault: error discovered processing <wsse:security> header.         @ org.apache.cxf.ws.security.wss4j.wss4jininterceptor.createsoapfault(wss4jininterceptor.java:809)         @ org.apache.cxf.ws.security.wss4j.wss4jininterceptor.handlemessage(wss4jininterceptor.java:313)         @ org.apache.cxf.ws.security.wss4j.wss4jininterceptor.handlemessage(wss4jininterceptor.java:93)         @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:307)         @ org.apache.cxf.transport.chaininitiationobserver.onmessage(chaininitiationobserver.java:121)         @ org.apache.cxf.transport.http.abstracthttpdestination.invoke(abstracthttpdestination.java:243)         @ org.apache.cxf.transport.http_jetty.jettyhttpdestination.doservice(jettyhttpdestination.java:261)         @ org.apache.cxf.transport.http_jetty.jettyhttphandler.handle(jettyhttphandler.java:70)         @ org.eclipse.jetty.server.handler.contexthandler.dohandle(contexthandler.java:1088)         @ org.eclipse.jetty.server.handler.contexthandler.doscope(contexthandler.java:1024)         @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:135)         @ org.eclipse.jetty.server.handler.contexthandlercollection.handle(contexthandlercollection.java:255)         @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:116)         @ org.eclipse.jetty.server.server.handle(server.java:370)         @ org.eclipse.jetty.server.abstracthttpconnection.handlerequest(abstracthttpconnection.java:494)         @ org.eclipse.jetty.server.abstracthttpconnection.content(abstracthttpconnection.java:982)         @ org.eclipse.jetty.server.abstracthttpconnection$requesthandler.content(abstracthttpconnection.java:1043)         @ org.eclipse.jetty.http.httpparser.parsenext(httpparser.java:865)         @ org.eclipse.jetty.http.httpparser.parseavailable(httpparser.java:240)         @ org.eclipse.jetty.server.asynchttpconnection.handle(asynchttpconnection.java:82)         @ org.eclipse.jetty.io.nio.selectchannelendpoint.handle(selectchannelendpoint.java:696)         @ org.eclipse.jetty.io.nio.selectchannelendpoint$1.run(selectchannelendpoint.java:53)         @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:608)         @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:543)         @ java.lang.thread.run(thread.java:722) caused by: org.apache.wss4j.common.ext.wssecurityexception: error discovered processing <wsse:security> heade r         @ org.apache.cxf.ws.security.wss4j.wss4jininterceptor.checkactions(wss4jininterceptor.java:339)         @ org.apache.cxf.ws.security.wss4j.wss4jininterceptor.handlemessage(wss4jininterceptor.java:297)         ... 23 more 

i unable figure out error , how can rectify error? please on this..

please use cxf_message data format instead of message data format.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -