Hi,

 

I have used Java first approach with Apache CXF version 2.2.4. Following is
my configuration to implement WS-Security for my service. I am able to send
WS-Security header from my client and get access of the service. The issue
is with the WSDL as I am not able to define the Security policy in my
generated WSDL, due to which consumers of my client don't get clear picture
from the WSDL and need to read a supporting document. I have googled and
found that it cannot be done in Java First approach. Is this correct? Is
there no way I can achieve? Somewhere I read the 2.3 version have this
facility but I am unable to find any example or how to do it? Please help.

 

<jaxws:endpoint id="apexProrationService"

                        implementor="com.GreetServiceImpl"

                        address="/GreetService">

                        <jaxws:properties>

                                    <entry key="mtom-enabled" value="true"
/>

                        </jaxws:properties>

                        <jaxws:inInterceptors>

                                    <ref bean="sAAJInInterceptor" />

                                    <ref bean="wSS4JInInterceptor" />

                        </jaxws:inInterceptors>

            </jaxws:endpoint>

 

            <bean id="sAAJInInterceptor"
class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />

            <bean id="wSS4JInInterceptor"
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">

                        <constructor-arg>

                                    <map>

                                                <entry key="action"
value="UsernameToken" />

                                                <entry key="passwordType"
value="PasswordText" />

                                                <entry
key="passwordCallbackRef">

                                                            <ref
bean="serverPasswordCallback" />

                                                </entry>

                                    </map>

                        </constructor-arg>

            </bean>

 

Thanks

Bhushan




Disclaimer: This email (including any attachments) is intended for the sole
use of the recipient/s and may contain material that is CONFIDENTIAL. Any
unauthorized disclosure / copying / distribution or forwarding of this message 
or part is STRICTLY PROHIBITED. If you have erroneously received this message,
please delete it immediately and notify the sender. No liability is assumed for
any errors and/or omissions in the contents of this message. Information in 
this message that does not relate to the official business of this Company
shall be understood as neither given nor endorsed by it. If verification is
required please request a hard-copy version. 

To know more about Kale Consultants, visit www.kaleconsultants.com 

-=-=-=-=-=-=-=-=-=-


Reply via email to