summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/icedtea/security/20130416/8005432.patch
blob: ccb6093bdbfc45e635d83b6ee15dcae04d230d33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
--- jdk/src/share/lib/security/java.security	2013-04-16 14:57:04.075141879 +0100
+++ jdk/src/share/lib/security/java.security	2013-04-16 14:58:37.884647607 +0100
@@ -128,10 +128,7 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.stream.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
@@ -164,10 +161,7 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.stream.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
--- jdk/src/share/lib/security/java.security-solaris	2013-04-16 14:57:04.075141879 +0100
+++ jdk/src/share/lib/security/java.security-solaris	2013-04-16 15:00:01.509990145 +0100
@@ -129,10 +129,7 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.stream.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.
                com.sun.istack.internal.,\
                com.sun.jmx.,\
@@ -165,10 +162,7 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.stream.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
--- jdk/src/share/lib/security/java.security-windows	2013-04-16 14:57:04.075141879 +0100
+++ jdk/src/share/lib/security/java.security-windows	2013-04-16 15:00:24.790356811 +0100
@@ -129,10 +129,7 @@
 # corresponding RuntimePermission ("accessClassInPackage."+package) has
 # been granted.
 package.access=sun.,\
-               com.sun.xml.internal.bind.,\
-               com.sun.xml.internal.org.jvnet.staxex.,\
-               com.sun.xml.internal.stream.,\
-               com.sun.xml.internal.ws.,\
+               com.sun.xml.internal.,\
                com.sun.imageio.
                com.sun.istack.internal.,\
                com.sun.jmx.,\
@@ -165,10 +162,7 @@
 # checkPackageDefinition.
 #
 package.definition=sun.,\
