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

  • SEARCH
  • Home
  • 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 7898081
In Process

The Archive Base Latest Questions

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

I have a jboss webservice like this: @Stateless @SecurityDomain(SecurityDomain) @RolesAllowed(RolesAllowed) @WebContext(urlPattern = /*, authMethod

  • 0

I have a jboss webservice like this:

@Stateless
@SecurityDomain("SecurityDomain")
@RolesAllowed("RolesAllowed")
@WebContext(urlPattern = "/*", authMethod = "BASIC", secureWSDLAccess = true)
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@WebService(name = "WebServiceName", targetNamespace = "http://webserviceName")

When i invoke this webservice with wrong credentials i´m getting the following error:

<html>
<head>
<title>JBoss Web/2.1.3.GA - Error report</title>
<style>
<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-    size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-   size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} 
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-  family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head>
<body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade">
<p><b>type</b> Status report</p>
<p><b>message</b> <u></u></p>
<p><b>description</b> <u>This request requires HTTP authentication ().</u></p>
<HR size="1" noshade="noshade"><h3>JBoss Web/2.1.3.GA</h3>
</body>
</html>

I would like to know if there is way to custom this 401 response?

Notice that my webservice works fine (my problem is only in this customization).

Thanks a lot.

  • 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-03T08:20:15+00:00Added an answer on June 3, 2026 at 8:20 am

    The Webservice use the JBoss Web component to authenticate the username and password (with Basic Authentication). (Note that i’m using JBoss-ESB)

    For this motive, we need to change this jar (jbossweb.jar) in \jboss-esb\server\\deploy\jbossweb.sar.

    We must edit the file “ServerInfo.properties” (in org\apache\catalina\util) and change the property “server.info=2.1.3.GA” to “server.info=XPTO”.

    Alternatively, it´s also possible to re-build this jar and replace the tag @VERSION@ to XPTO (in the task Ant, i believe).

    During this analysis, was also identified the possible implementation of our BasicAuthenticator. Thus it is possible to configure the error message (401) so as to make it more configurable (ultimately we can return other error).

    To do this, you must change the configuration

    <property name="authenticators"> 
    <..>
    <key>BASIC</key>
    <value> MyClass </value>
    

    in file war-deployers-jboss-beans.xml (in \jboss-esb\server\\deployers\jbossweb.deployer\META-INF).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webservice with basic HTTP authentication on a JBoss server. Is there
I have JBoss AS 5. I'd like to see the default JSP that JBoss
I have jboss EAP 5.1 .I want to know which eclipse works with this
I have a web app on JBoss 4.2.3 and I'd like it to send
How specifically can you use the javax.jws.WebService.wsdlLocation in JBoss 4.2.2? (This is for an
I have my application running properly in Jboss. To to write spring webservice client,
I have jBoss running on Linux that runs a Java SOAP webservice. I normally
I understand that web containers like jboss have a parameter to mention the number
I have a jboss web service that is getting the wrong initial context. I
I have JBoss 4.2.3 running on one machine and I want to call an

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.