[jboss-user] [JBossWS] - Re: Securing POJO Web Service in 4.0.3 SP1

osganian do-not-reply at jboss.com
Wed Nov 22 12:37:18 EST 2006


Hi Sanjay,

I am having a similar problem that I was hoping you could help me with.  How do you have your client setup to access your web services wsdl files?  Do you bundle the wsdl files on the client?

Currently I have the client accessing my wsdl files by going to: https://localhost:8443/service/MyService?wsdl

My problem is when I secure my POJO web service in web.xml like:


  |     <security-constraint>
  |         <web-resource-collection>
  |             <web-resource-name>SecureServer</web-resource-name>
  |             <url-pattern>/service/*</url-pattern>
  |             <http-method>GET</http-method>
  |             <http-method>POST</http-method>
  |         </web-resource-collection>
  | <auth-constraint>
  |     <role-name>USER</role-name>
  | </auth-constraint> 
  |         <user-data-constraint>
  |             <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  |         </user-data-constraint>
  |     </security-constraint>
  | 

The problem is since my wsdl url is protected just like the service itself.  So I end up getting the following error on the client:


  |      [java] Caused by: java.io.IOException: Server returned HTTP response code:
  | 401 for URL: https://localhost:8443/service/MyService?wsdl
  |      [java]     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1153)
  |      [java]     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
  |      [java]     at java.net.URL.openStream(URL.java:1007)
  |      [java]     at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDefinitionsFactory.java:181)
  | 

Thanks for any help,
Mike

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987951#3987951

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987951



More information about the jboss-user mailing list