|
Re: What happened to IRest? [message #895943 is a reply to message #895672] |
Mon, 16 July 2012 15:28 |
Joseph Vincens Messages: 31 Registered: December 2011 Location: Prospect CT |
Member |
|
|
Hi Richard,
To do a function invocation: create a proxy function that represents the service end point.
In this case the end point is a REST service, accessed using an HTTP GET with a URL of http://www.eclipse.org/.
library ServiceInvocationLib
function invokeGetEclipse(){
@Resource {uri="binding:httpEclipse"}, //the egldd entry named httpEclipse defines the URL.
@REST{ //indicates a REST service endpoint
method = HttpMethod._GET //indicates that a http get is used to access the data
}
}
end
end
Create a new egldd Rest binding named httpEclipse with a baseURI = http://www.eclipse.org/
Here how you would use the proxy function to invoke the service.
function start1()
call ServiceInvocationLib.invokeGetEclipse()
returning to gotpage
onException serviceExceptionHandler;
end
regards,
Joe
[Updated on: Mon, 16 July 2012 15:29] Report message to a moderator
|
|
|
|
Re: What happened to IRest? [message #895973 is a reply to message #895961] |
Mon, 16 July 2012 17:36 |
Dan Darnell Messages: 145 Registered: November 2011 Location: Arkansas |
Senior Member |
|
|
Use this proxy function instead:
function invokeGetEclipse() returns (string){
@Resource {uri="binding:httpEclipse"},
@REST{
method = HttpMethod._GET
}
}
end
Notice that it returns a string ... probably the result you are looking for.
--Dan
[Updated on: Mon, 16 July 2012 17:41] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02168 seconds