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 9233113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:28:27+00:00 2026-06-18T06:28:27+00:00

I have a custom SOAP handler that I am using for schema validation of

  • 0

I have a custom SOAP handler that I am using for schema validation of the SOAP messages. It works for on web service, I’d like to be able to use it for others. The code that does the validation itself is quite generic – the only real input to it is the name of the schema to use for validation. I’m mentally stuck on how/if I can use Spring to configure different instances of the SOAP handler for different services.

The web service is declared as:

@WebService(name = "MyService", ...)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@HandlerChain(file="handler-chain.xml")
public interface MyService
{
   ....
}

The handler-chain.xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
  <handler-chain>
    <handler>
      <handler-name>com.ws.MyCustomSoapHandler</handler-name>
      <handler-class>com.ws.MyCustomSoapHandler</handler-class>
    </handler>
  </handler-chain>
</handler-chains>

Inside the custom SOAP handler, I have this:

public class MyCustomSoapHandler implements SOAPHandler<SOAPMessageContext>
{
    //assume getter/setter for this.
    private String schemaLocation = "schema/validation/service1.xsd";
    @Override
    public boolean handleMessage(SOAPMessageContext context)
    {
        ...
        //This is the only place where the schema needs to vary
        schema = schemaFactory.newSchema(this.getClass().getClassLoader().getResource(schemaLocation));

I know I could use Spring to create multiple beans based on MyCustomSoapHandler and give them different values for schemaLocation, but how do I connect those beans to the correct web services in my application? Would it be through handler-chain.xml? Or would I have to do it programmatically?

  • 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-18T06:28:28+00:00Added an answer on June 18, 2026 at 6:28 am

    It doesn’t look like this is possible (or if it is, I can’t seem to get it working) because the SOAP handlers are created by the WebSphere container, and they are not managed by Spring. So I just created an abstract handler with most of the logic and used a .properties file to configure the details that were more specific to different handlers.

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

Sidebar

Related Questions

I have a custom SOAP message handler for incoming messages that will run different
I have a soap 1.1/1.2 web service I'm trying to access using suds .
I have created a custom SharePoint web service that was deployed to, and successfully
I have custom event that has several different subscribers who will all use the
I have to call a Web service that is extremely demanding (unstandard) regarding the
I have a web service proxy. On that proxy there is a method that
I have a basic SOAP service that I generated from a provided WSDL. The
I have a custom dll (CustomSoapExtension.dll) that I use in another webservice client (a
I have configured Camel SOAP proxy service using Spring DSL. Everything was working nice
I have a WCF client proxy which reads from a SOAP web service. I

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.