9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8146086
27 * @summary Publishing two webservices on same port fails with "java.net.BindException: Address already in use"
28 * @modules java.xml.ws
29 * @compile -addmods java.xml.ws WSTest.java
30 * @run main/othervm -addmods java.xml.ws WSTest
31 */
32 import javax.jws.WebMethod;
33 import javax.jws.WebService;
34 import javax.xml.ws.Endpoint;
35 import java.net.ServerSocket;
36
37 public class WSTest {
38
39 @WebService(targetNamespace = "test")
40 public static class Method1 {
41 @WebMethod
42 public String getMethod1Value() {
43 return "from Method1";
44 }
45 }
46
47 @WebService(targetNamespace = "test")
48 public static class Method2 {
49 @WebMethod
50 public String getMethod2Value() {
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8146086
27 * @summary Publishing two webservices on same port fails with "java.net.BindException: Address already in use"
28 * @modules java.xml.ws
29 * @run main/othervm WSTest
30 */
31 import javax.jws.WebMethod;
32 import javax.jws.WebService;
33 import javax.xml.ws.Endpoint;
34 import java.net.ServerSocket;
35
36 public class WSTest {
37
38 @WebService(targetNamespace = "test")
39 public static class Method1 {
40 @WebMethod
41 public String getMethod1Value() {
42 return "from Method1";
43 }
44 }
45
46 @WebService(targetNamespace = "test")
47 public static class Method2 {
48 @WebMethod
49 public String getMethod2Value() {
|