Package org.apache.ode.axis2

Examples of org.apache.ode.axis2.Properties


        _serviceName = serviceName;
        _portName = portName;
        _executorService = executorService;
        _axisConfig = axisConfig;
        _sched = sched;
        _converter = new SoapMessageConverter(_definition, serviceName, portName);
        _server = server;
        _pconf = pconf;

        // initial endpoint reference
        Element eprElmt = ODEService.genEPRfromWSDL(_definition, serviceName, portName);
View Full Code Here


        _pconf = pconf;
        _wsdlDef = pconf.getDefinitionForService(serviceName);
        _serviceName = serviceName;
        _portName = portName;
        _serviceRef = EndpointFactory.convertToWSA(createServiceRef(genEPRfromWSDL(_wsdlDef, serviceName, portName)));
        _converter = new SoapMessageConverter(_wsdlDef, serviceName, portName);

    }
View Full Code Here

        portTypeHW = wsdlHW.getPortType(new QName(wsdlHW.getTargetNamespace(), "HelloPortType"));
        opHello = portTypeHW.getOperation("hello", null, null);
    }

    public void setUp() throws Exception {
        portmapper = new SoapMessageConverter(wsdl1, repoService, portName);
    }
View Full Code Here

    }

    public void testBadPortName() {
        try {
            new SoapMessageConverter(wsdl1, repoService, "badPort");
            fail("Should have thrown axis error.");
        } catch (AxisFault af) {
            ;// expected
        }
    }
View Full Code Here

        }
    }

    public void testBadServiceName() {
        try {
            new SoapMessageConverter(wsdl1, new QName(wsdl1tns, "foobar"), portName);
            fail("Should have thrown axis error.");
        } catch (AxisFault af) {
            ;// expected
        }
    }
View Full Code Here

        assertNotNull(hdrBdyElmt);
    }

    /** Make sure hello world request parses correctly. */
    public void testHelloWorldRequest() throws Exception {
        SoapMessageConverter portmaper1 = new SoapMessageConverter(wsdlHW, new QName(wsdlHW
                .getTargetNamespace(), "HelloService"), "HelloPort");

        XMLStreamReader sr = XMLInputFactory.newInstance().createXMLStreamReader(
                getClass().getResourceAsStream("/HelloWorldRequest.soap"));
        StAXSOAPModelBuilder builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(new SOAP11Factory(), sr);
        SOAPEnvelope se = builder.getSOAPEnvelope();

        Element msg = DOMUtils.stringToDOM("<message/>");
        MessageImpl odeMsg = new MessageImpl(new MessageDAOImpl(null));
        odeMsg.setMessage(msg);
        portmaper1.parseSoapRequest(odeMsg, se, opHello);
        System.out.println(DOMUtils.domToString(msg));
    }
View Full Code Here

        if (useUrlReplacement) {
            // insert part values in the url
            completeUri = new UrlReplacementTransformer().transform(completeUri, partValues);
        } else if (useUrlEncoded) {
            // encode part values
            encodedParams = new URLEncodedTransformer().transform(partValues);
        }

        // http-client api is not really neat
        // something similar to the following would save some if/else manipulations.
        // But we have to deal with it as-is.
View Full Code Here

            completeUri = completeUri + (completeUri.endsWith("/") || relativeUri.startsWith("/") ? "" : "/") + relativeUri;
        }

        if (useUrlReplacement) {
            // insert part values in the url
            completeUri = new UrlReplacementTransformer().transform(completeUri, partValues);
        } else if (useUrlEncoded) {
            // encode part values
            encodedParams = new URLEncodedTransformer().transform(partValues);
        }
View Full Code Here

  }

 
  public static String loadWithNewPattern(S3 s3,RefInteger storage, String path) {
    PageContext pc = ThreadLocalPageContext.get();
    Properties prop=null;
    if(pc!=null){
      prop=pc.getApplicationContext().getS3();
    }
    if(prop==null) prop=new PropertiesImpl();
   
    int defaultLocation = prop.getDefaultLocation();
    storage.setValue(defaultLocation);
    String accessKeyId = prop.getAccessKeyId();
    String secretAccessKey = prop.getSecretAccessKey();
   
    int atIndex=path.indexOf('@');
    int slashIndex=path.indexOf('/');
    if(slashIndex==-1){
      slashIndex=path.length();
      path+="/";
    }
    int index;
   
    // key/id
    if(atIndex!=-1) {
      index=path.indexOf(':');
      if(index!=-1 && index<atIndex) {
        accessKeyId=path.substring(0,index);
        secretAccessKey=path.substring(index+1,atIndex);
        index=secretAccessKey.indexOf(':');
        if(index!=-1) {
          String strStorage=secretAccessKey.substring(index+1).trim().toLowerCase();
          secretAccessKey=secretAccessKey.substring(0,index);
          //print.out("storage:"+strStorage);
          storage.setValue(S3.toIntStorage(strStorage, defaultLocation));
        }
      }
      else accessKeyId=path.substring(0,atIndex);
    }
    path=prettifyPath(path.substring(atIndex+1));
    index=path.indexOf('/');
    s3.setHost(prop.getHost());
    if(index==-1){
      if(path.equalsIgnoreCase(S3Constants.HOST) || path.equalsIgnoreCase(prop.getHost())){
        s3.setHost(path);
        path="/";
      }
    }
    else {
      String host=path.substring(0,index);
      if(host.equalsIgnoreCase(S3Constants.HOST) || host.equalsIgnoreCase(prop.getHost())){
        s3.setHost(host);
        path=path.substring(index);
      }
    }
   
View Full Code Here

    if(ac.isORMEnabled()){
      ORMConfiguration conf = ac.getORMConfiguration();
      if(conf!=null)sct.setEL(KeyConstants._orm, conf.toStruct());
    }
    // s3
    Properties props = ac.getS3();
    if(props!=null) {
      sct.setEL(KeyConstants._s3, props.toStruct());
    }
   
    // datasources
    DataSource[] sources = ac.getDataSources();
    if(!ArrayUtil.isEmpty(sources)){
View Full Code Here

TOP

Related Classes of org.apache.ode.axis2.Properties

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.