Results 1 to 4 of 4

Thread: wsdl with HTTP BASIC authentication

  1. #1
    Join Date
    Aug 2005
    Posts
    19

    Default wsdl with HTTP BASIC authentication

    Hi, I'm using JaxRpcPortProxyFactoryBean to access my webservice. The wsdl URL is secured with HTTP BASIC authentication. Now I have a 401 error when spring try to instantiate the webservice.
    I try to add username and password properties to bean configuration but it didn't work.
    Is there a way to resolve this problem?

    This is my configuration:
    Code:
    <bean id="sampleService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
        <property name="serviceInterface" value="org.test.service.SampleService"/>
        <property name="wsdlDocumentUrl" value="http://localhost:8080/sample-ejb-session/SampleServiceBean?wsdl"/>
        <property name="namespaceUri" value="http://service.test.org/jaws"/>
        <property name="serviceName" value="SampleService"/>
        <property name="portName" value="SampleServicePort"/>
    </bean>
    Thanks, Claudio.
    Last edited by csanchez; Jan 24th, 2007 at 02:56 PM.

  2. #2
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    I guess that getting the wsdl doesn't work as simple http lookup of wsdl will not use username/password you define for the service itself.

    a) store the wsdl as a local file and don't look it up via http
    b) add username and password to the wsdl url

  3. #3
    Join Date
    Sep 2004
    Location
    Copenhagen, Denmark
    Posts
    113

    Default

    ad b)
    Is it really that easy to pass username/password in HTTP Basic Auth in the URL parameters?

    I thought you had to stored them as a HTTP HEADER parameter and base64 encode it?
    /Claus

  4. #4
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Something like
    http://username:password@localhost:8...rviceBean?wsdl
    should do the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •