Hi,

I'm not totally clear on what you want to do. I looked at your project 
page and user guide, and it seems you have created a system for exposing 
command line apps via SOAP using a custom service descriptor; your toolkit 
that creates a WSDL and mapping layer that can be deployed as a web 
service. Is that right?

What aspect of Muse would you like to reuse? The code you provided is from 
the core of the request-handling module - you are welcome to use it, but 
it's not part of the public API (so be careful). I'm not sure why you want 
to use the router creation/invocation code if you don't intend to change 
it.

I know you said you don't want to use code gen, but I think the two 
systems have more in common than you might think. Your project has three 
descriptor files, one of which is a 'service map' - the service map 
defines a service with a collection of methods, each with 
parameters/return values. This sounds very similar to WSDL, albeit much 
less verbose. It seems like you could have people model their app's 
operations in WSDL rather than the service map, run wsdl2java, and use the 
generated capability class to invoke the command line app (with 
Runtime.exec(), or whatever you're using).

Further, wsdl2java was designed so that each part of the code generation 
process could be extended. You could extend wsdl2java to use your service 
map to fill in the generated capability class for the user, like this:

        public void myOperation(String param1, int param2)
        {
                Runtime.getRuntime().exec("myOperation -option1 " + param1 
+ " -option2 " + param2);
        }

This would also make it easier to expose some commands as resource 
properties (when the only reason to run the command is to get a value 
back, with no task or side effect).

These are just some suggestions. Perhaps you could provide more detail on 
what you'd like out of Muse, and I can reply with more help(?)

Dan



"Srinath Perera" <[EMAIL PROTECTED]> wrote on 01/23/2007 08:23:06 AM:

> Hi All;
> 
> I want to integrate Apache Muse with our
> project(http://www.extreme.indiana.edu/gfac/).  I looked at the Axis2
> integration and  I think what muse do is create a ResourceRouter and
> invoke it per SOAP message.
> 
> To integrate Muse to my project does following approach is correct
> 
> 1. Create My Environment  by extend from AbstractEnviorment to load
> corrrect muse.xml file ect .....
> 2. create my capabilities and edit muse.xml file to add them.
> Initially I do not need to create dynamic resources.
> 3. Initialize a resource router (Code List1), I grab this code from
> AbstractIsolationLayer class.
> 4. Direct incomming Soap messages that are intended to muse to resource 
router
> and send back the responses.
>  Element soapResponse = getRouter().invoke(soapBody);
> 
> Will this agree with Muse design? Is there a better way to do this?
> Does muse provide a way to edit WSDL if I do as above, or do I have to
> do it from code?
> 
> Thanks very much
> Srinath
> 
> Code List 1
> =======
> Environment env = new MyEnviorment();
> DeploymentDescriptor dd = new SimpleDeploymentDescriptor();
>   Document ddXML = 
env.getDocument(DescriptorConstants.DESCRIPTOR_FILE_NAME);
>         dd.load(ddXML, env);
>         Collection serializerDefinitions = 
dd.getSerializerDefinitions();
>         Iterator i = serializerDefinitions.iterator();
> 
>         SerializerRegistry registry = SerializerRegistry.getInstance();
> 
>         while (i.hasNext())
>         {
>             SerializerDefinition next = (SerializerDefinition)i.next();
> 
>             Serializer ser = next.create();
>             Class type = ser.getSerializableType();
> 
>             Class arrayType = ReflectUtils.getArrayClassFromClass(type);
>             Serializer arraySer = new ArraySerializer(arrayType, ser);
> 
>             registry.registerSerializer(type, ser);
>             registry.registerSerializer(arrayType, arraySer);
>         }
> 
>         //
>         // create the router, which will instantiate resources that
>         // are specified in the deployment descriptor (using the
>         // /muse/resource-type/@instances-at-startup attribute)
>         //
>         RouterDefinition routerDefinition = dd.getRouterDefinition();
>         ResourceRouter _router = routerDefinition.newInstance();
> 
>         _router.initialize();
> 
> 
> 
> -- 
> ============================
> Srinath Perera:
>    Indiana University, Bloomington
>    http://www.cs.indiana.edu/~hperera/
>    http://www.bloglines.com/blog/hemapani
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to