Examples of EndpointDescription


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

            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

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

        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

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

            requestReceived(eic);
           
            MessageContext request = eic.getRequestMessageContext();
           
            Class serviceEndpoint = getServiceImplementation(request);
            EndpointDescription endpointDesc = getEndpointDescription(request);
            request.setEndpointDescription(endpointDesc);
          
            //  TODO: review: make sure the handlers are set on the InvocationContext
            //  This implementation of the JAXWS runtime does not use Endpoint, which
            //  would normally be the place to initialize and store the handler list.
            //  In lieu of that, we will have to intialize and store them on the
            //  InvocationContext.  also see the InvocationContextFactory.  On the client
            //  side, the binding is not yet set when we call into that factory, so the
            //  handler list doesn't get set on the InvocationContext object there.  Thus
            //  we gotta do it here.
            // 
            //  Since we're on the server, and there apparently is no Binding object
            //  anywhere to be found...
            List<String> handlerRoles = null;
            if (eic.getHandlers() == null) {
                if (log.isDebugEnabled()) {
                    log.debug("No handlers found on the InvocationContext, initializing handler list.");
                }
                HandlerResolverImpl hri = new HandlerResolverImpl(endpointDesc.getServiceDescription());
                PortInfo portInfo = endpointDesc.getPortInfo();
                eic.setHandlers(hri.getHandlerChain(portInfo));
                handlerRoles = hri.getRoles(portInfo);
            }
           
            //  Get the service instance.  This will run the @PostConstruct code.
            ServiceInstanceFactory instanceFactory = (ServiceInstanceFactory)
                FactoryRegistry.getFactory(ServiceInstanceFactory.class);
            Object serviceInstance = instanceFactory.createServiceInstance(request, serviceEndpoint);
           
            // The application handlers and dispatcher invoke will
            // modify/destroy parts of the message.  Make sure to save
            // the request message if appropriate.
            saveRequestMessage(request);
           
            boolean success = true;
           
            // Perform inbound header/handler processing only if there is are headers OR handlers
            if ( (request.getAxisMessageContext() != null &&
                 request.getAxisMessageContext().getEnvelope().getHeader() != null) ||
                 (eic.getHandlers() != null && !eic.getHandlers().isEmpty())) {
                success = inboundHeaderAndHandlerProcessing(request, eic, handlerRoles);
            }
           
            if (success) {
                if (log.isDebugEnabled()) {
                    log.debug("JAX-WS inbound handler chain invocation complete.");
                }
                // Set the dispatcher.
                EndpointDispatcher dispatcher = getEndpointDispatcher(request, serviceEndpoint, serviceInstance);
                Boolean ignoreSOAPVersion = false;
                if(log.isDebugEnabled()){
                  log.debug("Checking for ProviderDispatcher instance");
                }
                if(dispatcher instanceof ProviderDispatcher){
                  if(log.isDebugEnabled()){
                    log.debug("ProviderDispatcher instance Found");
                  }
                  String bindingType = endpointDesc.getBindingType();
                  if(bindingType.equals(org.apache.axis2.jaxws.Constants.SOAP_HTTP_BINDING)){
                    ignoreSOAPVersion = true;
                  }  
                  if(log.isDebugEnabled()){
                    log.debug("ignoreSOAPVersion Value ="+ignoreSOAPVersion.booleanValue());
View Full Code Here

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

        if (portName == null) {
            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("createDispatchFail0"));
        }

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

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

                    Messages.getMessage("getPortInvalidSEI", portName.toString(), "null"));
        }

        DescriptionBuilderComposite sparseComposite = getPortMetadata();
        resetPortMetadata();
        EndpointDescription endpointDesc = null;
        if (sparseComposite != null) {
            endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, sei, portName,
                                                  DescriptionFactory.UpdateType.GET_PORT,
                                                  sparseComposite, this);
View Full Code Here

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

   
    public <T> T getPort(org.apache.axis2.addressing.EndpointReference axis2EPR, String addressingNamespace, Class<T> sei, WebServiceFeature... features) {
        verifyServiceDescriptionActive();
        DescriptionBuilderComposite sparseComposite = getPortMetadata();
        resetPortMetadata();
        EndpointDescription endpointDesc = null;
       
        if (sparseComposite != null) {
            endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, sei, axis2EPR,
                                                  addressingNamespace,
View Full Code Here

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

        MessageContext response = eic.getResponseMessageContext();
       
        try {
            if (response != null) {
              //Before running inbound handlers lets make sure that the request and response have no protocol mismatch.
              EndpointDescription endpointDesc =request.getEndpointDescription();
              String bindingType = endpointDesc.getBindingType();
              if(bindingType.equals(org.apache.axis2.jaxws.Constants.SOAP_HTTP_BINDING)){
                if(log.isDebugEnabled()){
                  log.debug("Check for protocol mismatch");
                }
                MessageContext faultContext = isProtocolMismatch(request, response);
View Full Code Here

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

          // If we've made it here, its very likely that although the AxisService was deployed, the
          // associated ServiceDescription was not created successfully
            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescErr1"));
        }
       
        EndpointDescription ed = (EndpointDescription) param.getValue();
        return ed;
    }
View Full Code Here

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

                request.setProperty(org.apache.axis2.Constants.Configuration.MTOM_THRESHOLD,
                        new Integer(threshold));
            }
            if (((org.apache.axis2.jaxws.binding.SOAPBinding)bnd).isRespectBindingEnabled()) {
                //lets invoke Utility to configure RespectBinding.
                EndpointDescription endpointDescription = getEndpointDescription();
                endpointDescription.setRespectBinding(true);
                WSDLExtensionUtils.processExtensions(endpointDescription);
                //We have build up set of extensions from wsdl
                //let go ahead and validate these extensions now.
                EndpointDescriptionValidator endpointValidator = new EndpointDescriptionValidator(endpointDescription);
                
View Full Code Here

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

        Iterator<AxisService> iterator = serviceGroup.getServices();

        while (iterator.hasNext()) {
            AxisService axisService = iterator.next();
            Parameter param = axisService.getParameter(EndpointDescription.AXIS_SERVICE_PARAMETER);
            EndpointDescription ed = (EndpointDescription) param.getValue();
            QName serviceName = ed.getServiceQName();
            QName portName = ed.getPortQName();
            EndpointKey key = new EndpointKey(serviceName, portName);

            map.put(key, axisService);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.