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

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


    JAXBContextImpl     context     = (JAXBContextImpl)endPoint.getSEIModel().getJAXBContext();
    Map<String,Object>    service     = new TreeMap<String, Object>();
    metadataModel.put(endPoint.getServiceName().getLocalPart(), service );
   
    // TODO this method gets back all available service and ports.  Filter only specified service.
    Module         modules     = endPoint.getContainer().getSPI(com.sun.xml.ws.api.server.Module.class);
    /*
     * Iterate through all bind endpoints to get service ports and operations
     */
    for(BoundEndpoint endPointObj : modules.getBoundEndpoints()){
      if(endPointObj.getEndpoint().getBinding().getBindingID() == JSONBindingID.JSON_BINDING){
        Map<String,Object>   portJSONMap   = new TreeMap<String, Object>();
        service.put(endPointObj.getEndpoint().getPortName().getLocalPart(), portJSONMap);
       
        SEIModel   seiModel     = endPointObj.getEndpoint().getSEIModel();
View Full Code Here


        // Example case: JSON request result with HTML/CSV/PDF etc response.
        /* FIXME if(customEncoder.containsKey(packet.invocationProperties.get("accept"))){
          return customEncoder.get(packet.invocationProperties.get("accept")).contentType();
        }*/
        //Worst perform
        Module modules = endpoint.getContainer().getSPI(com.sun.xml.ws.api.server.Module.class);
        //TODO document more here and increase performance.
        for(BoundEndpoint endPointObj : modules.getBoundEndpoints()){
          if(endPointObj.getEndpoint().getImplementationClass().equals(endpoint.getImplementationClass())
              && endPointObj.getEndpoint().getBinding().getBindingId() != binding.getBindingId()){
            Codec     codec     =  endPointObj.getEndpoint().createCodec();
            ContentType contentType =   codec.getStaticContentType(packet);
            if(contentType != null && contentType.getContentType().startsWith(packet.invocationProperties.get("accept").toString())){
View Full Code Here

        if (address == null) {
            if (serviceName == null || portName == null) {
                throw new IllegalStateException(ProviderApiMessages.NULL_ADDRESS_SERVICE_ENDPOINT());
            } else {
                //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();
View Full Code Here

    protected ServletAdapter(String name, String urlPattern, WSEndpoint endpoint, ServletAdapterList owner) {
        super(endpoint, owner, urlPattern);
        this.name = name;
        // registers itself with the container
        Module module = endpoint.getContainer().getSPI(Module.class);
        if(module==null)
            LOGGER.warning("Container "+endpoint.getContainer()+" doesn't support "+Module.class);
        else {
            module.getBoundEndpoints().add(this);
        }

    }
View Full Code Here

        if (address == null) {
            if (serviceName == null || portName == null) {
                throw new IllegalStateException(ProviderApiMessages.NULL_ADDRESS_SERVICE_ENDPOINT());
            } else {
                //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();
View Full Code Here

    protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) {
        super(endpoint, owner, urlPattern);
        this.name = name;
        // registers itself with the container
        Module module = endpoint.getContainer().getSPI(Module.class);
        if(module==null)
            LOGGER.warning("Container "+endpoint.getContainer()+" doesn't support "+Module.class);
        else {
            module.getBoundEndpoints().add(this);
        }
    }
View Full Code Here

        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());
View Full Code Here

        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());
View Full Code Here

    protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) {
        super(endpoint, owner, urlPattern);
        this.name = name;
        // registers itself with the container
        Module module = endpoint.getContainer().getSPI(Module.class);
        if(module==null)
            LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}",
                    new Object[]{endpoint.getContainer(), Module.class});
        else {
            module.getBoundEndpoints().add(this);
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
  protected ServletAdapter(String name, String urlPattern, WSEndpoint endpoint, ServletAdapterList owner) {
        super(endpoint, owner, urlPattern);
        this.name = name;
        // registers itself with the container
        Module module = endpoint.getContainer().getSPI(Module.class);
        if (module == null) {
            LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}", new Object[]{endpoint.getContainer(), Module.class});
        } else {
            module.getBoundEndpoints().add(this);
        }

        boolean sticky = false;
        if (HighAvailabilityProvider.INSTANCE.isHaEnvironmentConfigured()) {
            WebServiceFeature[] features = endpoint.getBinding().getFeatures().toArray();
View Full Code Here

TOP

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

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.