On 7/8/11 3:40 PM, kmoens wrote:
Hi Willem,
I did. Here it is:
<?xml version='1.0' encoding='UTF-8'?>
<definitions
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://aml.mycomp.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://aml.mycomp.com/" name="AmlService">
Can you change the definitions@name not to be "AmlService" ?
<types>
<xsd:schema>
<xsd:import namespace="http://aml.mycomp.com/"
schemaLocation="http://localhost:8080/aml/AmlService?xsd=1" />
</xsd:schema>
</types>
<message name="isValidPayment">
<part name="parameters" element="tns:isValidPayment" />
</message>
<message name="isValidPaymentResponse">
<part name="parameters" element="tns:isValidPaymentResponse" />
</message>
<message name="AmlException">
<part name="fault" element="tns:AmlFault" />
</message>
<portType name="Aml">
<operation name="isValidPayment">
<input
wsam:Action="http://aml.mycomp.com/Aml/isValidPaymentRequest"
message="tns:isValidPayment" />
<output
wsam:Action="http://aml.mycomp.com/Aml/isValidPaymentResponse"
message="tns:isValidPaymentResponse" />
<fault message="tns:AmlException" name="AmlException"
wsam:Action="http://aml.mycomp.com/Aml/isValidPayment/Fault/AmlException" />
</operation>
</portType>
<binding name="AmlServicePortBinding" type="tns:Aml">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
<operation name="isValidPayment">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
<fault name="AmlException">
<soap:fault name="AmlException" use="literal" />
</fault>
</operation>
</binding>
*<service name="AmlService">*
<port name="AmlServicePort" binding="tns:AmlServicePortBinding">
<soap:address
location="http://localhost:8080/aml/AmlService" />
</port>
</service>
</definitions>
I'm pretty new into Camel, so I'm not sure what exactly you want me to
provide as "URI of CXF endpoint".
This is my junit4 test I run from eclipse (no maven involved):
public class AmlTest extends CamelSpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("camel-context.xml");
}
@Test
public void testOrderOk() throws Exception {
List params = new ArrayList();
params.add("usd");
params.add(100.15);
String reply = template.requestBody("cxf:bean:amlEndpoint", params,
String.class);
assertEquals(true, reply);
}
}
Thanks again
Kris
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-cxf-bean-to-invoke-external-webservice-tp4561146p4563777.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang