Interfaces implemented by a JBI endpoint are discovered by
the container using:
 * the value on the activation spec for lightweight components
 * PortType referenced by the wsdl description of the endpoint

If you really want your endpoint to tell the container it implement
a given interface, you will have to create a simple wsdl and give
it as the endpoint description.
This can be done easily using the following code when the endpoint
is created:

           public void activate() throws Exception;
                   WSDLFactory factory = WSDLFactory.newInstance();
                   definition = factory.newDefinition();
                   PortType type = def.createPortType();
                   type.setUndefined(false);
                   type.setQName(interfaceName);

definition.setTargetNamespace(interfaceName.getNamespaceURI());
                   definition.addNamespace("tns",
interfaceName.getNamespaceURI());
                   definition.addPortType(type);
                   description =
factory.newWSDLWriter().getDocument(definition);
                   ....
             }


On 9/14/06, jpangburn <[EMAIL PROTECTED]> wrote:

If I derive a class from org.apache.servicemix.common.Endpoint, one of the
methods Endpoint provides is setInterfaceName.  I'm trying to set the value
in a bean like this:

<bean
                    class="org.bpmscript.jbi.component.ProcessEndpoint">
                    <property name="endpoint"
value="bpmScriptGetNameProcess" />
                    <property name="sourceResource"
                      value="classpath:/com/quovadx/demo/createtask/main.js"
/>
                      <property name="interfaceName"
value="bs:bpmScriptGetNameProcess" />
                  </bean>

The other properties get set fine, but when I look at this endpoint in JMX,
it says there are no interfaces.  I would have thought the Endpoint
superclass's setInterfaceName would have taken care of this.  Do I need to
do something with that value in my activate method to make this work?

thanks,
Jesse
--
View this message in context: 
http://www.nabble.com/interfaceName-usage-for-org.apache.servicemix.common.Endpoint-tf2269563.html#a6299404
Sent from the ServiceMix - User forum at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to