< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 48,60 **** * */ class HttpSOAPConnection extends SOAPConnection { public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url"); - private static final String sunVmVendor = "http://java.sun.com/"; private static final String ibmVmVendor = "http://www.ibm.com/"; - private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false; private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false; private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint"; protected static final Logger log = Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN, --- 48,58 ----
*** 93,103 **** if (closed) { log.severe("SAAJ0003.p2p.call.already.closed.conn"); throw new SOAPExceptionImpl("Connection is closed"); } ! Class urlEndpointClass = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { if (loader != null) { urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT); } else { --- 91,101 ---- if (closed) { log.severe("SAAJ0003.p2p.call.already.closed.conn"); throw new SOAPExceptionImpl("Connection is closed"); } ! Class<?> urlEndpointClass = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { if (loader != null) { urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT); } else {
*** 196,217 **** if (message.saveRequired()) message.saveChanges(); MimeHeaders headers = message.getMimeHeaders(); ! Iterator it = headers.getAllHeaders(); boolean hasAuth = false; // true if we find explicit Auth header while (it.hasNext()) { MimeHeader header = (MimeHeader) it.next(); String[] values = headers.getHeader(header.getName()); if (values.length == 1) httpConnection.setRequestProperty( header.getName(), header.getValue()); else { ! StringBuffer concat = new StringBuffer(); int i = 0; while (i < values.length) { if (i != 0) concat.append(','); concat.append(values[i]); --- 194,215 ---- if (message.saveRequired()) message.saveChanges(); MimeHeaders headers = message.getMimeHeaders(); ! Iterator<?> it = headers.getAllHeaders(); boolean hasAuth = false; // true if we find explicit Auth header while (it.hasNext()) { MimeHeader header = (MimeHeader) it.next(); String[] values = headers.getHeader(header.getName()); if (values.length == 1) httpConnection.setRequestProperty( header.getName(), header.getValue()); else { ! StringBuilder concat = new StringBuilder(); int i = 0; while (i < values.length) { if (i != 0) concat.append(','); concat.append(values[i]);
*** 353,363 **** public SOAPMessage get(Object endPoint) throws SOAPException { if (closed) { log.severe("SAAJ0011.p2p.get.already.closed.conn"); throw new SOAPExceptionImpl("Connection is closed"); } ! Class urlEndpointClass = null; try { urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); } catch (Exception ex) { //Do nothing. URLEndpoint is available only when JAXM is there. --- 351,361 ---- public SOAPMessage get(Object endPoint) throws SOAPException { if (closed) { log.severe("SAAJ0011.p2p.get.already.closed.conn"); throw new SOAPExceptionImpl("Connection is closed"); } ! Class<?> urlEndpointClass = null; try { urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); } catch (Exception ex) { //Do nothing. URLEndpoint is available only when JAXM is there.
*** 439,449 **** httpConnection.setRequestMethod("GET"); httpConnection.setDoOutput(true); httpConnection.setDoInput(true); httpConnection.setUseCaches(false); ! httpConnection.setFollowRedirects(true); httpConnection.connect(); try { --- 437,447 ---- httpConnection.setRequestMethod("GET"); httpConnection.setDoOutput(true); httpConnection.setDoInput(true); httpConnection.setUseCaches(false); ! httpConnection.setInstanceFollowRedirects(true); httpConnection.connect(); try {
*** 589,599 **** System.setProperty("java.protocol.handler.pkgs", pkgs); if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "SAAJ0054.p2p.set.providers", new String[] { pkgs }); try { ! Class c = Class.forName(SSL_PROVIDER); Provider p = (Provider) c.newInstance(); Security.addProvider(p); if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider", new String[] { SSL_PROVIDER }); --- 587,597 ---- System.setProperty("java.protocol.handler.pkgs", pkgs); if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "SAAJ0054.p2p.set.providers", new String[] { pkgs }); try { ! Class<?> c = Class.forName(SSL_PROVIDER); Provider p = (Provider) c.newInstance(); Security.addProvider(p); if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider", new String[] { SSL_PROVIDER });
< prev index next >