src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2010, 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, 2012, 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
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package com.sun.xml.internal.messaging.saaj.soap.impl;
+ import java.net.URI;
+ import java.net.URISyntaxException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
*** 107,122 ****
}
}
}
public Document getOwnerDocument() {
! SOAPDocument ownerSOAPDocument =
! ((SOAPDocument) super.getOwnerDocument());
! if (ownerSOAPDocument == null) {
! return null;
! }
! return ownerSOAPDocument.getDocument();
}
public SOAPElement addChildElement(Name name) throws SOAPException {
return addElement(name);
}
--- 109,123 ----
}
}
}
public Document getOwnerDocument() {
! Document doc = super.getOwnerDocument();
! if (doc instanceof SOAPDocument)
! return ((SOAPDocument) doc).getDocument();
! else
! return doc;
}
public SOAPElement addChildElement(Name name) throws SOAPException {
return addElement(name);
}
*** 797,808 ****
}
public void setEncodingStyle(String encodingStyle) throws SOAPException {
if (!"".equals(encodingStyle)) {
try {
! JaxmURI uri = new JaxmURI(encodingStyle);
! } catch (JaxmURI.MalformedURIException m) {
log.log(
Level.SEVERE,
"SAAJ0105.impl.encoding.style.mustbe.valid.URI",
new String[] { encodingStyle });
throw new IllegalArgumentException(
--- 798,809 ----
}
public void setEncodingStyle(String encodingStyle) throws SOAPException {
if (!"".equals(encodingStyle)) {
try {
! new URI(encodingStyle);
! } catch (URISyntaxException m) {
log.log(
Level.SEVERE,
"SAAJ0105.impl.encoding.style.mustbe.valid.URI",
new String[] { encodingStyle });
throw new IllegalArgumentException(
*** 1224,1242 ****
// should be removed once the corresponding JAXP bug is fixed
// It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe)
public void setAttributeNS(
String namespaceURI,String qualifiedName, String value) {
int index = qualifiedName.indexOf(':');
! String prefix, localName;
! if (index < 0) {
! prefix = null;
localName = qualifiedName;
! }
! else {
! prefix = qualifiedName.substring(0, index);
localName = qualifiedName.substring(index + 1);
- }
// Workaround for bug 6467808 - This needs to be fixed in JAXP
// Rolling back this fix, this is a wrong fix, infact its causing other regressions in JAXWS tck and
// other tests, because of this change the namespace declarations on soapenv:Fault element are never
--- 1225,1239 ----
// should be removed once the corresponding JAXP bug is fixed
// It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe)
public void setAttributeNS(
String namespaceURI,String qualifiedName, String value) {
int index = qualifiedName.indexOf(':');
! String localName;
! if (index < 0)
localName = qualifiedName;
! else
localName = qualifiedName.substring(index + 1);
// Workaround for bug 6467808 - This needs to be fixed in JAXP
// Rolling back this fix, this is a wrong fix, infact its causing other regressions in JAXWS tck and
// other tests, because of this change the namespace declarations on soapenv:Fault element are never