Announcement Announcement Module
Collapse
No announcement yet.
One username per Service (Spring JAXRPC Remoting) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • One username per Service (Spring JAXRPC Remoting)

    We are using Axis 1.2.1 and Spring 2.0.x to invoke a remote webservice using a password callback defined in a client-deploy.wsdd file as follows:

    Code:
     
    <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    
          <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender" />
          <globalConfiguration>
                <requestFlow>
                      <handler type="java:org.apache.ws.axis.security.WSDoAllSender">
                            <parameter name="action" value="UsernameToken" />
                            <parameter name="user" value="USERNAME" />
                            <parameter name="passwordCallbackClass" value="package.PasswordCallback" />
                            <parameter name="passwordType" value="PasswordText" />
                            <parameter name="mustUnderstand" value="false" />
                      </handler>
                </requestFlow>
          </globalConfiguration>
    </deployment>
    This sends our username and password with *all* webservices invoked through the Axis (client). However, we would like to configure which username and password have to be used for each service individually.

    In our Spring configuration we define a webservice (client) as follows, extending a JaxRpcPortProxyFactoryBean by package.MyServiceJaxRpcPortProxy:


    Code:
      <bean id="MyServiceBean" class="package.MyServiceJaxRpcPortProxy">
        <property name="serviceFactoryClass" value="org.apache.axis.client.ServiceFactory" />
        <property name="wsdlDocumentUrl" value="http://host/MyService.wsdl" />
        <property name="namespaceUri" value="http://host/myservice" />
        <property name="serviceName" value="MyService" />
        <property name="portName" value="MySOAPPort" />
        <property name="serviceInterface" value="package.MyService" />
      </bean>
    Do you know if and how it would be possible to configure Spring (by overriding the base class, maybe?) for a specific JaxRpcPortProxy in which we could define a custom username per service (for instance by changing the wsdd) ?

    Thanks in advance, best regards,

    Nicolas

  • #2
    spring configuration of .wsdd

    I also have the same requirement in my project, and im stuck up with the initial stages itself. if you have already solved the issues, can you please tell me how and where you have configured the .wsdd file, where did u put this file and how the spring injections are done.

    Thanks,
    Deepak

    Comment

    Working...
    X