1
2
3
4
5
6
7
8
9
10
11 package org.mule.module.cxf.builder;
12
13
14 import javax.xml.namespace.QName;
15
16 import org.apache.cxf.endpoint.Client;
17 import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
18
19
20
21
22
23
24
25 public class WsdlClientMessageProcessorBuilder extends AbstractOutboundMessageProcessorBuilder
26 {
27 private final static Object CLIENT_CREATION_LOCK = new Object();
28
29 private String service;
30 private String port;
31
32 public WsdlClientMessageProcessorBuilder()
33 {
34 super();
35 }
36
37 protected Client createClient() throws Exception
38 {
39 synchronized (CLIENT_CREATION_LOCK)
40 {
41 DynamicClientFactory cf = DynamicClientFactory.newInstance(getBus());
42 return cf.createClient(getWsdlLocation(),
43 (service == null ? null : QName.valueOf(service)),
44 (getPort() == null ? null : QName.valueOf(getPort())));
45 }
46 }
47
48 public String getService()
49 {
50 return service;
51 }
52
53 public void setService(String service)
54 {
55 this.service = service;
56 }
57
58 public String getPort()
59 {
60 return port;
61 }
62
63 public void setPort(String port)
64 {
65 this.port = port;
66 }
67
68 }