Author Message
BrianKing3
Joined: Mar 29, 2010
Messages: 3
Offline
Hello, I have a client that is configuring a secondary instance of their hosted web services, which are currently consumed by an OD (AAEP 7.1) application. They are providing an additional URL for this secondary host and I need to support this sort of architecture within the application.

There doesn't appear to be any way to configure the WSOP directly to use a secondary URL in the event that the primary is not available, so I'm assuming I'll need to implement this within the OD application itself, presumably as a secondary web service call based on exceptions generated by the first attempt.

I'm wondering if there are any best-practices to help guide this sort of approach, or if there is a better solution that I should look at.

Thanks!
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
This has not come up before with web services. You would have to do something in the constructor


//}}END:CLASS:CONSTRUCTOR

/*
* Add your code here....
*/
IVariableField field = mySession.getVariableField(IProjectVariables.USE_ALT_URL);
if (field.getStringValue().equalsIgnorecase( "true") == true ) {
setEndPoint(...);
}
}



Use setEndpointFromParameter( String parameter) where the parameter is a web.xml item or use setEndPoint(String name) where name is the WS endpoint URL.

If the call flow, you could try the web service and if there is an exception in the catch set an OD variable like useAltUrl and then in the constructor fetch the OD variable value and see if you need to alter end point.
Brian_King
Joined: Mar 22, 2017
Messages: 1
Offline
Thanks very much. I'll try that approach.

-Brian
Go to:   
Mobile view