Author Message
Anonymous

Very new to Orchestration and I am wondering if there is a way to use the configurable variables
for the Web Service Endpoint URL?
Thank you.
desirekengfack
Joined: Nov 13, 2013
Messages: 10
Offline
maybe you can overide the setEndPoint function in the generated java code.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Yes, like desirekengfack said, the only way to use variables in the Endpoint right now is to override a method in Java. For Axis 1.4, it's the setEndPoint() method, and for Axis2 you can just directly assign a value to the endPoint variable.
Anonymous

Thank you.
Anonymous

Sorry for another question.

Here is what is in one java now:
setEndPoint("AccountLookupService_1252511018265_WS_ENDPOINT");

Would it be modified to:
setEndPoint(variable);
or
setEndPoint("variable");

Thanks.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Actually, I confused things a bit, sorry. It looks like you're using Axis 1.4. For that connector the correct way to set the Endpoint URL at runtime is the following:

@Override

public String resolveEndPoint() {
return mySession.getVariable("Variable_Name_Here").getSimpleVariable().getStringValue();
}


You would place this in that Java file which corresponds to the WSOP, and create this method outside of the constructor. The variable name can be entered as a Java string. And in the above example, I used a simple var, so if it's complex, then you would have something along the lines of:

@Override

public String resolveEndPoint() {
return mySession.getVariable("Variable_Name_Here").getComplexVariable().getField("Field_Name_Here").getStringValue();
}


Again, sorry for the mix up. For Axis2, though, it is as was described in my previous post. Simply set the value to the endpoint variable.
MiroslavBabka2
Joined: Nov 6, 2013
Messages: 2
Offline
1. Read the value from configurable.endpoint
NewEndPoint = mySession.getVariableField(IProjectVariables.CONFIGURABLE, IProjectVariables.CONFIGURABLE_FIELD_ENDPOINT).getStringValue();
2. Set the endpoint as stated in posts below

MB
JuanMorales2
Joined: Dec 16, 2013
Messages: 44
Offline
Just to document what we did on this for Axis2. We performed an override on the execute() method on the Web Service operation file and from within that override we called the setEndpoint() method. execute() has no parameters but we were able to access the session by using the SCESession Variable.
Go to:   
Mobile view