Announcement Announcement Module
Collapse
No announcement yet.
Output chanel not identified though defined in xml configuration Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Output chanel not identified though defined in xml configuration

    I did exactly the following.

    My SI configuration:

    Code:
    <int:channel id="outputChannelEsb">
    <int:queue capacity="100"/>
    </int:channel>
    <!-- <int:chain request-channel="inputChannelEsb" reply-channel="outputChannelEsb" expected-response-type='java.lang.String'> -->
    <int:ws:outbound-gateway request-channel="inputChannelEsb" reply-channel="outputChannelEsb" expected-response-type="java.lang.String"
    uri="http://localhost:8081/user-registration/services/userRegistration.wsdl"/>
    <!-- </int:chain> -->

    <int:channel id="inputChannelEsb" >
    <int:queue/>
    </int:channel>
    My code :
    Code:
    ClassPathXmlApplicationContext context =
    new ClassPathXmlApplicationContext("/applicationContextSI.xml",this.getClass());
    ChannelResolver channelResolver = new BeanFactoryChannelResolver(context);
    PollableChannel outputChannelEsb = (PollableChannel) context.getBean("outputChannelEsb", PollableChannel.class);
    // Compose the XML message according to the server's schema
    String requestXml =
    "<user:NPIRequest>"+
    "<NpiNo>1346524337</NpiNo>"+
    "<DataType>json</DataType>"+
    "</user:NPIRequest>" ;


    // Create the Message object
    Message<String> message = MessageBuilder.withPayload(requestXml).build();

    // Send the Message to the handler's input channel
    MessageChannel channel = channelResolver.resolveChannelName("inputChannelEs b");
    channel.send(message);

    ActEsbResponse Resp = JAXB_OBJECT_FACTORY.createActEsbResponse();
    Resp.setResString((String)outputChannelEsb.receive ().getPayload());
    return Resp ;
    Result:
    Code:
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring xml:lang="en">No bean named 'outputChannelEsb' is defined</faultstring>
    though I have defined the outputChannelEsb in my XML .

    Could you please help.

  • #2
    Please don't post duplicate messages in multiple threads.

    Comment

    Working...
    X