Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7894233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:20:32+00:00 2026-06-03T07:20:32+00:00

I have created an Axis web service as a Java 6 application running on

  • 0

I have created an Axis web service as a Java 6 application running on Tomcat 7. For security the Spring Security 2.0.1 framework is integrated.

For security purposes the service endpoint should be protected with basic authentication. However, the WSDL document should be publicly available.

I have created a Spring security configuration like this:


<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd">

    <http>
        <intercept-url pattern="/services/InitechAuthenticationService*" access="ROLE_WSUSER" />
        <intercept-url pattern="/services/InitechAuthenticationService?wsdl" filters="none" />
        <http-basic />
    </http>

    <authentication-provider>
        <user-service>
            <user name="internal" password="${WS_USER_INTERNAL_PASSWORD}" authorities="ROLE_WSUSER" />
            <user name="external" password="${WS_USER_EXTERNAL_PASSWORD}" authorities="ROLE_WSUSER" />
        </user-service>
    </authentication-provider>

</beans:beans>

The problem is that regardless of the order of the intercept-url lines, the line


<intercept-url pattern="/services/InitechAuthenticationService*" access="ROLE_WSUSER" />

always seems to be applied and the line


<intercept-url pattern="/services/InitechAuthenticationService?wsdl" filters="none" />

is ignored. I would have expected that one can control the behaviour somehow, e.g. by specfiying the order (so that Spring Security selects either the first or last matching rule) or by the specificity of the rules so that Spring Security selects the most specific rule, i.e. the one with “wsdl” in the end in this case. How can I exclude the WSDL document from being authenticated, simultaneously enabling authentication for actually using the WS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:20:34+00:00Added an answer on June 3, 2026 at 7:20 am

    I solved the problem by changing the http part of the configuration to use regular expressions instead of the Ant Path Matcher. The complete working configuration is here:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/security"
        xmlns:beans="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd">
    
        <http path-type="regex">
            <intercept-url pattern="/services/InitechAuthenticationService*" access="ROLE_WSUSER" />
            <intercept-url pattern="/services/InitechAuthenticationService\\?wsdl" filters="none" />
            <http-basic />
        </http>
    
        <authentication-provider>
            <user-service>
                <user name="internal" password="${WS_USER_INTERNAL_PASSWORD}" authorities="ROLE_WSUSER" />
                <user name="external" password="${WS_USER_EXTERNAL_PASSWORD}" authorities="ROLE_WSUSER" />
            </user-service>
        </authentication-provider>
    
    </beans:beans>
    

    The changes:

    1. added path-type “regex” attribute to http
    2. changed ? to \\? in the intercept-url for wsdl
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a Web Service (with Java, Axis). Depending on the content of
I have followed this tutorial http://netbeans.org/kb/docs/websvc/gs-axis.html and successfully created the web service. When i
I have created a web service for the following code but I am getting
I am new to web-service and I have created one web service in my
I have created a mac application using the WebView. But issue is that webView
I have created a map application to show near by places on the map.When
I have created a service which displays a status bar notification after certain time
i'm trying to study about how to access external web services. I have created
I have created a graph with one x-axis and two y-axis. The problem is
I have created a scatter graph with three plot spaces. One for two y-axis

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.