01: /*
02: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25:
26: package com.sun.xml.internal.ws.transport.http.client;
27:
28: import java.io.OutputStream;
29: import com.sun.xml.internal.ws.spi.runtime.WSConnection;
30: import java.util.Map;
31:
32: import javax.xml.ws.soap.SOAPBinding;
33:
34: import static com.sun.xml.internal.ws.client.BindingProviderProperties.BINDING_ID_PROPERTY;
35: import com.sun.xml.internal.ws.spi.runtime.ClientTransportFactory;
36: import java.util.HashMap;
37:
38: /**
39: * @author WS Development Team
40: */
41: public class HttpClientTransportFactory implements
42: ClientTransportFactory {
43:
44: public HttpClientTransportFactory() {
45: this (null);
46: }
47:
48: public HttpClientTransportFactory(OutputStream logStream) {
49: _logStream = logStream;
50: }
51:
52: /*
53: public WSConnection create() {
54: Map<String, Object> context = new HashMap<String, Object>();
55: context.put(BINDING_ID_PROPERTY, SOAPBinding.SOAP11HTTP_BINDING);
56:
57: return new HttpClientTransport(_logStream, context);
58: }
59: */
60:
61: /**
62: * Binding Id, Endpoint address and other metadata is in the property bag
63: */
64: public WSConnection create(Map<String, Object> context) {
65: return new HttpClientTransport(_logStream, context);
66: }
67:
68: private OutputStream _logStream;
69: }
|