You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Kent Tong <ke...@cpttm.org.mo> on 2005/07/03 17:13:44 UTC
Can't invoke a custom service factory
Hi,
I'm testing hivemind 1.1 beta. In particular, I'm trying to create
a custom ServiceImplementationFactory that takes a single parameter
element <msg>, but at the point of <invoke-factory> it is reporting
an error:
Parameters to service implementation factory com.ttdev.FooFactory contains
no contributions but expects exactly one contribution.
My hivemodule.xml is:
<?xml version="1.0"?>
<module id="com.ttdev" version="1.0.0">
<service-point id="FooService" interface="FooService">
</service-point>
<service-point
id="FooFactory"
interface="org.apache.hivemind.ServiceImplementationFactory">
<parameters-schema>
<element name="msg"/>
</parameters-schema>
<create-instance class="FooFactory"/>
</service-point>
<sub-module descriptor="p1.xml"/>
</module>
p1.xml is:
<?xml version="1.0"?>
<module id="com.ttdev.p1" version="1.0.0">
<implementation service-id="com.ttdev.FooService">
<invoke-factory service-id="com.ttdev.FooFactory">
<msg>Welcome!</msg>
</invoke-factory>
</implementation>
</module>
As you can see I am indeed providing a <msg> element to the factory,
any idea why it is reporting an error?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
Re: Can't invoke a custom service factory
Posted by Achim Hügen <ac...@gmx.de>.
I think the rule for your element is missing.
The parser doesn't know what to do with the msg element.
I dont't have the correct syntax in mind but this could give you a hint:
<element name="msg" >
<rules>
<push-content />
..
</rules>
</element>
Bye
Achim
Am Sun, 03 Jul 2005 23:13:44 +0800 schrieb Kent Tong <ke...@cpttm.org.mo>:
> Hi,
>
> I'm testing hivemind 1.1 beta. In particular, I'm trying to create
> a custom ServiceImplementationFactory that takes a single parameter
> element <msg>, but at the point of <invoke-factory> it is reporting
> an error:
>
> Parameters to service implementation factory com.ttdev.FooFactory
> contains
> no contributions but expects exactly one contribution.
>
> My hivemodule.xml is:
>
> <?xml version="1.0"?>
> <module id="com.ttdev" version="1.0.0">
> <service-point id="FooService" interface="FooService">
> </service-point>
> <service-point
> id="FooFactory"
> interface="org.apache.hivemind.ServiceImplementationFactory">
> <parameters-schema>
> <element name="msg"/>
> </parameters-schema>
> <create-instance class="FooFactory"/>
> </service-point>
> <sub-module descriptor="p1.xml"/>
> </module>
>
> p1.xml is:
>
> <?xml version="1.0"?>
> <module id="com.ttdev.p1" version="1.0.0">
> <implementation service-id="com.ttdev.FooService">
> <invoke-factory service-id="com.ttdev.FooFactory">
> <msg>Welcome!</msg>
> </invoke-factory>
> </implementation>
> </module>
>
> As you can see I am indeed providing a <msg> element to the factory,
> any idea why it is reporting an error?
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org