Package org.apache.axis2.jaxws.description

Examples of org.apache.axis2.jaxws.description.EndpointDescription


   
    /*
     * Gets the right handlers for the port/service/bindings and performs injection.
     */
    protected void configureHandlers() throws Exception {
        EndpointDescription desc = AxisServiceGenerator.getEndpointDescription(this.service);
        if (desc == null) {
            this.binding = new BindingImpl("");
        } else {
            String xml = this.portInfo.getHandlersAsXML();
            HandlerChainsType handlerChains = null;
            if (xml != null) {
                ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
                handlerChains = DescriptionUtils.loadHandlerChains(in);
                desc.setHandlerChain(handlerChains);
            }
           
            if (LOG.isDebugEnabled()) {
                logHandlers(desc.getHandlerChain());
            }
           
            this.binding = BindingUtils.createBinding(desc);
           
            DescriptionUtils.registerHandlerHeaders(desc.getAxisService(), this.binding.getHandlerChain());           
        }
    }
View Full Code Here


        return endpointDescription;
    }

    private Class getEndpointSEI(QName portQName) {
        Class endpointSEI = null;
        EndpointDescription endpointDesc = getEndpointDescription(portQName);
        if (endpointDesc != null) {
            EndpointInterfaceDescription endpointInterfaceDesc =
                endpointDesc.getEndpointInterfaceDescription();
            if (endpointInterfaceDesc != null ) {
                endpointSEI = endpointInterfaceDesc.getSEIClass();
            }
        }
        return endpointSEI;
View Full Code Here

    /* (non-Javadoc)
    * @see org.apache.axis2.jaxws.description.ServiceDescription#getEndpointDescription(javax.xml.namespace.QName)
    */
    public EndpointDescription getEndpointDescription(QName portQName) {
        EndpointDescription returnDesc = null;
        if (!DescriptionUtils.isEmpty(portQName)) {
            returnDesc = endpointDescriptions.get(portQName);
        }
        return returnDesc;
    }
View Full Code Here

    * @see org.apache.axis2.jaxws.description.ServiceDescription#getServiceClient(javax.xml.namespace.QName)
    */
    public ServiceClient getServiceClient(QName portQName) {
        ServiceClient returnServiceClient = null;
        if (!DescriptionUtils.isEmpty(portQName)) {
            EndpointDescription endpointDesc = getEndpointDescription(portQName);
            if (endpointDesc != null) {
                returnServiceClient = endpointDesc.getServiceClient();
            }
            else {
                // Couldn't find Endpoint Description for port QName
                if (log.isDebugEnabled()) {
                    log.debug("Could not find portQName: " + portQName
View Full Code Here

     *      Class, QName, org.apache.axis2.jaxws.description.DescriptionFactory.UpdateType)
     */
    public static EndpointDescription updateEndpoint(
            ServiceDescription serviceDescription, Class sei, QName portQName,
            DescriptionFactory.UpdateType updateType) {
        EndpointDescription endpointDesc = null;
        synchronized(serviceDescription) {
                endpointDesc =
                ((ServiceDescriptionImpl)serviceDescription)
                        .updateEndpointDescription(sei, portQName, updateType);
        }
View Full Code Here

   
    /*
     * Gets the right handlers for the port/service/bindings and performs injection.
     */
    protected void configureHandlers() throws Exception {
        EndpointDescription desc = AxisServiceGenerator.getEndpointDescription(this.service);
        if (desc == null) {
            this.binding = new BindingImpl("");
        } else {
            String xml = this.portInfo.getHandlersAsXML();
            HandlerChainsType handlerChains = null;
            if (xml != null) {
                ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
                handlerChains = DescriptionUtils.loadHandlerChains(in);
                desc.setHandlerChain(handlerChains);
            }
           
            if (LOG.isDebugEnabled()) {
                logHandlers(desc.getHandlerChain());
            }
           
            this.binding = BindingUtils.createBinding(desc);
           
            DescriptionUtils.registerHandlerHeaders(desc.getAxisService(), this.binding.getHandlerChain());           
        }
    }
View Full Code Here

                      + portName + "," + bindingId + "," + endpointAddress + ")");
        }
      if(endpointAddress!=null && endpointAddress.trim().length()==0){
        ExceptionFactory.makeWebServiceException(Messages.getMessage("addPortErr1", (portName!=null)?portName.getLocalPart():"", endpointAddress));
      }
        EndpointDescription endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, null, portName,
                                                  DescriptionFactory.UpdateType.ADD_PORT, this, bindingId, endpointAddress);
        // TODO: Need to set endpointAddress and set or check bindingId on the EndpointDesc
        endpointDesc.setEndpointAddress(endpointAddress);
        endpointDesc.setClientBindingID(bindingId);
    }
View Full Code Here

            throw ExceptionFactory.
               makeWebServiceException(Messages.getMessage("invalidEndpointReference",
                                                           e.toString()));
        }
       
        EndpointDescription endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, null, axis2EPR,
                                                  addressingNamespace,
                                                  DescriptionFactory.UpdateType.CREATE_DISPATCH,
                                                  this);
        if (endpointDesc == null) {
            throw ExceptionFactory.makeWebServiceException(
                   Messages.getMessage("endpointDescriptionConstructionFailure",
                    jaxwsEPR.toString()));
        }

        XMLDispatch<T> dispatch = new XMLDispatch<T>(this, endpointDesc, axis2EPR, addressingNamespace, features);

        if (mode != null) {
            dispatch.setMode(mode);
        } else {
            dispatch.setMode(Service.Mode.PAYLOAD);
        }

        if (serviceClient == null)
            serviceClient = getServiceClient(endpointDesc.getPortQName());
       
        if(type == OMElement.class) {
            if (log.isDebugEnabled()) {
                log.debug("This a Dispatch<OMElement>. The custom builder is installed.");
            }
View Full Code Here

            throw ExceptionFactory.
                makeWebServiceException(Messages.getMessage("invalidEndpointReference",
                                                            e.toString()));
        }
       
        EndpointDescription endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, null, axis2EPR,
                                                  addressingNamespace,
                                                  DescriptionFactory.UpdateType.CREATE_DISPATCH,
                                                  this);
        if (endpointDesc == null) {
            throw ExceptionFactory.
              makeWebServiceException(Messages.getMessage("endpointDescriptionConstructionFailure",
                                      jaxwsEPR.toString()));
        }

        JAXBDispatch<Object> dispatch = new JAXBDispatch(this, endpointDesc, axis2EPR, addressingNamespace, features);

        if (mode != null) {
            dispatch.setMode(mode);
        } else {
            dispatch.setMode(Service.Mode.PAYLOAD);
        }

        if (serviceClient == null)
            serviceClient = getServiceClient(endpointDesc.getPortQName());

        dispatch.setJAXBContext(context);
        dispatch.setServiceClient(serviceClient);

        return dispatch;
View Full Code Here

        if (!isValidDispatchTypeWithMode(type, mode)) {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("dispatchInvalidTypeWithMode"));
        }

        EndpointDescription endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription,
                                  null,
                                                  portName,
                                                  DescriptionFactory.UpdateType.CREATE_DISPATCH,
                                                  this);
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.EndpointDescription

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.