Ant,
Changed the subject which I forgot to do on the last email...
So just to clarify, until the extension mechanism is finalized I need
be modifying scdl files in the webapp-host.jar to get my binding
picked up?
-Bert
On 8/24/06, ant elder [EMAIL PROTECTED] wrote:
It looks pretty good. I'm guessing the system scdl being used by the web app
doesn't include the scdl for your binding. The way the sample webapps are
done right now with all the jars going into the webapp lib you need to add
all extensions to the system scdl being used. In you web.xml there's a
parameter systemScdlPath which is set to /META-INF/sca/webapp.system.scdl.
That will pick up the resource from the webapp-host.jar. Update that file or
copy it somewhere else and update the systemScdlPath to point at the new
file, and add in your jsonrpc scdl elements.
Once we get extension plugabilty going properly in the samples this wont be
necessary.
...ant
On 8/24/06, Bert Lamb [EMAIL PROTECTED] wrote:
Ok, my I tried to send this email earlier, but it bounced as spam, so
I'm going to try again with a link to my attachment and see if that
helps
So I'm sure it is something stupid, but I'm missing something.
I've got the sample webapp packaged correctly (I think) and it was
giving the error about the unrecognized element binding.jasonrpc. I
then added my jsonrpc-1.0-SNAPSHOT.jar that I thought was at least
mocked up correctly to get me onto the next error, but it doesn't seem
to be getting picked up, and I still have the unrecognized element
binding.jsonrpc error.
Here is a link to a zip of my binding.jsonrpc source tree. Any ideas?
http://bertlamb.com/binding.jsonrpc.zip
Thanks!
-Bert
On 8/18/06, ant elder [EMAIL PROTECTED] wrote:
Hi Bert,
I agree there's going to be some challenges to solve to integrate REST
well
with Tuscany, I'll stay out of that for now and focus on how to get you
started with bindings. Implementing a simple binding would be a good
place
to start so if you want to port over the old jsonrpc binding that would
be
great.
The code for that is at,
http://svn.apache.org/repos/asf/incubator/tuscany/branches/java-post-M1/sca/bindings/binding.jsonrpc/
,
and there's a sample,
http://svn.apache.org/repos/asf/incubator/tuscany/branches/java-post-M1/samples/sca/helloworldjsonrpc/
.
You could download the Tuscany M1 distribution if you want to see the
sample
running.
I'd start by taking the sample and getting it to fit in with the new
code
base - convert the SCDL to the new format, and get the war packaging
correct. You could use the Axis2 WS sample as a model for that which is
at,
http://svn.apache.org/repos/asf/incubator/tuscany/java/samples/sca/helloworldws/
.
(The WAR packaging is going to change once I finish the
TuscanyServletListener and ServletHost work, I'll let you know when that
goes in)
Once you get the WAR right when you deploy it to tomcat you should see
an
exception about an unrecognized element: binding.jsonrpc, thats because
Tuscany doesn't have a binding for it so now you need to convert the
binding over to the new Tuscany runtime. There's several bindings to use
as
models, the RMI or echo ones are simple, the Axis2 uses the ServletHost
which you'll also need to do:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/bindings/binding.rmi/
http://svn.apache.org/repos/asf/incubator/tuscany/java/samples/sca/echo.binding/
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/bindings/binding.axis2/
Copy the existing echo or RMI binding, rename all 'rmi' to jsonrpc',
then
try to hook up the JSONRPCEntryPointServlet based on what the Axis2
binding
is doing. You wont need the RMIReference or RMIInvoker classes as
jsonrpc
only supports services.
There's also a binding using DWR instead of json-rpc-java which you port
to
the new runtime and its a bit more interesting as it also supports
references (well, externalServices) so you could look at that as well if
you're interested:
http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/ant/ajax/.
If you search back in the dev list archives there's a few mails where we
talk about what these two binding do.
Hope this helps,
...ant
On 8/17/06, Bert Lamb [EMAIL PROTECTED] wrote:
On 8/16/06, Jeremy Boynes [EMAIL PROTECTED] wrote:
In terms of the basic transport, in M1 we had a JSON-RPC binding
that
supported JSON encoded data over HTTP. We have not got around yet to
porting that to the new structure in the trunk. Looking at that
would
be a good way to dig into how Tuscany works.
I can make an attempt to try and port the jsonrpc binding from M1 over
to trunk style extensions if this would be appreciated. I agree that
should help me get an understanding of how some of Tuscany works.
Oisin may have been referring to how REST would impact the
programming