Thank you all
it was a poblem of authentication
i added a PasswordAutehntication class ..
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
public void configure() throws Exception {
----> Authenticator.setDefault(new NTLMAuthenticator());
<<NTLMAuthenticator
NTLMAuthenticator extends Authenticator {
private final static String NTLM_DOMAIN = "domain";
private final static String NTLM_SEPARATOR = "\\";
private final static String NTLM_USER = "user";
private final static String NTLM_PASSWORD = "pass";
@Override
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(NTLM_DOMAIN + NTLM_SEPARATOR
+ NTLM_USER, NTLM_PASSWORD.toCharArray());
}
}
>>
from("direct:test")
.setHeader("operationNamespace",
constant("urn:microsoft-dynamics-schemas/page/calculator"))
.setHeader("operationName", constant("compute"))
.setHeader("SOAPAction",
constant("urn:microsoft-dynamics-schemas/page/calculator:compute"))
.
to("cxf://http://localhost:9080/WS/calculator?wsdlURL=classpath:test.wsdl&
dataFormat=PAYLOAD")
}
});
context.start();
String soap = "<soap:Envelope
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><compute
xmlns=\"urn:microsoft-dynamics-schemas/page/calculator\"><No>8545</No></compute></soap:Body></soap:Envelope>";
Endpoint endpoint =
context.getEndpoint("direct:test");
Exchange exchange = endpoint.createExchange();
ProducerTemplate template =
exchange.getContext().createProducerTemplate();
// send to default endpoint
template.sendBody(endpoint,soap);
********************
Do you know how to implement PasswordAuthentication in a spring camel xml
configuration ??
Many thanks
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-CXF-Payload-mode-tp5783530p5783610.html
Sent from the Camel - Users mailing list archive at Nabble.com.