0

it is possible to decide one or another webservice by a condition into a Phase? I have 2 ws: ws1 and ws2. I want to decide to call ws1 or ws2 depending of a boolean.

Sergio
  • 49
  • 4

1 Answers1

0

Yes as long as the client/web service contracts/schema's are the same. Just replace the URI with corresponding the ws1/ws2 endpoint.

Lucien
  • 1
  • 2
  • but can I decide in my invoke() method of the Handler? – Sergio Oct 15 '15 at 15:23
  • If the boolean parameter you are getting from the client comes up through a client request then yes it would be in the invoke (HandleRequest) from there you will need to modify the web service binding. Those classes are available in both C# and Java, I am not sure what language you are writing your web service in. – Lucien Oct 15 '15 at 15:35
  • i am using Java and axis2 1.5.6 – Sergio Oct 15 '15 at 15:46
  • Check out some of the comments on this post. http://stackoverflow.com/questions/2490737/how-to-change-webservice-url-endpoint – Lucien Oct 15 '15 at 15:51