Java Code Examples for com.sun.xml.internal.ws.api.server.Module#getBoundEndpoints()

The following examples show how to use com.sun.xml.internal.ws.api.server.Module#getBoundEndpoints() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EPRSDDocumentFilter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private @Nullable WSEndpointImpl<?> getEndpoint(String serviceName, String portName) {
    if (serviceName == null || portName == null)
        return null;
    if (endpoint.getServiceName().getLocalPart().equals(serviceName) && endpoint.getPortName().getLocalPart().equals(portName))
        return endpoint;

    if(beList == null) {
        //check if it is run in a Java EE Container and get hold of other endpoints in the application
        Module module = endpoint.getContainer().getSPI(Module.class);
        if (module != null) {
            beList = module.getBoundEndpoints();
        } else {
            beList = Collections.<BoundEndpoint>emptyList();
        }
    }

    for (BoundEndpoint be : beList) {
        WSEndpoint wse = be.getEndpoint();
        if (wse.getServiceName().getLocalPart().equals(serviceName) && wse.getPortName().getLocalPart().equals(portName)) {
            return (WSEndpointImpl) wse;
        }
    }

    return null;

}
 
Example 2
Source File: HttpAdapter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 3
Source File: HttpAdapter.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 4
Source File: HttpAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 5
Source File: HttpAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 6
Source File: HttpAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 7
Source File: HttpAdapter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 8
Source File: HttpAdapter.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}
 
Example 9
Source File: HttpAdapter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
    if (!publishStatusPage) {
        return;
    }

    // TODO: resurrect the ability to localize according to the current request.

    con.getInput().close();

    // standard browsable page
    con.setStatus(WSHTTPConnection.OK);
    con.setContentTypeResponseHeader("text/html; charset=utf-8");

    PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
    out.println("<html>");
    out.println("<head><title>");
    // out.println("Web Services");
    out.println(WsservletMessages.SERVLET_HTML_TITLE());
    out.println("</title></head>");
    out.println("<body>");
    // out.println("<h1>Web Services</h1>");
    out.println(WsservletMessages.SERVLET_HTML_TITLE_2());

    // what endpoints do we have in this system?
    Module module = getEndpoint().getContainer().getSPI(Module.class);
    List<BoundEndpoint> endpoints = Collections.emptyList();
    if(module!=null) {
        endpoints = module.getBoundEndpoints();
    }

    if (endpoints.isEmpty()) {
        // out.println("<p>No JAX-WS context information available.</p>");
        out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
    } else {
        out.println("<table width='100%' border='1'>");
        out.println("<tr>");
        out.println("<td>");
        // out.println("Endpoint");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
        out.println("</td>");

        out.println("<td>");
        // out.println("Information");
        out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
        out.println("</td>");
        out.println("</tr>");

        for (BoundEndpoint a : endpoints) {
            String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
            out.println("<tr>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
                a.getEndpoint().getServiceName(),
                a.getEndpoint().getPortName()
            ));
            out.println("</td>");

            out.println("<td>");
            out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
                endpointAddress,
                a.getEndpoint().getImplementationClass().getName()
            ));
            out.println("</td>");

            out.println("</tr>");
        }
        out.println("</table>");
    }
    out.println("</body>");
    out.println("</html>");
    out.close();
}