-
1. Re: Tooling for RESTEasy Gateway
bfitzpat Jul 18, 2012 3:24 PM (in response to mageshbk)Hey Magesh, thanks for getting me started on this...
Using the commits associated with the pull requests for the RESTeasy work you've done, I have implemented the model changes and started the UI for wizard and property sheets.
My questions are as follows:
(1) Though the contextPath element appears to be optional in the schema, the quickstart includes it for both the service and reference binding instances with the text "rest-binding" in it. Is this the default that I should set in the tooling?
(2) Beyond the "address" element being optional and only applicable to reference bindings, are there any additional elements of the binding that need to appear in the UI for RESTeasy bindings? For example, the operation selector seems to pop up quite a bit. Should there be an operation selector combo here as well? Anything only applicable to service bindings vs. reference bindings (or vice versa), beyond the "address" element?
Here are a couple of screen shots of what I have so far.
-
2. Re: Tooling for RESTEasy Gateway
bfitzpat Jul 18, 2012 3:31 PM (in response to bfitzpat)Just realized that context path should be removed on the reference side as well (based on comments in the schema).
-
3. Re: Tooling for RESTEasy Gateway
rcernich Jul 18, 2012 3:34 PM (in response to bfitzpat)Hey Brian,
To be consistent, I think we should use the same default for context-path that we use for SOAP.
Just my $0.02.
Rob
-
4. Re: Tooling for RESTEasy Gateway
bfitzpat Jul 18, 2012 3:36 PM (in response to rcernich)Hey Rob - That's what I'm doing right now (using the application name as the context path default), but wanted to confirm because the RESteasy quickstart doesn't seem to jive that way.
-
5. Re: Tooling for RESTEasy Gateway
bfitzpat Jul 18, 2012 3:51 PM (in response to mageshbk)Created SWITCHYARD-942 to cover this work, but definitely think we should use the forum for easier communication on the topic!
-
6. Re: Tooling for RESTEasy Gateway
mageshbk Jul 19, 2012 12:19 AM (in response to bfitzpat)Hi Brian,
Nice work on the UI front. The context path is not needed for refernce binding. Say if you have a service hosted in this address http://localhost:8080/rest-binding, in the reference binding it could be declared as
<sca:reference name="Warehouse" promote="OrderService/Warehouse" multiplicity="1..1"> <rest:binding.rest> <rest:interfaces>org.switchyard.quickstarts.rest.binding.WarehouseResource</rest:interfaces> <rest:contextPath>rest-binding</rest:contextPath> </rest:binding.rest> </sca:reference>
or like this
<sca:reference name="Warehouse" promote="OrderService/Warehouse" multiplicity="1..1"> <rest:binding.rest> <rest:interfaces>org.switchyard.quickstarts.rest.binding.WarehouseResource</rest:interfaces> <rest:address>http://localhost:8080/rest-binding</rest:address> </rest:binding.rest> </sca:reference>
An address parameter is required for accessing the hosted service. But it need not be present in the configuration. For local services, the address can be the default address(http://localhost:8080) but a remaining path is needed to reach that service right? Hence the contextPath is filled in the QS for the reference too.
Regarding operation selector: I don't think that is really applicable here. Was it there for SOAP too? Keith can help us out in this.
No more parameters are needed as of now. Will see what our users say as we progress.
-
7. Re: Tooling for RESTEasy Gateway
kcbabo Jul 19, 2012 8:07 AM (in response to mageshbk)Shouldn't be required for REST as the path of the URL is mapped to the service operation via annotations on the service interface.
-
8. Re: Tooling for RESTEasy Gateway
kcbabo Jul 19, 2012 8:09 AM (in response to kcbabo)BTW, the same thing is true of SOAP. The message either contains the operation name already (e.g. doc-lit wrapped) or it can be determined by mapping the root element of the SOAP:Body to a part definition in the WSDL.
-
9. Re: Tooling for RESTEasy Gateway
bfitzpat Jul 19, 2012 11:41 AM (in response to kcbabo)Ok, have put up a pull request for SWITCHYARD-942.
-
10. Re: Tooling for RESTEasy Gateway
scisci Aug 27, 2012 4:37 AM (in response to mageshbk)Hi everyone,
I've downloaded the example and deployed on one server.
Which is the address to connect to (in a browser) to call the OrderService?
I've tried localhost:8080/switchyard-quickstart-rest-binding/, localhost:8080/rest-binding/ but doesn't work.
Thanks
-
11. Re: Tooling for RESTEasy Gateway
mageshbk Aug 27, 2012 6:26 AM (in response to scisci)That will be http://localhost:8080/rest-binding/order. Have a look at the ReadMe and the RESTEasyBindingClient.java in that quickstart.
-
-
13. Re: Tooling for RESTEasy Gateway
mageshbk Aug 29, 2012 1:36 AM (in response to scisci)Mirko,
Could you move your conversation to the user forum here https://community.jboss.org/en/switchyard. The OrderService has only one GET method. So you have to first do a POST for creating new order. Then you can access the order information with http://localhost:8080/rest-binding/order/<orderno>