Examples of AxisService


Examples of org.apache.axis2.description.AxisService

    public ServiceClient getServiceClient() {
        try {
            if (serviceClient == null) {
                ConfigurationContext configCtx = getServiceDescription().getAxisConfigContext();
                AxisService axisSvc = getAxisService();
                AxisConfiguration axisCfg = configCtx.getAxisConfiguration();
                if (axisCfg.getService(axisSvc.getName()) != null) {
                    axisSvc.setName(axisSvc.getName() + this.hashCode());
                }
                serviceClient = new ServiceClient(configCtx, axisSvc);
            }
        } catch (AxisFault e) {
            throw ExceptionFactory.makeWebServiceException(
View Full Code Here

Examples of org.apache.axis2.description.AxisService

     * @return An AxisService instance
     */
    public static AxisService createAxisService(Class serviceImplClass) {
        ServiceDescription serviceDescription = createServiceDescription(serviceImplClass);
        EndpointDescription[] edArray = serviceDescription.getEndpointDescriptions();
        AxisService axisService = edArray[0].getAxisService();
        return axisService;
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisService

                this.secConvVersion = TrustUtil.getWSTVersion((String)msgCtx.getProperty(KEY_WSSC_VERSION));
            }
           
            // First obtain the axis service as we have to do a null check, there can be situations
            // where Axis Service is null
            AxisService axisService = msgCtx.getAxisService();           
                   
            if(axisService != null && axisService.getParameter(PARAM_CLIENT_SIDE) != null) {
                this.isInitiator = true;
            } else {
                this.isInitiator = !msgCtx.isServerSide();
                //TODO if Axis Service is null at this point, do we have to create a dummy one ??   
                if(this.isInitiator && axisService != null ) {
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        this.classLoader = classLoader;
        this.endpointClassName = endpointClassName;
        this.portInfo = portInfo;
        try {
            configurationContext = ConfigurationContextFactory.createDefaultConfigurationContext();
            AxisService service = AxisService.createService(endpointClassName, configurationContext.getAxisConfiguration(), RPCMessageReceiver.class);
            configurationContext.getAxisConfiguration().addService(service);
        } catch (AxisFault af) {
            throw new RuntimeException(af);
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        URI uri = request.getURI();
        String path = uri.getPath();
        String soapAction = request.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
       
        HashMap services = configurationContext.getAxisConfiguration().getServices();
        AxisService service = null;
        String serviceName = null;
       
        if(services.size() == 1){
          service = (AxisService)(services.values().iterator().next());
          serviceName = (String)(services.keySet().iterator().next());
        }else { // can't be happen
          log.error("Invalid service configurations ");
          throw new RuntimeException("Invalid Configuration");
        }


        // TODO: Port this section
//        // Adjust version and content chunking based on the config
//        boolean chunked = false;
//        TransportOutDescription transportOut = msgContext.getTransportOut();
//        if (transportOut != null) {
//            Parameter p = transportOut.getParameter(HTTPConstants.PROTOCOL_VERSION);
//            if (p != null) {
//                if (HTTPConstants.HEADER_PROTOCOL_10.equals(p.getValue())) {
//                    ver = HttpVersion.HTTP_1_0;
//                }
//            }
//            if (ver.greaterEquals(HttpVersion.HTTP_1_1)) {
//                p = transportOut.getParameter(HTTPConstants.HEADER_TRANSFER_ENCODING);
//                if (p != null) {
//                    if (HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED.equals(p.getValue())) {
//                        chunked = true;
//                    }
//                }
//            }
//        }
       

        if (request.getMethod() == Request.GET) {
            if (!path.startsWith(contextPath)) {
                response.setStatusCode(301);
                response.setHeader("Location", contextPath);
                return;
            }
            if (uri.toString().indexOf("?") < 0) {
                if (!path.endsWith(contextPath)) {
                    if (serviceName.indexOf("/") < 0) {
                        String res = HTTPTransportReceiver.printServiceHTML(serviceName, configurationContext);
                        PrintWriter pw = new PrintWriter(response.getOutputStream());
                        pw.write(res);
                        pw.flush();
                        return;
                    }
                }
            }
           
            if (uri.getQuery().startsWith("wsdl2")) {
                if (service != null) {
                    service.printWSDL2(response.getOutputStream(), uri.getHost(), servicePath);
                    return;
                }
            }
            if (uri.getQuery().startsWith("wsdl")) {
              if(service != null){
                service.printWSDL(response.getOutputStream(), uri.getHost(), servicePath);
                return;
              }
            }
            if (uri.getQuery().startsWith("xsd=")) {
                if (service != null) {
                    service.printSchema(response.getOutputStream());
                    return;
                }
            }
            //cater for named xsds - check for the xsd name
            if (uri.getQuery().startsWith("xsd")) {
                String schemaName = uri.getQuery().substring(uri.getQuery().lastIndexOf("=") + 1);

                if (service != null) {
                    //run the population logic just to be sure
                    service.populateSchemaMappings();
                    //write out the correct schema
                    Map schemaTable = service.getSchemaMappingTable();
                    final XmlSchema schema = (XmlSchema) schemaTable.get(schemaName);
                    //schema found - write it to the stream
                    if (schema != null) {
                        schema.write(response.getOutputStream());
                        return;
View Full Code Here

Examples of org.apache.axis2.description.AxisService

    String axis2_xml = "target" + File.separator + "test-classes" + File.separator + "server_mtom_axis2.xml";
    ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(
        repoPath, axis2_xml);

    AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
    AxisService axisService = axisConfiguration.getService("RMSampleService");
    AxisOperation operation = AxisOperationFactory.getAxisOperation(WSDLConstants.MEP_CONSTANT_IN_ONLY);
    operation.setMessageReceiver(new MTOMTestMessageReceiver());
    operation.setName(new QName(MTOMping));
    axisService.addOperation(operation);

    AxisOperation pingOperation = axisService.getOperation(new QName(PING_OPERATION_NAME));
    if (pingOperation == null)
      throw new AxisFault("Cant find the ping operation");

    // setting the operation specific phase chain
    operation.setRemainingPhasesInFlow(pingOperation.getRemainingPhasesInFlow());
View Full Code Here

Examples of org.apache.axis2.description.AxisService

    ServiceClient serviceClient = new ServiceClient (configContext,null);
   

    HashMap axisServices = configContext.getAxisConfiguration().getServices();
   
    AxisService service = null;
    Iterator values = axisServices.values().iterator();
    while(values.hasNext())
      service = (AxisService)values.next();

    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
View Full Code Here

Examples of org.apache.axis2.description.AxisService

   
    ServiceClient serviceClient = new ServiceClient (configContext,null);   

    HashMap axisServices = configContext.getAxisConfiguration().getServices();
   
    AxisService service = null;
    Iterator values = axisServices.values().iterator();
    while(values.hasNext())
      service = (AxisService)values.next();

    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
View Full Code Here

Examples of org.apache.axis2.description.AxisService

    ServiceClient serviceClient = new ServiceClient (configContext,null);
    serviceClient.setOptions(clientOptions);

    HashMap axisServices = serverConfigContext.getAxisConfiguration().getServices();
   
    AxisService service = null;
    Iterator values = axisServices.values().iterator();
    while(values.hasNext())
      service = (AxisService)values.next();

    // Set the Sequence timout property to 1 second.
    Iterator operations = service.getOperations();
   
    while (operations.hasNext())
    {
      AxisOperation op = (AxisOperation) operations.next();
      SandeshaPolicyBean propertyBean =
View Full Code Here

Examples of org.apache.axis2.description.AxisService

        // TODO: if <binding.ws> specifies the wsdl service then should create a
        // service for every port

        try {
            AxisService axisService = createAxisService();
            configContext.getAxisConfiguration().addService( axisService );
         
            String endpointURL = axisService.getEndpointURL();
            if ( endpointURL.startsWith( "http://"|| endpointURL.startsWith("/")) {
                Axis2ServiceServlet servlet = new Axis2ServiceServlet();
                servlet.init(configContext);
                String servletURI = wsBinding.getURI();
                configContext.setContextRoot(servletURI);
                servletHost.addServletMapping(servletURI, servlet);
            } else if ( axisService.getEndpointURL().startsWith( "jms" ) ) {
                logger.log(Level.INFO,"Axis2 JMS URL=" + axisService.getEndpointURL() );
               
                jmsListener = new JMSListener();
                jmsSender = new JMSSender();
                ListenerManager listenerManager = configContext.getListenerManager();
                TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS);
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.