-                   com.sun.xml.internal.bind.,\
-                   com.sun.xml.internal.org.jvnet.staxex.,\
-                   com.sun.xml.internal.stream.,\
-                   com.sun.xml.internal.ws.,\
+                   com.sun.xml.internal.,\
                    com.sun.imageio.
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
--- /dev/null	2013-04-25 15:02:13.000000000 -0400
+++ jaxws/patches/jaxws_src/8005432.patch	2013-04-25 15:09:37.000000000 -0400
@@ -0,0 +1,430 @@
+--- src/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java	2013-04-16 14:56:58.235048158 +0100
++++ src/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java	2013-04-16 14:58:37.884647607 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * 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
+@@ -235,7 +235,7 @@
+                         String pkg = nav.getPackageName(ci.getClazz());
+                         if(!registries.containsKey(pkg)) {
+                             // insert the package's object factory
+-                            C c = nav.findClass(pkg + ".ObjectFactory",ci.getClazz());
++                            C c = loadObjectFactory(ci, pkg);
+                             if(c!=null)
+                                 addRegistry(c,(Locatable)p);
+                         }
+@@ -264,6 +264,15 @@
+         return r;
+     }
+ 
++    private C loadObjectFactory(ClassInfoImpl<T, C, F, M> ci, String pkg) {
++        try {
++            return nav.findClass(pkg + ".ObjectFactory", ci.getClazz());
++        } catch (SecurityException ignored) {
++            // treat SecurityException in same way as ClassNotFoundException in this case
++            return null;
++        }
++    }
++
+     /**
+      * Checks the uniqueness of the type name.
+      */
+--- src/com/sun/xml/internal/ws/client/WSServiceDelegate.java	2013-04-16 14:56:58.419051111 +0100
++++ src/com/sun/xml/internal/ws/client/WSServiceDelegate.java	2013-04-16 14:58:37.884647607 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * 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
+@@ -22,7 +22,6 @@
+  * or visit www.oracle.com if you need additional information or have any
+  * questions.
+  */
+-
+ package com.sun.xml.internal.ws.client;
+ 
+ import com.sun.istack.internal.NotNull;
+@@ -45,8 +44,8 @@
+ import com.sun.xml.internal.ws.client.HandlerConfigurator.AnnotationConfigurator;
+ import com.sun.xml.internal.ws.client.HandlerConfigurator.HandlerResolverImpl;
+ import com.sun.xml.internal.ws.client.sei.SEIStub;
+-import com.sun.xml.internal.ws.developer.WSBindingProvider;
+ import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature;
++import com.sun.xml.internal.ws.developer.WSBindingProvider;
+ import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
+ import com.sun.xml.internal.ws.model.RuntimeModeler;
+ import com.sun.xml.internal.ws.model.SOAPSEIModel;
+@@ -59,7 +58,6 @@
+ import com.sun.xml.internal.ws.util.JAXWSUtils;
+ import com.sun.xml.internal.ws.util.ServiceConfigurationError;
+ import com.sun.xml.internal.ws.util.ServiceFinder;
+-import static com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver;
+ import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
+ import org.xml.sax.SAXException;
+ 
+@@ -74,16 +72,18 @@
+ import javax.xml.ws.handler.HandlerResolver;
+ import javax.xml.ws.soap.AddressingFeature;
+ import java.io.IOException;
++import java.lang.RuntimePermission;
+ import java.lang.reflect.Proxy;
+ import java.net.MalformedURLException;
+ import java.net.URL;
+-import java.security.AccessController;
+-import java.security.PrivilegedAction;
++import java.security.*;
+ import java.util.*;
+ import java.util.concurrent.Executor;
+ import java.util.concurrent.Executors;
+ import java.util.concurrent.ThreadFactory;
+ 
++import static com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver;
++
+ /**
+  * <code>Service</code> objects provide the client view of a Web service.
+  *
+@@ -613,7 +613,7 @@
+         }
+     }
+ 
+-    private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr,QName portName, Class<T> portInterface,
++    private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr,QName portName, final Class<T> portInterface,
+                                             WebServiceFeature[] webServiceFeatures, SEIPortInfo eif) {
+         //fail if service doesnt have WSDL
+         if (wsdlService == null)
+@@ -627,14 +627,37 @@
+         BindingImpl binding = eif.createBinding(webServiceFeatures,portInterface);
+         SEIStub pis = new SEIStub(this, binding, eif.model, createPipeline(eif, binding), epr);
+ 
+-        T proxy = portInterface.cast(Proxy.newProxyInstance(portInterface.getClassLoader(),
+-                new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis));
++        T proxy = createProxy(portInterface, pis);
++
+         if (serviceInterceptor != null) {
+             serviceInterceptor.postCreateProxy((WSBindingProvider)proxy, portInterface);
+         }
+         return proxy;
+     }
+ 
++    private <T> T createProxy(final Class<T> portInterface, final SEIStub pis) {
++
++        // accessClassInPackage privilege needs to be granted ...
++        RuntimePermission perm = new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.*");
++        PermissionCollection perms = perm.newPermissionCollection();
++        perms.add(perm);
++
++        return AccessController.doPrivileged(
++                new PrivilegedAction<T>() {
++                    @Override
++                    public T run() {
++                        Object proxy = Proxy.newProxyInstance(portInterface.getClassLoader(),
++                                new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis);
++                        return portInterface.cast(proxy);
++                    }
++                },
++                new AccessControlContext(
++                        new ProtectionDomain[]{
++                                new ProtectionDomain(null, perms)
++                        })
++        );
++    }
++
+     /**
+      * Lists up the port names in WSDL. For error diagnostics.
+      */
+--- src/javax/xml/soap/FactoryFinder.java	2013-04-16 14:56:58.667055090 +0100
++++ src/javax/xml/soap/FactoryFinder.java	2013-04-16 14:58:37.888647671 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2004, 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
+@@ -50,20 +50,12 @@
+         throws SOAPException
+     {
+         try {
+-            Class spiClass;
+-            if (classLoader == null) {
+-                spiClass = Class.forName(className);
+-            } else {
+-                spiClass = classLoader.loadClass(className);
+-            }
++            Class spiClass = safeLoadClass(className, classLoader);
+             return spiClass.newInstance();
+         } catch (ClassNotFoundException x) {
+-            throw new SOAPException(
+-                "Provider " + className + " not found", x);
++            throw new SOAPException("Provider " + className + " not found", x);
+         } catch (Exception x) {
+-            throw new SOAPException(
+-                "Provider " + className + " could not be instantiated: " + x,
+-                x);
++            throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
+         }
+     }
+ 
+@@ -83,6 +75,61 @@
+     static Object find(String factoryId)
+         throws SOAPException
+     {
++        return find(factoryId, null, false);
++    }
++
++    /**
++     * Finds the implementation <code>Class</code> object for the given
++     * factory name, or if that fails, finds the <code>Class</code> object
++     * for the given fallback class name. The arguments supplied must be
++     * used in order. If using the first argument is successful, the second
++     * one will not be used.
++     * <P>
++     * This method is package private so that this code can be shared.
++     *
++     * @return the <code>Class</code> object of the specified message factory;
++     *         may be <code>null</code>
++     *
++     * @param factoryId             the name of the factory to find, which is
++     *                              a system property
++     * @param fallbackClassName     the implementation class name, which is
++     *                              to be used only if nothing else
++     *                              is found; <code>null</code> to indicate that
++     *                              there is no fallback class name
++     * @exception SOAPException if there is a SOAP error
++     */
++    static Object find(String factoryId, String fallbackClassName)
++        throws SOAPException
++    {
++        return find(factoryId, fallbackClassName, true);
++    }
++
++    /**
++     * Finds the implementation <code>Class</code> object for the given
++     * factory name, or if that fails, finds the <code>Class</code> object
++     * for the given default class name, but only if <code>tryFallback</code>
++     * is <code>true</code>.  The arguments supplied must be used in order
++     * If using the first argument is successful, the second one will not
++     * be used.  Note the default class name may be needed even if fallback
++     * is not to be attempted, so certain error conditions can be handled.
++     * <P>
++     * This method is package private so that this code can be shared.
++     *
++     * @return the <code>Class</code> object of the specified message factory;
++     *         may not be <code>null</code>
++     *
++     * @param factoryId             the name of the factory to find, which is
++     *                              a system property
++     * @param defaultClassName      the implementation class name, which is
++     *                              to be used only if nothing else
++     *                              is found; <code>null</code> to indicate
++     *                              that there is no default class name
++     * @param tryFallback           whether to try the default class as a
++     *                              fallback
++     * @exception SOAPException if there is a SOAP error
++     */
++    static Object find(String factoryId, String defaultClassName,
++            boolean tryFallback) throws SOAPException {
+         ClassLoader classLoader;
+         try {
+             classLoader = Thread.currentThread().getContextClassLoader();
+@@ -140,49 +187,56 @@
+         } catch( Exception ex ) {
+         }
+ 
+-        return null;
++        // If not found and fallback should not be tried, return a null result.
++        if (!tryFallback)
++            return null;
++
++        // We didn't find the class through the usual means so try the default
++        // (built in) factory if specified.
++        if (defaultClassName == null) {
++            throw new SOAPException(
++                "Provider for " + factoryId + " cannot be found", null);
++        }
++        return newInstance(defaultClassName, classLoader);
+     }
+ 
+     /**
+-     * Finds the implementation <code>Class</code> object for the given
+-     * factory name, or if that fails, finds the <code>Class</code> object
+-     * for the given fallback class name. The arguments supplied must be
+-     * used in order. If using the first argument is successful, the second
+-     * one will not be used.
+-     * <P>
+-     * This method is package private so that this code can be shared.
+-     *
+-     * @return the <code>Class</code> object of the specified message factory;
+-     *         may not be <code>null</code>
+-     *
+-     * @param factoryId             the name of the factory to find, which is
+-     *                              a system property
+-     * @param fallbackClassName     the implementation class name, which is
+-     *                              to be used only if nothing else
+-     *                              is found; <code>null</code> to indicate that
+-     *                              there is no fallback class name
+-     * @exception SOAPException if there is a SOAP error
++     * Loads the class, provided that the calling thread has an access to the
++     * class being loaded. If this is the specified default factory class and it
++     * is restricted by package.access we get a SecurityException and can do a
++     * Class.forName() on it so it will be loaded by the bootstrap class loader.
+      */
+-    static Object find(String factoryId, String fallbackClassName)
+-        throws SOAPException
+-    {
+-
+-        Object obj = find(factoryId);
+-        if (obj != null)
+-            return obj;
++    private static Class safeLoadClass(String className,
++            ClassLoader classLoader)
++            throws ClassNotFoundException {
++        try {
++            // make sure that the current thread has an access to the package of the given name.
++            SecurityManager s = System.getSecurityManager();
++            if (s != null) {
++                int i = className.lastIndexOf('.');
++                if (i != -1) {
++                    s.checkPackageAccess(className.substring(0, i));
++                }
++            }
+ 
+-        ClassLoader classLoader;
+-        try {
+-            classLoader = Thread.currentThread().getContextClassLoader();
+-        } catch (Exception x) {
+-            throw new SOAPException(x.toString(), x);
+-        }
++            if (classLoader == null)
++                return Class.forName(className);
++            else
++                return classLoader.loadClass(className);
++        } catch (SecurityException se) {
++            // (only) default implementation can be loaded
++            // using bootstrap class loader ...
++            if (isDefaultImplementation(className))
++                return Class.forName(className);
+ 
+-        if (fallbackClassName == null) {
+-            throw new SOAPException(
+-                "Provider for " + factoryId + " cannot be found", null);
++            throw se;
+         }
++    }
+ 
+-        return newInstance(fallbackClassName, classLoader);
++    private static boolean isDefaultImplementation(String className) {
++        return MessageFactory.DEFAULT_MESSAGE_FACTORY.equals(className) ||
++                SOAPFactory.DEFAULT_SOAP_FACTORY.equals(className) ||
++                SOAPConnectionFactory.DEFAULT_SOAP_CONNECTION_FACTORY.equals(className) ||
++                SAAJMetaFactory.DEFAULT_META_FACTORY_CLASS.equals(className);
+     }
+ }
+--- src/javax/xml/soap/MessageFactory.java	2013-04-16 14:56:58.667055090 +0100
++++ src/javax/xml/soap/MessageFactory.java	2013-04-16 14:58:37.888647671 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2004, 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
+@@ -72,7 +72,7 @@
+  */
+ public abstract class MessageFactory {
+ 
+-    static private final String DEFAULT_MESSAGE_FACTORY
++    static final String DEFAULT_MESSAGE_FACTORY
+         = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl";
+ 
+     static private final String MESSAGE_FACTORY_PROPERTY
+@@ -105,11 +105,14 @@
+     public static MessageFactory newInstance()
+         throws SOAPException {
+         try {
+-            MessageFactory factory = (MessageFactory)
+-                FactoryFinder.find(MESSAGE_FACTORY_PROPERTY);
++            MessageFactory factory = (MessageFactory) FactoryFinder.find(
++                    MESSAGE_FACTORY_PROPERTY,
++                    DEFAULT_MESSAGE_FACTORY,
++                    false);
+ 
+-            if (factory != null)
++            if (factory != null) {
+                 return factory;
++            }
+ 
+             return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
+         } catch (Exception ex) {
+--- src/javax/xml/soap/SAAJMetaFactory.java	2013-04-16 14:56:58.667055090 +0100
++++ src/javax/xml/soap/SAAJMetaFactory.java	2013-04-16 14:58:37.888647671 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2004, 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
+@@ -50,7 +50,7 @@
+ public abstract class SAAJMetaFactory {
+     static private final String META_FACTORY_CLASS_PROPERTY =
+         "javax.xml.soap.MetaFactory";
+-    static private final String DEFAULT_META_FACTORY_CLASS =
++    static final String DEFAULT_META_FACTORY_CLASS =
+         "com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl";
+ 
+     /**
+--- src/javax/xml/soap/SOAPConnectionFactory.java	2013-04-16 14:56:58.667055090 +0100
++++ src/javax/xml/soap/SOAPConnectionFactory.java	2013-04-16 14:58:37.888647671 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2004, 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
+@@ -44,7 +44,7 @@
+      * A constant representing the default value for a <code>SOAPConnection</code>
+      * object. The default is the point-to-point SOAP connection.
+      */
+-    static private final String DEFAULT_SOAP_CONNECTION_FACTORY
++    static final String DEFAULT_SOAP_CONNECTION_FACTORY
+         = "com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory";
+ 
+     /**
+--- src/javax/xml/soap/SOAPFactory.java	2013-04-16 14:56:58.671055155 +0100
++++ src/javax/xml/soap/SOAPFactory.java	2013-04-16 14:58:37.888647671 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2004, 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
+@@ -61,6 +61,12 @@
+         "javax.xml.soap.SOAPFactory";
+ 
+     /**
++     * Class name of default <code>SOAPFactory</code> implementation.
++     */
++    static final String DEFAULT_SOAP_FACTORY
++        = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl";
++
++    /**
+      * Creates a <code>SOAPElement</code> object from an existing DOM
+      * <code>Element</code>. If the DOM <code>Element</code> that is passed in
+      * as an argument is already a <code>SOAPElement</code> then this method
+@@ -262,7 +268,7 @@
+         throws SOAPException
+     {
+         try {
+-            SOAPFactory factory = (SOAPFactory) FactoryFinder.find(SOAP_FACTORY_PROPERTY);
++            SOAPFactory factory = (SOAPFactory) FactoryFinder.find(SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false);
+             if (factory != null)
+                 return factory;
+             return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);