users@glassfish.java.net

RE: WSDL with basic auth

From: Manfred Riem <mriem_at_manorrock.org>
Date: Mon, 28 Jul 2008 07:04:58 -0600

Make sure the GET request is open to the public.

Manfred

-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Monday, July 28, 2008 3:29 AM
To: users_at_glassfish.dev.java.net
Subject: WSDL with basic auth

Hello List,

i let metro generate the wsdl accessable with Service?wsdl

But I also add basic auth to the service. So the wsdl needs also basic auth. With netbeans I can import / generate the client classes because I get a username/passwort window before generation. But when I consume the ws I get the error that the server return with 401 (auth) when I create an object from the class named like the service. The object try to connect to the wsdl. I see some notes in the forum how to access a ws with basic auth with the port object and the BindingProvider but nothing with a auth wsdl file.

I also try to add username and pw to the url without any sucess.

Question:
Can I write a ws (server app) where the app is secured with basic auth, but the ?wsdl and ?xsd=1 file don't need auth.

I know only (part from web.xml)

 <security-constraint>
        <display-name>Test</display-name>
        <web-resource-collection>
            <web-resource-name>test</web-resource-name>
            <description/>
            <url-pattern>/SkipackService</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
            <http-method>HEAD</http-method>
            <http-method>PUT</http-method>
            <http-method>OPTIONS</http-method>
            <http-method>TRACE</http-method>
            <http-method>DELETE</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>Users</role-name>
        </auth-constraint>
    </security-constraint>

and don't know where I should declare the parameter part.

or

how do I set the username and password for the generated class / object for the wsdl file of the ws-client.

Any hint or commet is welcome

regards Dietmar
[Message sent by forum member 'oaspublic' (oaspublic)]

http://forums.java.net/jive/thread.jspa?messageID=289743

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net