Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration and custom namespace ... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration and custom namespace ...

    Hi,

    I did a custom namespace for my project.

    within this project I want to declare that kind of things :

    Code:
    <mynamespace:rest-service input-channel="chan1" />
    or in a chain :

    Code:
    <int:chain id="mychainid" input-channel="in"
    		output-channel=out">		
        <mynamespace:rest-service />
    </int:chain>
    which would be translated to spring integration xml as :

    Code:
    <int:service-activator ref="abeanreference" method="theMethodToCall" />
    ...
    <bean id="abeanreference" class="the.rest.service.caller.implementation" />
    So I would like to know what to put in the "BeanDefinitionParser" to be able to register the service-activator. I checked the sources for Service Activator when xml is parsed but .. I don't understand what happens with the BeanDefinitionBuilder ... As far as I understood, it uses a bean factory but ... I can't figure out how to do it myself and to be sure that it will also work in a chain.

    I would like some tips or advices about that ... what should I do ? and is this a good practice or not ?

  • #2
    Any idea ?

    Comment


    • #3
      Franck

      If you look at he schema you'll see that 'chain-type' is limited to the list of element names that belong to SI namespace.
      It would be nearly impossible for us to allow any other namespaces since we don't know what is the end product of this namespace. In other words it may be valid for your use case but it could be completely invalid for other and we would have no way of controlling it at he framework level.

      Comment


      • #4
        My bad

        Jumped to quickly and was pointed out that we have this in schema
        Code:
        <xsd:complexType name="chain-type">
                        <xsd:choice minOccurs="1" maxOccurs="unbounded">
                                <xsd:any processContents="strict" namespace="##other" minOccurs="0" maxOccurs="unbounded" />
        So, this means it has to work.

        Are you getting any exception?

        Comment


        • #5
          Hi,

          I don't have any exception because I just don't know how to declare my Bean within the BeanBuilder to be a service-activator.

          Even if I knew, I don't know if I have to handle input/output channel of the service-activator if it is within a chain.

          Comment

          Working...
          X