use of org.apache.camel.wsdl_first.PersonMultiPartPortType in project camel by apache.
the class CXFWsdlOnlyPayloadModeMultiPartNoSpringTest method testMultiPartMessage.
@Test
public void testMultiPartMessage() {
URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
PersonMultiPartService ss = new PersonMultiPartService(wsdlURL, QName.valueOf(getServiceName()));
PersonMultiPartPortType client = ss.getPersonMultiPartPort();
((BindingProvider) client).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:" + port2 + "/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest/PersonMultiPart");
Holder<Integer> ssn = new Holder<Integer>();
ssn.value = 0;
Holder<String> name = new Holder<String>();
name.value = "Unknown name";
client.getPersonMultiPartOperation("foo", 0, name, ssn);
assertEquals("New Person Name", name.value);
assertTrue(123456789 == ssn.value);
}
Aggregations