This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

EndPoint Mappings

Jun 14th, 2010, 12:14 PM

I'm trying to figure out the 'Spring-WS way' to solve my problem. Here's the problem: Inbound web service requests will be sent to the same endpoint and will contain a control code that will dictate the appropriate action to take. So for a straight forward example, a PersonEndpoint will receive requests with a control code of gender - Male or Female. If Male, forward the request to the MaleEndpoint; If Female, forward to the FemaleEndpoint.

Since hundred's of control codes will be used, writing switch:case statements or if, else if, else logic doesn't seem to be the best approach. Any help/suggestions are appreciated.

I'm trying to figure out the 'Spring-WS way' to solve my problem. Here's the problem: Inbound web service requests will be sent to the same endpoint and will contain a control code that will dictate the appropriate action to take. So for a straight forward example, a PersonEndpoint will receive requests with a control code of gender - Male or Female. If Male, forward the request to the MaleEndpoint; If Female, forward to the FemaleEndpoint.

Since hundred's of control codes will be used, writing switch:case statements or if, else if, else logic doesn't seem to be the best approach. Any help/suggestions are appreciated.

Hi,

What do you mean by control code..? Will you have seperate request for male and female endpoint in your xsd ? if so we can cofigure it in bean file itself.could you explain your need once again!

Comment

A control code in my industry is an indicator of action to perform. As part of the SOAP message body, the request name and a control code value will be sent. Based on this combination, I want to redirect/forward the inbound request to the proper endpoint. We will have the same request name with different, unique control codes.

I'm looking for a Spring best practice to handle this. Would this best be accomplished through an Interceptor, MethodEndpoint or some other strategy.

Comment

A control code in my industry is an indicator of action to perform. As part of the SOAP message body, the request name and a control code value will be sent. Based on this combination, I want to redirect/forward the inbound request to the proper endpoint. We will have the same request name with different, unique control codes.

I'm looking for a Spring best practice to handle this. Would this best be accomplished through an Interceptor, MethodEndpoint or some other strategy.

Each request will be associated with an operation ie a method.Are you having a seperate Endpoint for each service class? I think you might use same endpoint for handling all services of a service class.. if so you can differentiate it by getting the operation name from the incoming soap request.