User login

How do I add my own Hosted Objects to the mashup server?

Forums :

Hello

I'm contemplating a mashup design that requires a series of objects to be implemented in java or groovy.  I want to stitch them together with javascript and expose them via the mashup server.  I don't see any docs on how to extend the environment with my own Hosted Objects.  Where would I find this information?

 

Thanks

Chad

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

We use Rhino

Hi Chad,

 

We used Rhino to implement host objects in the Mashup Server. While we currently do not provide documentation on how to go about implementing your own host objects, I guess their documentation at http://www.mozilla.org/rhino/ would be a good place to start if you want to implement in Java yourself. You can also download our source distribution from http://dist.wso2.org/products/mashup/wso2-mashup-server-1.0.1-src.zip and look at the implementations of the existing host objects, which can be found in the wso2-mashup-server-src\modules\hostobjects\src\ directory.

 

If you have any problems once you get going, please do post your questions here and we'll do our best to help.

 

Bye,

Channa.

A bit more info

Rhino has the ability to expose Java objects into the javascript envrionment.  We turn off this ability for security reasons (don't want an internet guest to be able to delete files on the file system!)  However if you have other ways to mitigate this thread in your Mashup Server installation you could probably do a custom build to remove this restriction.

Another approach is to deploy your Java code as web services, and stitch them together inside the Mashup Server.  Any .aar file that you can deploy on the WSO2 Web Services Application Server can also be deployed on the WSO2 Mashup Server (we wrap WSAS).  You can import stubs for those Java services and call them trivially.  Please refer to the WSAS documentaiton for details.  You can try this out without a separate install - just go to https://localhost:7443/wsasadmin/ and you'll see all the capabilities of WSAS are available.

Hope this presents some interesting options.

Thanks for giving the Mashup Server a try!

- Jonathan

Have you also disabled LiveConnect?

I'm evaluating the use of the LiveConnect capability to stitch our classes together with the javascript.  Have you disabled this capability as well?

 

Thanks

Chad

You cannot use LiveConnect with the Mashup Server.

Yes we have. You cannot use LiveConnect with the Mashup Server.

 

Thanks,

Keith.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.