holder2) {
- return "success";
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml
deleted file mode 100644
index 2bdcbb7042..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/build.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml
deleted file mode 100644
index cfe5722edc..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/customfile.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ConformanceClaimHandler
- com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.ConformanceClaimHandler
-
-
-
-
-
-
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens
deleted file mode 100644
index 940b5ae419..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.tokens
+++ /dev/null
@@ -1,12 +0,0 @@
-WSRAnn=@WebServiceRef(name="service/wsj2wsimpletest")
-SERVICE=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleTest
-IMPL=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpointImpl
-SEI=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpoint
-NAMESPACEURI=http://simpletestservice.org/wsdl
-PORT=SimpleEndpointPort
-URLALIAS=/jaxws/SimpleTest
-SERVLETNAME=com.sun.ts.tests.jaxws.sharedwebservices.simpleservice.SimpleEndpointImpl
-WEBSERVICEDESCRIPTION=SimpleTest
-SERVICEREFNAMEWSSERVLET=service/wsj2wsimpletest
-SERVICEREFNAMEWSEJB=service/wsj2wsimpletest
-SERVICEREFNAMEWSAPPCLIENT=service/wsj2wsimpletest
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml
deleted file mode 100644
index fd0414c821..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/jakartaEE.web.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- @APPNAME@
-
- @SERVLETNAME@
- @IMPL@
- 0
-
-
- @SERVLETNAME@
- @URLALIAS@
-
-
- 54
-
-
-
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml
deleted file mode 100644
index 1b1c704476..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone-sun-jaxws.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml
deleted file mode 100644
index d1f85ef153..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/sharedwebservices/simpleservice/standalone.web.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- WSJ2WSimpleServiceApp
-
-com.sun.xml.ws.transport.http.servlet.WSServletContextListener
-
-
-SimpleTest
-com.sun.xml.ws.transport.http.servlet.WSServlet
-1
-
-
-SimpleTest
-/jaxws/SimpleTest
-
-
- 54
-
-
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java
deleted file mode 100644
index b5d4898b08..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ActionNotSupportedException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import jakarta.xml.ws.WebServiceException;
-
-public class ActionNotSupportedException extends WebServiceException {
- String detail;
-
- public ActionNotSupportedException(String message) {
- super(message);
- }
-
- public ActionNotSupportedException(String message, String detail) {
- super(message);
- this.detail = detail;
- }
-
- public String getDetail() {
- return detail;
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java
deleted file mode 100644
index dac8ebf04e..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingConstants.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-public interface AddressingConstants {
- public static final String CLIENT_INBOUND = "client.inbound";
-
- public static final String CLIENT_OUTBOUND = "client.outbound";
-
- public static final String SERVER_INBOUND = "server.inbound";
-
- public static final String SERVER_OUTBOUND = "server.outbound";
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java
deleted file mode 100644
index ac656cb142..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingHeaderException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import jakarta.xml.ws.WebServiceException;
-
-public class AddressingHeaderException extends WebServiceException {
- String detail;
-
- public AddressingHeaderException(String message) {
- super(message);
- }
-
- public AddressingHeaderException(String message, String detail) {
- super(message);
- this.detail = detail;
- }
-
- public String getDetail() {
- return detail;
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java
deleted file mode 100644
index 59a97c290b..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/AddressingPropertyException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import jakarta.xml.ws.WebServiceException;
-
-public class AddressingPropertyException extends WebServiceException {
- String detail;
-
- public AddressingPropertyException(String message) {
- super(message);
- }
-
- public AddressingPropertyException(String message, String detail) {
- super(message);
- this.detail = detail;
- }
-
- public String getDetail() {
- return detail;
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java
deleted file mode 100644
index 56c80efe3e..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/ByteArrayBuffer.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id: ByteArrayBuffer.java 51075 2003-03-27 10:44:21Z lschwenk $
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class ByteArrayBuffer extends OutputStream {
- /**
- * The buffer where data is stored.
- */
- protected byte[] buf;
-
- /**
- * The number of valid bytes in the buffer.
- */
- private int count;
-
- /**
- * Creates a new byte array output stream. The buffer capacity is initially 32
- * bytes, though its size increases if necessary.
- */
- public ByteArrayBuffer() {
- this(32);
- }
-
- /**
- * Creates a new byte array output stream, with a buffer capacity of the
- * specified size, in bytes.
- *
- * @param size
- * the initial size.
- * @throws IllegalArgumentException
- * if size is negative.
- */
- public ByteArrayBuffer(int size) {
- if (size <= 0)
- throw new IllegalArgumentException();
- buf = new byte[size];
- }
-
- public ByteArrayBuffer(byte[] data) {
- this.buf = data;
- }
-
- /**
- * Reads all the data of the given {@link InputStream} and appends them into
- * this buffer.
- *
- * @throws IOException
- * if the read operation fails with an {@link IOException}.
- */
- public final void write(InputStream in) throws IOException {
- while (true) {
- int cap = buf.length - count; // the remaining buffer space
- int sz = in.read(buf, count, cap);
- if (sz < 0)
- return; // hit EOS
- count += sz;
-
- if (cap == sz)
- ensureCapacity(buf.length * 2); // buffer filled up.
- }
- }
-
- public final void write(int b) {
- int newcount = count + 1;
- ensureCapacity(newcount);
- buf[count] = (byte) b;
- count = newcount;
- }
-
- public final void write(byte b[], int off, int len) {
- int newcount = count + len;
- ensureCapacity(newcount);
- System.arraycopy(b, off, buf, count, len);
- count = newcount;
- }
-
- private void ensureCapacity(int newcount) {
- if (newcount > buf.length) {
- byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];
- System.arraycopy(buf, 0, newbuf, 0, count);
- buf = newbuf;
- }
- }
-
- public final void writeTo(OutputStream out) throws IOException {
- out.write(buf, 0, count);
- }
-
- public final void reset() {
- count = 0;
- }
-
- /**
- * Gets the copy of exact-size byte[] that represents the written data.
- *
- *
- * Since this method needs to allocate a new byte[], this method will be
- * costly.
- *
- * @deprecated this method causes a buffer reallocation. Use it only when you
- * have to.
- */
- public final byte[] toByteArray() {
- byte newbuf[] = new byte[count];
- System.arraycopy(buf, 0, newbuf, 0, count);
- return newbuf;
- }
-
- public final int size() {
- return count;
- }
-
- /**
- * Gets the underlying buffer that this {@link ByteArrayBuffer} uses. It's
- * never small than its {@link #size()}.
- *
- * Use with caution.
- */
- public final byte[] getRawData() {
- return buf;
- }
-
- public void close() throws IOException {
- }
-
- /**
- * Creates a new {@link InputStream} that reads from this buffer.
- */
- public final InputStream newInputStream() {
- return new ByteArrayInputStream(buf, 0, count);
- }
-
- /**
- * Creates a new {@link InputStream} that reads a part of this bfufer.
- */
- public final InputStream newInputStream(int start, int length) {
- return new ByteArrayInputStream(buf, start, length);
- }
-
- /**
- * Decodes the contents of this buffer by the default encoding and returns it
- * as a string.
- *
- *
- * Meant to aid debugging, but no more.
- */
- public String toString() {
- return new String(buf, 0, count);
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java
deleted file mode 100644
index 52a4fb20cb..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/DOMUtil.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id: DOMUtil.java 51109 2006-09-28 15:28:12Z lschwenk $
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-public class DOMUtil {
-
- private static DocumentBuilder db;
-
- /**
- * Creates a new DOM document.
- */
- public static Document createDom() {
- synchronized (DOMUtil.class) {
- if (db == null) {
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- db = dbf.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- throw new FactoryConfigurationError(e);
- }
- }
- return db.newDocument();
- }
- }
-
- public static Node createDOMNode(InputStream inputStream) {
-
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- dbf.setValidating(false);
- try {
- DocumentBuilder builder = dbf.newDocumentBuilder();
- try {
- return builder.parse(inputStream);
- } catch (SAXException e) {
- e.printStackTrace(); // To change body of catch statement use File |
- // Settings | File Templates.
- } catch (IOException e) {
- e.printStackTrace(); // To change body of catch statement use File |
- // Settings | File Templates.
- }
- } catch (ParserConfigurationException pce) {
- IllegalArgumentException iae = new IllegalArgumentException(
- pce.getMessage());
- iae.initCause(pce);
- throw iae;
- }
- return null;
- }
-
- /**
- * Traverses a DOM node and writes out on a streaming writer.
- *
- * @param node
- * @param writer
- */
- public static void serializeNode(Element node, XMLStreamWriter writer)
- throws XMLStreamException {
- String nodePrefix = fixNull(node.getPrefix());
- String nodeNS = fixNull(node.getNamespaceURI());
-
- // See if nodePrefix:nodeNS is declared in writer's NamespaceContext before
- // writing start element
- // Writing start element puts nodeNS in NamespaceContext even though
- // namespace declaration not written
- boolean prefixDecl = isPrefixDeclared(writer, nodeNS, nodePrefix);
-
- writer.writeStartElement(nodePrefix, node.getLocalName(), nodeNS);
-
- if (node.hasAttributes()) {
- NamedNodeMap attrs = node.getAttributes();
- int numOfAttributes = attrs.getLength();
- // write namespace declarations first.
- // if we interleave this with attribue writing,
- // Zephyr will try to fix it and we end up getting inconsistent namespace
- // bindings.
- for (int i = 0; i < numOfAttributes; i++) {
- Node attr = attrs.item(i);
- String nsUri = fixNull(attr.getNamespaceURI());
- if (nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- // handle default ns declarations
- String local = attr.getLocalName()
- .equals(XMLConstants.XMLNS_ATTRIBUTE) ? "" : attr.getLocalName();
- if (local.equals(nodePrefix) && attr.getNodeValue().equals(nodeNS)) {
- prefixDecl = true;
- }
- // this is a namespace declaration, not an attribute
- writer.setPrefix(attr.getLocalName(), attr.getNodeValue());
- writer.writeNamespace(attr.getLocalName(), attr.getNodeValue());
- }
- }
- }
- // node's namespace is not declared as attribute, but declared on ancestor
- if (!prefixDecl) {
- writer.writeNamespace(nodePrefix, nodeNS);
- }
-
- // Write all other attributes which are not namespace decl.
- if (node.hasAttributes()) {
- NamedNodeMap attrs = node.getAttributes();
- int numOfAttributes = attrs.getLength();
-
- for (int i = 0; i < numOfAttributes; i++) {
- Node attr = attrs.item(i);
- String attrPrefix = fixNull(attr.getPrefix());
- String attrNS = fixNull(attr.getNamespaceURI());
- if (!attrNS.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- String localName = attr.getLocalName();
- if (localName == null) {
- // TODO: this is really a bug in the caller for not creating proper
- // DOM tree.
- // will remove this workaround after plugfest
- localName = attr.getNodeName();
- }
- boolean attrPrefixDecl = isPrefixDeclared(writer, attrNS, attrPrefix);
- if (!attrPrefix.equals("") && !attrPrefixDecl) {
- // attr has namespace but namespace decl is there in ancestor node
- // So write the namespace decl before writing the attr
- writer.setPrefix(attr.getLocalName(), attr.getNodeValue());
- writer.writeNamespace(attrPrefix, attrNS);
- }
- writer.writeAttribute(attrPrefix, attrNS, localName,
- attr.getNodeValue());
- }
- }
- }
-
- if (node.hasChildNodes()) {
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- switch (child.getNodeType()) {
- case Node.PROCESSING_INSTRUCTION_NODE:
- writer.writeProcessingInstruction(child.getNodeValue());
- break;
- case Node.DOCUMENT_TYPE_NODE:
- break;
- case Node.CDATA_SECTION_NODE:
- writer.writeCData(child.getNodeValue());
- break;
- case Node.COMMENT_NODE:
- writer.writeComment(child.getNodeValue());
- break;
- case Node.TEXT_NODE:
- writer.writeCharacters(child.getNodeValue());
- break;
- case Node.ELEMENT_NODE:
- serializeNode((Element) child, writer);
- break;
- }
- }
- }
- writer.writeEndElement();
- }
-
- private static boolean isPrefixDeclared(XMLStreamWriter writer, String nsUri,
- String prefix) {
- boolean prefixDecl = false;
- NamespaceContext nscontext = writer.getNamespaceContext();
- Iterator prefixItr = nscontext.getPrefixes(nsUri);
- while (prefixItr.hasNext()) {
- if (prefix.equals(prefixItr.next())) {
- prefixDecl = true;
- break;
- }
- }
- return prefixDecl;
- }
-
- /**
- * Gets the first child of the given name, or null.
- */
- public static Element getFirstChild(Element e, String nsUri, String local) {
- for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- Element c = (Element) n;
- if (c.getLocalName().equals(local) && c.getNamespaceURI().equals(nsUri))
- return c;
- }
- }
- return null;
- }
-
- private static String fixNull(String s) {
- if (s == null)
- return "";
- else
- return s;
- }
-
- /**
- * Gets the first element child.
- */
- public static Element getFirstElementChild(Node parent) {
- for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- return (Element) n;
- }
- }
- return null;
- }
-}
diff --git a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java b/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java
deleted file mode 100644
index d8122f8094..0000000000
--- a/jaxws-common/src/main/java/com/sun/ts/tests/jaxws/wsa/common/EprUtil.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id: EprUtil.java 51075 2003-03-27 10:44:21Z lschwenk $
- */
-
-package com.sun.ts.tests.jaxws.wsa.common;
-
-import com.sun.ts.lib.util.*;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-import jakarta.xml.ws.EndpointReference;
-import jakarta.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.namespace.QName;
-
-import com.sun.ts.tests.jaxws.common.XMLUtils;
-
-public class EprUtil {
- private static final String FAILED = "FAILED";
-
- private static final String W3C_WSA_NS = "http://www.w3.org/2005/08/addressing";
-
- private static final String W3C_WSAM_NS = "http://www.w3.org/2007/05/addressing/metadata";
-
- private static final String MS_EPR_NS = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
-
- private static final QName WSDL_DEFINITIONS_NAME = new QName(
- "http://schemas.xmlsoap.org/wsdl/", "definitions");
-
- private static boolean debug = false;
-
- public static boolean validateEPR(Node node, Class epr,
- String endpointAddress, QName serviceName, QName portName,
- QName portTypeName, boolean hasWSDL, String wsdlLocation) {
- boolean pass1 = validateEPR(node, epr, endpointAddress, serviceName,
- portName, portTypeName, hasWSDL);
- boolean pass2 = validateWsdlLocation(node, wsdlLocation);
- if (pass1 && pass2)
- return true;
- else
- return false;
- }
-
- public static boolean validateEPR(Node node, Class epr,
- String endpointAddress, QName serviceName, QName portName,
- QName portTypeName, boolean hasWSDL) {
-
- boolean pass = true;
-
- if (node.getNodeType() == Node.DOCUMENT_NODE)
- node = node.getFirstChild();
-
- if (endpointAddress != null)
- TestUtil.logMsg("EndpointAddress=" + endpointAddress);
- if (serviceName != null)
- TestUtil.logMsg("ServiceName=" + serviceName.getLocalPart());
- if (portName != null)
- TestUtil.logMsg("PortName=" + portName.getLocalPart());
- if (portTypeName != null)
- TestUtil.logMsg("PortTypeName=" + portTypeName.getLocalPart());
- if (hasWSDL)
- TestUtil.logMsg("WSDL=" + hasWSDL);
- TestUtil.logMsg("EPR class=" + epr);
-
- if (epr.isAssignableFrom(W3CEndpointReference.class)) {
- TestUtil.logMsg("Verify element");
- if (!node.getNamespaceURI().equals(W3C_WSA_NS)) {
- TestUtil.logErr("Incorrect namespace uri, got: "
- + node.getNamespaceURI() + " expected: " + W3C_WSA_NS);
- pass = false;
- }
- if (!node.getLocalName().equals("EndpointReference")) {
- TestUtil.logErr("Incorrect element name, got: " + node.getLocalName()
- + " expected: EndpointReference");
- pass = false;
- }
-
- if (endpointAddress == null)
- return pass;
-
- Element elm = (Element) node;
- Element add = DOMUtil.getFirstElementChild(node);
- String value = XmlUtil.getTextForNode(add);
- TestUtil.logMsg("Verify element");
- if (!value.equals(endpointAddress)) {
- TestUtil.logErr("Incorrect endpoint address, got: " + value
- + " expected: " + endpointAddress);
- pass = false;
- }
- if (serviceName == null && portName == null && !hasWSDL) {
- // Need not check metadata
- return pass;
- }
- TestUtil.logMsg("Verify the EPR MetaData");
- NodeList nl = elm.getElementsByTagNameNS(W3C_WSA_NS, "Metadata");
- if (nl.getLength() != 1) {
- TestUtil.logErr("Could not find ");
- return false;
- }
- Element metdata = (Element) nl.item(0);
- String qname;
- String prefix;
- String name;
- String ns;
- // service
- if (serviceName != null) {
- TestUtil.logMsg("Verify element");
- nl = metdata.getElementsByTagNameNS(W3C_WSAM_NS, "ServiceName");
- if (nl.getLength() != 1) {
- TestUtil.logErr("Could not find in ");
- return false;
- }
- Node service = nl.item(0);
- qname = XmlUtil.getTextForNode(service);
- prefix = XmlUtil.getPrefix(qname);
- name = XmlUtil.getLocalPart(qname);
- ns = service.lookupNamespaceURI(prefix);
- if (debug)
- XMLUtils.xmlDumpDOMNodes(service);
- if (debug)
- TestUtil.logMsg(
- "prefix=" + prefix + " localPart=" + name + " namespace=" + ns);
- if (!serviceName.getNamespaceURI().equals(ns)) {
- TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected: "
- + serviceName.getNamespaceURI());
- pass = false;
- if (ns == null || ns.equals(""))
- TestUtil
- .logErr("Namespace uri is null for QName element: " + qname);
- }
- if (!serviceName.getLocalPart().equals(name)) {
- TestUtil.logErr("Incorrect service name, got: "
- + serviceName.getLocalPart() + " expected: " + name);
- pass = false;
- }
- // port
- if (portName != null) {
- TestUtil.logMsg("Verify element");
- String port = ((Element) service).getAttribute("EndpointName");
- prefix = XmlUtil.getPrefix(port);
- name = XmlUtil.getLocalPart(port);
- ns = service.lookupNamespaceURI(prefix);
- if (debug)
- TestUtil.logMsg(
- "prefix=" + prefix + " localPart=" + name + " namespace=" + ns);
- if (!portName.getLocalPart().equals(name)) {
- TestUtil.logErr("Incorrect port name, got: " + name + " expected: "
- + portName.getLocalPart());
- pass = false;
- }
- }
- }
-
- if (hasWSDL) {
- // validate portType only if it is present
- TestUtil.logMsg("Verify element");
- nl = metdata.getElementsByTagNameNS(W3C_WSAM_NS, "InterfaceName");
- if (nl.getLength() != 1) {
- TestUtil.logMsg(
- "The element is not present in ");
- return true;
- }
- Node portType = nl.item(0);
- qname = XmlUtil.getTextForNode(portType);
- prefix = XmlUtil.getPrefix(qname);
- name = XmlUtil.getLocalPart(qname);
- ns = portType.lookupNamespaceURI(prefix);
- if (debug)
- XMLUtils.xmlDumpDOMNodes(portType);
- if (debug)
- TestUtil.logMsg(
- "prefix=" + prefix + " localPart=" + name + " namespace=" + ns);
- if (!portTypeName.getNamespaceURI().equals(ns)) {
- TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected:"
- + portTypeName.getNamespaceURI());
- pass = false;
- if (ns == null || ns.equals(""))
- TestUtil
- .logErr("Namespace uri is null for QName element: " + qname);
- }
- if (!portTypeName.getLocalPart().equals(name)) {
- TestUtil.logErr("Incorrect port type name, got: " + name
- + " expected:" + portTypeName.getLocalPart());
- pass = false;
- }
-
- // validate WSDL
- nl = metdata.getElementsByTagNameNS(
- WSDL_DEFINITIONS_NAME.getNamespaceURI(),
- WSDL_DEFINITIONS_NAME.getLocalPart());
- Node wsdl = nl.item(0);
- // TODO:What else to do to validate this WSDL?
- }
- return pass;
- } else if (epr.isAssignableFrom(MemberSubmissionEndpointReference.class)) {
- TestUtil.logMsg("Verify element");
- if (!node.getNamespaceURI().equals(MS_EPR_NS)) {
- TestUtil.logErr("Incorrect namespace uri, got: "
- + node.getNamespaceURI() + " expected: " + MS_EPR_NS);
- pass = false;
- }
- if (!node.getLocalName().equals("EndpointReference")) {
- TestUtil.logErr("Incorrect element name, got: " + node.getLocalName()
- + " expected: EndpointReference");
- pass = false;
- }
-
- Element elm = (Element) node;
- Element add = DOMUtil.getFirstElementChild(node);
- String value = XmlUtil.getTextForNode(add);
- TestUtil.logMsg("Verify element");
- if (!value.equals(endpointAddress)) {
- TestUtil.logErr("Incorrect endpoint address, got: " + value
- + " expected: " + endpointAddress);
- pass = false;
- }
- NodeList nl;
- String qname;
- String prefix;
- String name;
- String ns;
- // service
- if (serviceName != null) {
- TestUtil.logMsg("Verify element");
- nl = elm.getElementsByTagNameNS(MS_EPR_NS, "ServiceName");
- if (nl.getLength() != 1) {
- TestUtil.logErr("Could not find in ");
- return false;
- }
- Node service = nl.item(0);
- qname = XmlUtil.getTextForNode(service);
- prefix = XmlUtil.getPrefix(qname);
- name = XmlUtil.getLocalPart(qname);
- ns = service.lookupNamespaceURI(prefix);
- if (!serviceName.getNamespaceURI().equals(ns)) {
- TestUtil.logErr("Incorrect namespace uri, got: " + ns + " expected: "
- + serviceName.getNamespaceURI());
- pass = false;
- if (ns == null || ns.equals(""))
- TestUtil
- .logErr("Namespace uri is null for QName element: " + qname);
- }
- if (!serviceName.getLocalPart().equals(name)) {
- TestUtil.logErr("Incorrect service name, got: "
- + serviceName.getLocalPart() + " expected: " + name);
- pass = false;
- }
- // port
- if (portName != null) {
- TestUtil.logMsg("Verify