Hi,

I'm trying to build a generator that does the following:

call a remote method on a server (using spring remoting)
drag the result through an XML mapper (currently XMLBeans)
deliver XML SAX events to cocoon

All in all not a big issue, were it not for the fact that I can't seem to find information on configuring a generator.

I'd like to define the generator as this:

<map:generator name="remoteGenerator" src="x.y.RemoteSpringGenerator>
    <spring-config>/x/y/remote-spring-config.xml</spring-config>
</map:generator>


where the xml file contains my remote servicebeans, like:

<bean id="myService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl" value="rmi://localhost:6666/MyService"/>
        <property name="serviceInterface" value="x.y.MyService"/>
</bean>

Is the above possible?

I've cooked up a solution by hard-coding the xml location into the RemoteSpringGenerator (using a 'magic' location), but I'd like to reuse the class in other projects.

I can also use:

<map:match pattern="myRemoteMethod.xml">
  <map:generate type="remoteGenerator">
    <map:parameter name="remoteServiceName" value="myService" />
    <map:parameter name="methodName" value="myRemoteMethod" />
    <map:parameter name="argTypes" value="Integer" />
    <map:parameter name="argNames" value="id" />
<map:parameter name="spring-config" value="/x/y/remote-spring-config.xml" />
  </map:generate>
  <map:serialize type="xml"/>
</map:match>

but this means a lot of copy-paste and the need to constantly build the Spring container (although I could create it only the first time and reuse it, but still)...

In any case, I'd call it through http://.../myRemoteMethod.xml?id=3

TIA!

Lieven






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

Reply via email to