Package org.apache.axis2.jaxws.description

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


        soapMessageContext.putAll(jaxwsMessageContext.getProperties());

        EndpointDescription description = jaxwsMessageContext.getEndpointDescription();
        if (description !=null) {
            // Set the WSDL properties
            ServiceDescription sd =
                    description.getServiceDescription();
            if (sd != null) {
                URL wsdlLocation = ((ServiceDescriptionWSDL)sd).getWSDLLocation();
                if (wsdlLocation != null && !"".equals(wsdlLocation)) {
                    URI wsdlLocationURI = null;
                    try {
                        wsdlLocationURI = wsdlLocation.toURI();
                    }
                    catch (URISyntaxException ex) {
                        // TODO: NLS/RAS
                        log.warn("Unable to convert WSDL location URL to URI.  URL: " +
                                wsdlLocation.toString() + "; Service: " + sd.getServiceQName(), ex);
                    }
                    soapMessageContext
                            .put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
                    soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION,
                                                Scope.APPLICATION);
                }
   
                soapMessageContext
                        .put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, sd.getServiceQName());
                soapMessageContext
                        .setScope(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, Scope.APPLICATION);
                if (log.isDebugEnabled()) {
                    log.debug("WSDL_SERVICE :" + sd.getServiceQName());
                }
            }
        }

        // If we are running within a servlet container, then JAX-WS requires that the
View Full Code Here


    public Handler createHandlerInstance(MessageContext mc, Class handlerClass) throws LifecycleException, ResourceInjectionException {
        if (handlerClass == null) {
            throw ExceptionFactory.makeWebServiceException("Handler class must be passed");
        }
       
        ServiceDescription serviceDesc = mc.getEndpointDescription().getServiceDescription();       
        ResourceInjectionServiceRuntimeDescription injectionDesc = null;
        if (serviceDesc != null) {
            injectionDesc = ResourceInjectionServiceRuntimeDescriptionFactory.get(serviceDesc, handlerClass);           
        }
       
View Full Code Here

    /**
     * @param op
     * @return true if JAXBContext constructed using CONTEXT PATH
     */
    private static boolean isContextPathConstruction(OperationDescription op) {
        ServiceDescription serviceDesc = op.getEndpointInterfaceDescription()
                .getEndpointDescription().getServiceDescription();
        MarshalServiceRuntimeDescription marshalDesc =
                MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
        // Get the JAXBContext...Since this is a cached object we incur no penalty by looking at this point.
        Holder<JAXBUtils.CONSTRUCTION_TYPE> holder = new Holder<JAXBUtils.CONSTRUCTION_TYPE>();
View Full Code Here

     * @param op
     * @return
     */
    protected static boolean isDocLitWrappedMinimal(OperationDescription op) {
        if (isDocLitWrapped(op)) {
            ServiceDescription serviceDesc = op.getEndpointInterfaceDescription()
                    .getEndpointDescription().getServiceDescription();
            MarshalServiceRuntimeDescription marshalDesc =
                    MarshalServiceRuntimeDescriptionFactory.get(serviceDesc);
            String requestWrapper = marshalDesc.getRequestWrapperClassName(op);
            if (!exists(requestWrapper)) {
View Full Code Here

*/
public class GenericOperationProviderTest extends TestCase {
   
    public void testGenericHTTPBindingOperation() {
        // The HTTP binding supports a generic operation for WSDL-less endpoints.
        ServiceDescription serviceDesc = DescriptionFactory.createServiceDescription(HTTPBindingProviderImpl.class);
        assertNotNull(serviceDesc);
        EndpointDescription endpointDesc = serviceDesc.getEndpointDescriptions_AsCollection().iterator().next();
        assertNotNull(endpointDesc);
        AxisService axisSvc = endpointDesc.getAxisService();
        assertNotNull(axisSvc);
       
        EndpointInterfaceDescription interfaceDesc = endpointDesc.getEndpointInterfaceDescription();
View Full Code Here

    }
   
    public void testGenericSOAPBindingOperation() {
        // REVIEW: Currently generic operations are not supported for SOAP Bindings
       
        ServiceDescription serviceDesc = DescriptionFactory.createServiceDescription(SOAPBindingProviderImpl.class);
        assertNotNull(serviceDesc);
        EndpointDescription endpointDesc = serviceDesc.getEndpointDescriptions_AsCollection().iterator().next();
        assertNotNull(endpointDesc);
        AxisService axisSvc = endpointDesc.getAxisService();
        assertNotNull(axisSvc);
       
        // Since there's no WSDL, there will be no operations and no EndpointInterfaceDescription
View Full Code Here

        EndpointInterfaceDescription interfaceDesc = endpointDesc.getEndpointInterfaceDescription();
        assertNull(interfaceDesc);
    }
   
    public void testSEIBasedEndpoint() {
        ServiceDescription serviceDesc = DescriptionFactory.createServiceDescription(SEIBasedEndpoint.class);
        assertNotNull(serviceDesc);
        EndpointDescription endpointDesc = serviceDesc.getEndpointDescriptions_AsCollection().iterator().next();
        assertNotNull(endpointDesc);
        AxisService axisSvc = endpointDesc.getAxisService();
        assertNotNull(axisSvc);
       
        EndpointInterfaceDescription interfaceDesc = endpointDesc.getEndpointInterfaceDescription();
View Full Code Here

    private static final QName serviceQName = new QName(namespaceURI, localPart);

    public void testNullWSDL() {

        QName uniqueQName = new QName(namespaceURI, localPart + "_testNullWSDL");
        ServiceDescription serviceDescription =
                new ServiceDescriptionImpl(null, uniqueQName, javax.xml.ws.Service.class);
        assertNotNull("Service description not created with null WSDL", serviceDescription);
    }
View Full Code Here

    }

    public void testNullServiceName() {

        try {
            ServiceDescription serviceDescription =
                    new ServiceDescriptionImpl(null, null, javax.xml.ws.Service.class);
            fail("Exception for null Service Name not thrown.");
        }
        catch (WebServiceException e) {
            // Expected path
View Full Code Here

        }
    }

    public void testInvalidServiceClass() {
        try {
            ServiceDescription serviceDescription =
                    new ServiceDescriptionImpl(null, serviceQName, Object.class);
            fail("Exception for invalid Service class not thrown.");
        }
        catch (WebServiceException e) {
            // Expected path
View Full Code Here

TOP

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

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.