Package com.sun.xml.ws.api.server

Examples of com.sun.xml.ws.api.server.WSEndpoint


        String serverId = adrs.getAuthority();
        InVmServer server = InVmServer.get(serverId);
        if(server==null)
            throw new WebServiceException("No such server is running: "+adrs);
        WSEndpoint endpoint;
        if(server.getEndpoints().size()==1)
            endpoint = server.getEndpoints().get(0);
        else
            endpoint = server.getByPortName(adrs.getQuery());
        if(endpoint==null)
View Full Code Here


    protected static WSEndpoint createServerService(URI adrs) {
        try {
            String outputDir = adrs.getPath();
            List<WSEndpoint> endpoints = parseEndpoints(outputDir);

            WSEndpoint endpoint = endpoints.get(0);
            if (endpoints.size() > 1) {
                for (WSEndpoint rei : endpoints) {
                    //TODO: for now just compare local part
                    if(rei.getPortName().getLocalPart().equals(adrs.getQuery())) {
                        endpoint = rei;
View Full Code Here

                //check if it is run in a Java EE Container and if so, get address using serviceName and portName
                Module module = container.getSPI(Module.class);
                if (module != null) {
                    List<BoundEndpoint> beList = module.getBoundEndpoints();
                    for (BoundEndpoint be : beList) {
                        WSEndpoint wse = be.getEndpoint();
                        if (wse.getServiceName().equals(serviceName) && wse.getPortName().equals(portName)) {
                            try {
                                address = be.getAddress().toString();
                            } catch (WebServiceException e) {
                                // May be the container does n't support this
                                //just ignore the exception
View Full Code Here

        init(layer, getAppCtxt(map), map, cbh);

  this.seiModel = (SEIModel) map.get(PipeConstants.SEI_MODEL);
        WSBinding binding = (WSBinding)map.get(PipeConstants.BINDING);
        if (binding == null) {
            WSEndpoint endPoint = (WSEndpoint)map.get(PipeConstants.ENDPOINT);
            if (endPoint != null) {
                binding = endPoint.getBinding();
            }
        }
        this.soapVersion = (binding != null) ? binding.getSOAPVersion(): SOAPVersion.SOAP_11;
       
         URL url = loadFromClasspath(SECURITY_CONTEXT_PROP);
View Full Code Here

    }
   
   
    private static String getAppCtxt(Map map) {
        String rvalue = null;
        WSEndpoint wse =
            (WSEndpoint) map.get(PipeConstants.ENDPOINT);
        Container container = (Container)map.get(PipeConstants.CONTAINER);
        // endpoint
        if (wse != null) {
            if (container != null) {
                Module module = container.getSPI(Module.class);
                if (module != null) {
                    List<BoundEndpoint> beList = module.getBoundEndpoints();
                    for (BoundEndpoint be : beList) {
                        WSEndpoint wsep = be.getEndpoint();
                        if (wse.getPortName().equals(wsep.getPortName())) {
                            rvalue = be.getAddress().toASCIIString();
                        }
                    }
                }
            }
View Full Code Here

        if (this instanceof WSITClientAuthContext) {
            WSBinding binding = (WSBinding)map.get("BINDING");
            pipeConfig = new ClientTubeConfiguration(
                    wsPolicyMap, port, binding);
        } else {
            WSEndpoint endPoint = (WSEndpoint)map.get("ENDPOINT");
            pipeConfig = new ServerTubeConfiguration(
                    wsPolicyMap, port, endPoint);
        }

        soapVersion = pipeConfig.getBinding().getSOAPVersion();
View Full Code Here

        if (requestMsg == null || !requestMsg.hasHeaders()) {
            // TODO: Better error message
            throw new WebServiceException("Malformed MEX Request");
        }

        WSEndpoint wsEndpoint = (WSEndpoint) wsContext.getMessageContext().get(JAXWSProperties.WSENDPOINT);
        SOAPVersion soapVersion = wsEndpoint.getBinding().getSOAPVersion();

        // try w3c version of ws-a first, then member submission version
        final MessageHeaders headers = requestMsg.getHeaders();

        String action = AddressingUtils.getAction(headers, AddressingVersion.W3C, soapVersion);
View Full Code Here

    private Message processGetRequest(final Message request,
        String address, final AddressingVersion wsaVersion,
        final SOAPVersion soapVersion) {

        try {
            WSEndpoint ownerEndpoint = findEndpoint();

            // If the owner endpoint has been found, then
            // get its metadata and write it to the response message
            if (ownerEndpoint != null) {
                final MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
View Full Code Here

     *
     * @return The endpoint that owns the actual service or null.
     */
    private WSEndpoint findEndpoint() {

        WSEndpoint wsEndpoint = (WSEndpoint) wsContext.getMessageContext().get(JAXWSProperties.WSENDPOINT);
        HttpServletRequest servletRequest = (HttpServletRequest)wsContext.getMessageContext().get(MessageContext.SERVLET_REQUEST);
        if (servletRequest == null) {
            // TODO: better error message
            throw new WebServiceException("MEX: no ServletRequest can be found");
        }

        // Derive the address of the owner endpoint.
        // e.g. http://localhost/foo/mex --> http://localhost/foo
        WSEndpoint ownerEndpoint = null;
        ServletModule module = (ServletModule) wsEndpoint.getContainer().getSPI(ServletModule.class);
        String baseAddress = module.getContextPath(servletRequest);
        String ownerEndpointAddress = null;
        List<BoundEndpoint> boundEndpoints = module.getBoundEndpoints();
        for (BoundEndpoint endpoint : boundEndpoints) {
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.server.WSEndpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.