-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gurunandan Rao <[email protected]>
- Loading branch information
Showing
87 changed files
with
3,463 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright (c) 2007, 2023 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 | ||
*/ | ||
|
||
package com.sun.ts.lib.porting.implementation; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
import com.sun.ts.lib.porting.TSURLInterface; | ||
|
||
// import com.sun.ts.lib.porting.TSURLInterface; | ||
|
||
/** | ||
* This is a J2EE Reference specific implementation of the TSURLInterface which | ||
* is to be used for J2EE-TS testing. TS tests use this interface to obtain the | ||
* URL String to use to access a given web component. If a given J2EE Server | ||
* implmentation requires that URLs be created in a different manner, then this | ||
* implementation can be replaced. | ||
* | ||
* @author Kyle Grucci | ||
*/ | ||
public class SunRIURL implements TSURLInterface { | ||
private URL url = null; | ||
|
||
/** | ||
* This method is called by TS tests to get the URL to use to access a given web | ||
* component. | ||
* | ||
* @param protocol - the name of the protocol. | ||
* @param host - the name of the host. | ||
* @param port - the port number. | ||
* @param file - the host file. | ||
* @return a valid URL object. | ||
*/ | ||
public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException { | ||
try { | ||
url = new URL(protocol, host, port, file); | ||
} catch (MalformedURLException e) { | ||
// logger.log(Logger.Level.ERROR,"Failed during URL creation", e); | ||
throw e; | ||
} | ||
return url; | ||
} | ||
|
||
/** | ||
* This method is called by TS tests to get the URL to use to access a given web | ||
* component. | ||
* | ||
* @param protocol - the name of the protocol. | ||
* @param host - the name of the host. | ||
* @param port - the port number. | ||
* @param file - the host file. | ||
* @return a valid URL as a String. | ||
*/ | ||
public String getURLString(String protocol, String host, int port, String file) { | ||
if (file.startsWith("/")) | ||
return protocol + "://" + host + ":" + port + file; | ||
else | ||
return protocol + "://" + host + ":" + port + "/" + file; | ||
} | ||
|
||
/** | ||
* This method is called by TS tests to get the request string to use to access | ||
* a given web component. | ||
* | ||
* @param request - the request file. | ||
* @return a valid String object. | ||
*/ | ||
public String getRequest(String request) { | ||
return request; | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
saaj/src/main/java/com/sun/ts/tests/saaj/common/Client.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package com.sun.ts.tests.saaj.common; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.lang.System.Logger; | ||
import java.net.URL; | ||
import java.net.URLConnection; | ||
import java.util.Properties; | ||
|
||
import org.jboss.arquillian.junit5.ArquillianExtension; | ||
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset; | ||
import org.jboss.shrinkwrap.api.spec.WebArchive; | ||
import org.junit.jupiter.api.AfterEach; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
|
||
import com.sun.ts.lib.porting.TSURL; | ||
|
||
@ExtendWith(ArquillianExtension.class) | ||
public class Client { | ||
|
||
protected static final String PROTOCOL = "http"; | ||
|
||
protected static final String HOSTNAME = "localhost"; | ||
|
||
protected static final int PORTNUM = 8000; | ||
|
||
public static final String WEBSERVERHOSTPROP = "webServerHost"; | ||
|
||
public static final String WEBSERVERPORTPROP = "webServerPort"; | ||
|
||
protected TSURL tsurl = new TSURL(); | ||
|
||
protected URL url = null; | ||
|
||
protected URLConnection urlConn = null; | ||
|
||
protected Properties props = new Properties(); | ||
|
||
protected String hostname = HOSTNAME; | ||
|
||
protected int portnum = PORTNUM; | ||
|
||
private static final Logger logger = (Logger) System.getLogger(Client.class.getName()); | ||
|
||
public static void addFilesToArchive(String contentRoot, String[] fileNames, WebArchive archive) | ||
throws IOException { | ||
for (String fileName : fileNames) { | ||
InputStream inStream = Thread.currentThread().getContextClassLoader() | ||
.getResourceAsStream(contentRoot + fileName); | ||
ByteArrayAsset attach = new ByteArrayAsset(inStream); | ||
archive.add(attach, fileName); | ||
} | ||
} | ||
|
||
/* | ||
* @class.setup_props: webServerHost; webServerPort; | ||
*/ | ||
@BeforeEach | ||
public void setup() throws Exception { | ||
boolean pass = true; | ||
|
||
try { | ||
hostname = System.getProperty(WEBSERVERHOSTPROP); | ||
if (hostname == null) | ||
pass = false; | ||
else if (hostname.equals("")) | ||
pass = false; | ||
try { | ||
portnum = Integer.parseInt(System.getProperty(WEBSERVERPORTPROP)); | ||
} catch (Exception e) { | ||
pass = false; | ||
} | ||
} catch (Exception e) { | ||
throw new Exception("setup failed:", e); | ||
} | ||
props.put(WEBSERVERHOSTPROP, hostname); | ||
props.put(WEBSERVERPORTPROP, String.valueOf(portnum)); | ||
if (!pass) { | ||
logger.log(Logger.Level.ERROR, "Please specify host & port of web server " + "in config properties: " | ||
+ WEBSERVERHOSTPROP + ", " + WEBSERVERPORTPROP); | ||
throw new Exception("setup failed:"); | ||
} | ||
logger.log(Logger.Level.INFO, "setup ok"); | ||
} | ||
|
||
@AfterEach | ||
public void cleanup() throws Exception { | ||
logger.log(Logger.Level.INFO, "cleanup ok"); | ||
} | ||
|
||
} |
Binary file added
BIN
+2.88 KB
...om/sun/ts/tests/saaj/api/jakarta_xml_soap/AttachmentPart/contentRoot/attach.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions
58
...sources/com/sun/ts/tests/saaj/api/jakarta_xml_soap/AttachmentPart/contentRoot/attach.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | ||
<head> | ||
<!-- | ||
Copyright (c) 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 | ||
--> | ||
|
||
<title>Welcome to the JAXM TCK, Version 1.1</title> | ||
</head> | ||
<body bgcolor="#ffffff"> | ||
<CENTER><h1>Your Starting Point</h1></center><hr> | ||
|
||
|
||
<h2>Guide to Documentation</h2> | ||
|
||
<p>The <a href="COPYRIGHT-jaxm.html">JAXM Copyright</a> provides | ||
the copyright information notice for the JAXM TCK, Version 1.1.<p> | ||
|
||
<p>The <a href="ReleaseNotes-jaxm.html">JAXM ReleaseNotes</a> provide the | ||
information that you need to install, set up, and run the JAXM TCK, Version 1.1.<p> | ||
|
||
<p>The <a href="JAXMJavadocAssertions.html">Javadoc Assertion List</a> lists all the javadoc assertions that are tested by the JAXM TCK. | ||
|
||
<p>The <a href="JAXMSpecAssertions.html">Specification Assertion List</a> lists all the specification assertions that are tested by the JAXM TCK. | ||
|
||
<p>Additional documentation includes the JavaTest README file, ReleaseNotes | ||
file, and user's guide: | ||
|
||
<ul> | ||
<li><p>The <a href="JavaTest3.0/README-javatest.html">README</a> file contains | ||
basic information about the JavaTest, Version 3.0.2 harness.</p></li> | ||
|
||
<li><p>The <a href="JavaTest3.0/javatest.pdf"><em>JavaTest User's Guide</em></a>, | ||
in PDF format, contains information about using the test harness tool.</p></li> | ||
|
||
<li><p>The <a href="JavaTest3.0/ReleaseNotes-javatest.html">ReleaseNotes</a> | ||
provide information that is not contained in the <em>JavaTest User's | ||
Guide</em> manual, and which supercede any information in the manual.<p></li> | ||
</ul> | ||
|
||
<p> </p> | ||
<rule> | ||
<p><em>Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved.</em></p> | ||
</body> | ||
</html> |
Binary file added
BIN
+13 KB
...m/sun/ts/tests/saaj/api/jakarta_xml_soap/AttachmentPart/contentRoot/attach.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Oops, something went wrong.