Hello,
My application is using Form Based Authentication, I want to consume web services in my application.
The Authentication is working fine if I used BASIC authentication.
using :
((BindingProvider)port).getRequestContext().put( BindingProvider.USERNAME_PROPERTY, "xxx");
((BindingProvider)port).getRequestContext().put( BindingProvider.PASSWORD_PROPERTY, "xxx");
How can I Authenticate in case FORM based login-config.
Below is glimpse of my web.xml file:
-----------------------------------------------------------------------------------------------
<security-constraint>
<web-resource-collection>
<web-resource-name>AdminResource</web-resource-name>
<url-pattern>/admin/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Administrator</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>AdminService</web-resource-name>
<url-pattern>/MonitorService/*</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Administrator</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>file</realm-name>
<form-login-config>
<form-login-page>/Login</form-login-page>
<form-error-page>/LoginError</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>Administrator</role-name>
</security-role>
</web-app>
--------------------------------------------------------------------------------------------------
Thanks a lot in advance,
Best Regards
Suyog Barve
____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com