Hi Jonas,
Sorry abt the previous post.I didnt notice it.Anyways I tried ur suggestion from http://forum.springframework.org/sho....php?t=62936.I have no exceptions but I cant c any response message being sent(neither as email nor as jms).Infact I dnt know whether the request message accesses the WebService.Please help.
SI.java
si.xmlCode:public class SI { public static void main(String[] args)throws MessagingException { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("si.xml",SI.class); // Compose the XML message according to the server's schema String requestXml = "<hr:CompanyRequest xmlns:hr=\"http://mycompany.com/hr/schemas\">" + "<hr:Company>"+ "<hr:CompanyName>IT</hr:CompanyName>"+ "</hr:Company>"+ "</hr:CompanyRequest>"; // Create the Message object // In this case the service expects a SoapAction header Message<String> message = MessageBuilder.withPayload(requestXml) .setHeader(AbstractWebServiceOutboundGateway.SOAP_ACTION_PROPERTY_KEY, "http://mycompany.com/hr/schemas") .build(); // Send the Message to the handler's input channel ((MessageChannel) context.getBean("sendChannel")).send(message); } }
Code:<message-bus/> <channel id="sendChannel"> <queue capacity="25"/> </channel> <inbound-channel-adapter ref="source" id="requestChannel" method="main" channel="sendChannel"> <poller> <interval-trigger interval="5" time-unit="SECONDS" fixed-rate="true"/> </poller> </inbound-channel-adapter> <beans:bean id="source" class="rc1.SI"/> <!--Sending WebService request --> <ws:outbound-gateway id="gateway" request-channel="requestChannnel" reply-channel="responseChannel" uri="http://localhost:8080/SpringWebService/"/> <publish-subscribe-channel id="responseChannel"/> <!--Response from WebService sent as email--> <mail:outbound-channel-adapter id="MailOut" host="localhost" username="root" password="root"/> <mail:header-enricher input-channel="responseChannel" subject="HelloMailTest" output-channel="MailOut" to="black@localhost" from="white@localhost" cc="blue@localhost" overwrite="false"/> <!--Response from WebService sent as jms message--> <jms:outbound-gateway request-channel="responseChannel" connection-factory="connectionFactory" jms-queue="HelloQueue" message-converter="HeaderMappingMessageConverter" reply-channel="jmsReplyTo"/> <beans:bean id="HeaderMappingMessageConverter" class=" org.springframework.integration.jms.HeaderMappingMessageConverter"> <beans:property name="extractPayload" value="true"/> </beans:bean> <beans:bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <beans:property name="brokerURL" value="tcp://localhost:61616"/> </beans:bean> <beans:bean id="HelloQueue" class="org.apache.activemq.command.ActiveMQQueue"> <beans:constructor-arg value="finally" /> </beans:bean> <stream:stdout-channel-adapter append-newline="true" id="jmsReplyTo"/> </beans:beans>


Reply With Quote
inspite of my config being right
