users@glassfish.java.net

Calling a secure web service running on Sun App Server 8.1

From: BJ <robl29_at_yahoo.com>
Date: Wed, 10 Sep 2008 08:37:26 -0700 (PDT)

I have a servlet that runs on glassfish and it calls a secure web service
running on Sun App Server 8.1. If the servlet was running on Sun App Server
8.1, I would pass the username/password with the followings:
          ((Stub)
service)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "jdoe");
          ((Stub)
service)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "jdoe");
I replaced the above with the followings in glassfish:
          ((BindingProvider)
port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "jdoe");
          ((BindingProvider)
port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "jdoe");

I get this error:

Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at:
https://dvsws.example.com/apps/DMWS/DMWS?wsdl. It failed with:
        Server returned HTTP response code: 401 for URL:
https://dvsws.example.com/apps/DMWS/DMWS?wsdl.
        at
com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:162)
        at
com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:144)
        at
com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:263)
        at
com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:226)
        at
com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:174)
        at
com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
        at javax.xml.ws.Service.<init>(Service.java:56)

Can someone help me with this.

Thanks.

-- 
View this message in context: http://www.nabble.com/Calling-a-secure-web-service-running-on-Sun-App-Server-8.1-tp19414818p19414818.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.