1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.module.cxf.builder; |
12 | |
|
13 | |
import org.mule.api.lifecycle.CreateException; |
14 | |
|
15 | |
import org.apache.cxf.aegis.databinding.AegisDatabinding; |
16 | |
import org.apache.cxf.endpoint.Client; |
17 | |
import org.apache.cxf.frontend.ClientProxy; |
18 | |
import org.apache.cxf.frontend.ClientProxyFactoryBean; |
19 | |
|
20 | 0 | public class SimpleClientMessageProcessorBuilder extends AbstractClientMessageProcessorBuilder |
21 | |
{ |
22 | |
@Override |
23 | |
protected Client createClient() throws CreateException, Exception |
24 | |
{ |
25 | 0 | ClientProxyFactoryBean cpf = new ClientProxyFactoryBean(); |
26 | 0 | cpf.setServiceClass(serviceClass); |
27 | 0 | if (databinding == null) |
28 | |
{ |
29 | 0 | cpf.setDataBinding(new AegisDatabinding()); |
30 | |
} |
31 | |
else |
32 | |
{ |
33 | 0 | cpf.setDataBinding(databinding); |
34 | |
} |
35 | 0 | cpf.setAddress(getAddress()); |
36 | 0 | cpf.setBus(getBus()); |
37 | 0 | cpf.setProperties(properties); |
38 | |
|
39 | 0 | if (wsdlLocation != null) |
40 | |
{ |
41 | 0 | cpf.setWsdlLocation(wsdlLocation); |
42 | |
} |
43 | |
|
44 | 0 | return ClientProxy.getClient(cpf.create()); |
45 | |
} |
46 | |
} |