Search in sources :

Example 1 with PersonMultiPartPortType

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);
}
Also used : PersonMultiPartService(org.apache.camel.wsdl_first.PersonMultiPartService) Holder(javax.xml.ws.Holder) PersonMultiPartPortType(org.apache.camel.wsdl_first.PersonMultiPartPortType) URL(java.net.URL) Test(org.junit.Test)

Aggregations

URL (java.net.URL)1 Holder (javax.xml.ws.Holder)1 PersonMultiPartPortType (org.apache.camel.wsdl_first.PersonMultiPartPortType)1 PersonMultiPartService (org.apache.camel.wsdl_first.PersonMultiPartService)1 Test (org.junit.Test)1