Hi,

I deployed a simple webservice on TomCat Server.
I created following route to access the webservice using apache camel.

from("direct:ProducerUri")
.to("http://localhost:8095/WebServiceTutorial/services/Hello?username=admin&password=admin";);

I created the exchange in the following way
String soapMessage = "<soapenv:Envelope
xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\";
xmlns:tut=\"http://tutorial.com\";><soapenv:Header/><soapenv:Body><tut:sayHello><tut:name>"
                + "Harbeer Kadian" +
"</tut:name></tut:sayHello></soapenv:Body></soapenv:Envelope>";
            XmlConverter xmlConverter = new XmlConverter();
            
Document input = xmlConverter.toDOMDocument(soapMessage);
exchange.getIn().setBody(input);
exchange.setPattern(ExchangePattern.InOut);
//added this line after seeing no soapAction found error on Tom Cat Server
log
exchange.getIn().setHeader("SOAPAction", "");
exchange = producerTemplate.send("direct:ProducerUri", exchange);
Document output = (Document)exchange.getOut().getBody();
System.out.println(output);

I am getting null as output.
Also on the tom cat server log, no exception is coming.

I have no idea how to invoke webservice using http component.
Please help me.

With Regards
Harbeer Kadian

-- 
View this message in context: 
http://old.nabble.com/Not-able-to-invoke-webservice-using-http-component-tp28001459p28001459.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to