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.
Just realized that context path should be removed on the reference side as well (based on comments in the schema).
To be consistent, I think we should use the same default for context-path that we use for SOAP.
Just my $0.02.
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.
Created SWITCHYARD-942 to cover this work, but definitely think we should use the forum for easier communication on the topic!
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.
Shouldn't be required for REST as the path of the URL is mapped to the service operation via annotations on the service interface.
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.
Ok, have put up a pull request for SWITCHYARD-942.
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.
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>