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