Search in sources :

Example 71 with Endpoint

use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.

the class EmptyNamespaceTest method testEmptyNamespace.

public void testEmptyNamespace() throws Exception {
    int port = PortAllocator.getFreePort();
    String address = "http://localhost:" + port + "/hello";
    Endpoint endpoint = Endpoint.create(new GetTotalPrice());
    List<Source> metadata = new ArrayList<Source>();
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    endpoint.publish(address);
    URL pubUrl = new URL(address + "?wsdl");
    boolean gen = isGenerated(pubUrl.openStream());
    assertTrue(gen);
    URL xsdUrl = new URL(address + "?xsd=2");
    String contents = getContent(xsdUrl.openStream());
    assertTrue(contents, contents.indexOf(":complexType name=\"shoppingCart\"") > -1);
    endpoint.stop();
}
Also used : Endpoint(jakarta.xml.ws.Endpoint) ArrayList(java.util.ArrayList) Endpoint(jakarta.xml.ws.Endpoint) StreamSource(javax.xml.transform.stream.StreamSource) Source(javax.xml.transform.Source) URL(java.net.URL)

Example 72 with Endpoint

use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.

the class EndpointAPITest method testSlashPath.

public void testSlashPath() throws Exception {
    int port = PortAllocator.getFreePort();
    String address = "http://localhost:" + port + "/";
    Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
    endpoint.publish(address);
    assertTrue(isWSDL(address));
    endpoint.stop();
}
Also used : Endpoint(jakarta.xml.ws.Endpoint) Endpoint(jakarta.xml.ws.Endpoint)

Example 73 with Endpoint

use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.

the class EndpointAPITest method testEndpoint1.

public void testEndpoint1() {
    int port = PortAllocator.getFreePort();
    String address = "http://localhost:" + port + "/hello";
    Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
    endpoint.publish(address);
    doAPItesting(endpoint);
}
Also used : Endpoint(jakarta.xml.ws.Endpoint) Endpoint(jakarta.xml.ws.Endpoint)

Example 74 with Endpoint

use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.

the class EndpointAPITest method testStopBeforePublish.

public void testStopBeforePublish() {
    Endpoint endpoint = Endpoint.create(new RpcLitEndpoint());
    // Stop before publish() shouldn't have any effect
    endpoint.stop();
}
Also used : Endpoint(jakarta.xml.ws.Endpoint)

Example 75 with Endpoint

use of jakarta.xml.ws.Endpoint in project metro-jax-ws by eclipse-ee4j.

the class EndpointAPITester method testEndpoint.

public void testEndpoint() {
    int port = Util.getFreePort();
    String address = "http://localhost:" + port + "/hello";
    Endpoint endpoint = Endpoint.publish(address, new RpcLitEndpoint());
    doAPItesting(endpoint);
}
Also used : Endpoint(jakarta.xml.ws.Endpoint) Endpoint(jakarta.xml.ws.Endpoint)

Aggregations

Endpoint (jakarta.xml.ws.Endpoint)90 URL (java.net.URL)25 Source (javax.xml.transform.Source)22 StreamSource (javax.xml.transform.stream.StreamSource)22 ArrayList (java.util.ArrayList)16 MemberSubmissionEndpointReference (com.sun.xml.ws.developer.MemberSubmissionEndpointReference)10 W3CEndpointReference (jakarta.xml.ws.wsaddressing.W3CEndpointReference)10 QName (javax.xml.namespace.QName)7 HttpContext (com.sun.net.httpserver.HttpContext)6 HttpServer (com.sun.net.httpserver.HttpServer)5 InetSocketAddress (java.net.InetSocketAddress)5 HashMap (java.util.HashMap)5 ExecutorService (java.util.concurrent.ExecutorService)5 HTTPResponseInfo (testutil.HTTPResponseInfo)5 EndpointImpl (com.sun.xml.ws.transport.http.server.EndpointImpl)4 EndpointReference (jakarta.xml.ws.EndpointReference)4 Transformer (javax.xml.transform.Transformer)4 TransformerFactory (javax.xml.transform.TransformerFactory)4 StreamResult (javax.xml.transform.stream.StreamResult)4 WSEndpoint (com.sun.xml.ws.api.server.WSEndpoint)3