01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: TcpipWsdl1Deployer.java 7267 2007-05-08 20:15:08Z mpreston $
23: */
24: package com.bostechcorp.cbesb.runtime.component.tcpip;
25:
26: import javax.wsdl.extensions.ExtensibilityElement;
27: import javax.wsdl.extensions.ExtensionRegistry;
28:
29: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.CbComponent;
30: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.CbEndpoint;
31: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.Wsdl1Deployer;
32: import com.bostechcorp.cbesb.runtime.component.tcpip.wsdl.TcpipBinding;
33: import com.bostechcorp.cbesb.runtime.component.tcpip.wsdl.TcpipConfig;
34: import com.bostechcorp.cbesb.runtime.component.tcpip.wsdl.TcpipExtension;
35:
36: public class TcpipWsdl1Deployer extends Wsdl1Deployer {
37:
38: public TcpipWsdl1Deployer(CbComponent component) {
39: super (component);
40: }
41:
42: protected CbEndpoint createEndpoint(
43: ExtensibilityElement[] portElement,
44: ExtensibilityElement[] bindingElement) {
45:
46: logger.debug("Tcpip CreateEndpoint portElement="
47: + portElement[0] + "\n"
48: + " bindingElement="
49: + bindingElement[0] + "\n");
50:
51: TcpipEndpoint endpoint = new TcpipEndpoint();
52: TcpipConfig config = (TcpipConfig) portElement[0];
53: endpoint.setConfig(config);
54: endpoint.setRole(endpoint.getConfig().getRole());
55: endpoint.setDefaultMep(endpoint.getConfig().getDefaultMep());
56: endpoint.setDefaultOperation(endpoint.getConfig()
57: .getDefaultOperation());
58: return endpoint;
59: }
60:
61: /*
62: * (non-Javadoc)
63: *
64: * @see org.apache.servicemix.common.wsdl.AbstractWsdlDeployer#filterPortElement(javax.wsdl.extensions.ExtensibilityElement)
65: */
66: protected boolean filterPortElement(ExtensibilityElement element) {
67: return element instanceof TcpipConfig;
68: }
69:
70: /*
71: *
72: */
73: protected boolean filterBindingElement(ExtensibilityElement element) {
74: return element instanceof TcpipBinding;
75: }
76:
77: /*
78: * (non-Javadoc)
79: *
80: * @see org.apache.servicemix.common.wsdl.AbstractWsdlDeployer#registerExtensions(javax.wsdl.extensions.ExtensionRegistry)
81: */
82: protected void registerExtensions(ExtensionRegistry registry) {
83: TcpipExtension.register(registry);
84: }
85: }
|