--- /dev/null 2014-09-23 13:57:22.000000000 +0200
+++ new/test/javax/xml/ws/xsanymixed/CopyingResponse.java 2014-09-23 13:57:22.000000000 +0200
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+import org.somewhere.ws.EchoRequest;
+import org.somewhere.ws.EchoResponse;
+
+public class CopyingResponse extends EchoResponse {
+
+ public CopyingResponse() {}
+
+ public CopyingResponse(EchoRequest request) {
+ content = request.getContent();
+ }
+}
--- /dev/null 2014-09-23 13:57:23.000000000 +0200
+++ new/test/javax/xml/ws/xsanymixed/ServiceImpl.java 2014-09-23 13:57:23.000000000 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.somewhere.ws.EchoRequest;
+import org.somewhere.ws.EchoResponse;
+import org.somewhere.ws.TestPort;
+
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+
+
+/**
+ * Simple Webservice implementation just copying xml part as is
+ * from incoming request into outgoing response
+ */
+@WebService(
+ endpointInterface = "org.somewhere.ws.TestPort",
+ targetNamespace = "http://ws.somewhere.org/",
+ serviceName = "TestService",
+ portName = "TestPort")
+public class ServiceImpl implements TestPort {
+
+ public static final QName PORT_NAME = new QName("http://ws.somewhere.org/", "TestPort");
+ public static final QName SERVICE_NAME = new QName("http://ws.somewhere.org/", "TestService");
+
+ @Override
+ public EchoResponse echo(EchoRequest request) {
+ return new CopyingResponse(request);
+ }
+
+}
--- /dev/null 2014-09-23 13:57:24.000000000 +0200
+++ new/test/javax/xml/ws/xsanymixed/Test.java 2014-09-23 13:57:24.000000000 +0200
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8036981 8038966 8051441
+ * @summary the content of xs:any content:mixed should remain as is,
+ * no white space changes and no changes to namespace prefixes
+ * @run shell compile-wsdl.sh
+ * @run main/othervm Test
+ */
+
+import com.sun.net.httpserver.HttpServer;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+
+import static java.nio.file.FileVisitResult.CONTINUE;
+
+public class Test {
+
+ private static HttpServer httpServer;
+ private static Endpoint endpoint;
+ private static final String NL = System.getProperty("line.separator");
+
+ private static final String XS_ANY_MIXED_PART =
+ "" + NL +
+ " " + NL + NL +
+ "" + NL + NL +
+ " any" + NL +
+ " white" + NL +
+ " space" + NL + NL +
+ " ... and" + NL + NL +
+ " NO namespace prefixes!!!" + NL + NL +
+ " " + NL + NL +
+ " " + NL +
+ "" + NL +
+ "";
+
+ private static final String XML_REQUEST = "" +
+ "" +
+ "" + NL +
+ XS_ANY_MIXED_PART + NL +
+ "" +
+ "";
+
+ private static String deployWebservice() throws IOException {
+ // Manually create HttpServer here using ephemeral address for port
+ // so as to not end up with attempt to bind to an in-use port
+ httpServer = HttpServer.create(new InetSocketAddress(0), 0);
+ httpServer.start();
+ endpoint = Endpoint.create(new ServiceImpl());
+ endpoint.publish(httpServer.createContext("/wservice"));
+
+ String wsdlAddress = "http://localhost:" + httpServer.getAddress().getPort() + "/wservice?wsdl";
+ log("address = " + wsdlAddress);
+ return wsdlAddress;
+ }
+
+ private static void stopWebservice() {
+ if (endpoint != null && endpoint.isPublished()) {
+ endpoint.stop();
+ }
+ if (httpServer != null) {
+ httpServer.stop(0);
+ }
+ }
+
+ public static void main(String[] args) throws IOException, TransformerException {
+
+ try {
+ String address = deployWebservice();
+ Service service = Service.create(new URL(address), ServiceImpl.SERVICE_NAME);
+
+ Dispatch