I am new on Spring Integration and I have a question which I can't find answer.
I have created a small project to learn how SI works (from Spring sample), I am using a WSDL which define a "calculator" web service (it have a method which add two numbers).
This is my config file:
And my code:
<chain input-channel="addInputChannel" output-channel="addOutputChannel">
<!-- The response from the service is logged to the console. -->
It works but now, I want using jaxb (I don't want to deal directly with xml) and I don't understand how I will configure Spring to do that, even after googling and reading some tutorials
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("springWsAccess-Config.xml");
ChannelResolver channelResolver = new BeanFactoryChannelResolver(context);
String requestXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n"
+ "<ns2:add xmlns:ns2=\"http://www.example.org/calculatrice/\">\r\n"
+ " <number1>10.0</number1>\r\n"
+ " <number2>21.0</number2>\r\n"
Message<String> message = MessageBuilder.withPayload(requestXml).build();
// Send the Message to the handler's input channel
MessageChannel channel = channelResolver.resolveChannelName("addInputChannel");
I think that I must generate the jaxb client code with wsimport, but how it will be integrated in Spring SI?