Examples of WsdlDefinitions


Examples of xsul5.wsdl.WsdlDefinitions

     */
    public void estWithUserCredential() throws ComponentException, IOException,
            GeneralSecurityException {
        boolean userCred = true;
        GSSCredential proxy = null;
        WsdlDefinitions wsdl = null; // Set WSDL of the workflow.
        LeadContextHeader leadContext = null; // Set the LEAD Context.
        URI messageBoxURL = null; // This one can be null;

        String trustedcerts = System.getProperty("trustedcerts");
        String certskey = System.getProperty("certskey");
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

  }

  public static void main(String[] args) throws WsdlException,
      URISyntaxException {
    WsdlDefinitions streamEngine = WsdlResolver
        .getInstance()
        .loadWsdl(
            new URI(
                "http://pagodatree.cs.indiana.edu:9999/axis2/services/StreamEngine?wsdl"));
    WSDLCleaner.cleanWSDL(streamEngine);
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

  // System.out.println("Didnt receive the responce from CEPService yet");
  // }
  // }
  private void registerQuery(List<WSComponentPort> inputs, String workflowname)
      throws URISyntaxException {
    WsdlDefinitions streamEngine = WsdlResolver
        .getInstance()
        .loadWsdl(
            new URI(
                "http://pagodatree.cs.indiana.edu:9999/axis2/services/StreamEngine?wsdl"));
    WSDLCleaner.cleanWSDL(streamEngine);
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

   */
  public static WsdlDefinitions stringToWSDL(String wsdlString)
      throws ComponentException {
    try {
      XmlElement wsdlElement = XMLUtil.stringToXmlElement(wsdlString);
      WsdlDefinitions definitions = new WsdlDefinitions(wsdlElement);
      return definitions;
    } catch (RuntimeException e) {
      throw new ComponentException(e);
    }
  }
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

      // leadContext)).useAsyncMessaging(correlator)
      // .setAsyncResponseTimeoutInMs(33000L); // to simplify testing

      //FIXME Chathura
      //This was done to mitigate the issue in the duel network cards.
      WsdlDefinitions proxyWSDL = xsul5.wsdl.WsdlResolver.getInstance().loadWsdl(engineURL);
     
     
//      WsdlService proxyService = WSDLUtil.getfirst(proxyWSDL.services());
//      WsdlPort proxyPort = WSDLUtil.getfirst(proxyService.ports());
//      org.xmlpull.infoset.XmlElement address = proxyPort.xml().element("address");
//      XmlAttribute location = address.attribute("location");
//      address.removeAttribute(location);
//      address.setAttributeValue("location", engineURL.toString().substring(0, engineURL.toString().indexOf("?wsdl")));
     
//      WSIFService service = WSIFServiceFactory.newInstance().getService(
//          WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(proxyWSDL) );
//            WSIFPort port = service.getPort();
//            WSIFClient wclient = WSIFRuntime.getDefault().newClientFor(port);
           
      WSIFClient wclient = WSIFRuntime.newClient(engineURL.toString())
          .addHandler(
              new StickySoapHeaderHandler("use-lead-header",
                  leadContext)).useAsyncMessaging(correlator)
          .setAsyncResponseTimeoutInMs(33000L); // to simplify testing
      // set to just few
      // seconds

      WSIFPort port = wclient.getPort();
      WSIFOperation operation = port.createOperation("deploy");

      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();
      XmlElement inputMessageElement = xmlObjectToEl(getDeploymentPayload(
          workflow, this.xbayaEngine.getConfiguration().getDSCURL()));
      WSIFMessage inputMessage = new WSIFMessageElement(
          inputMessageElement);

      System.out.println("Sending a message:\n"
          + XMLUtil.xmlElementToString((XmlElement) inputMessage));
      boolean success = operation.executeRequestResponseOperation(
          inputMessage, outputMessage, faultMessage);

      XmlElement result;
      if (success) {
        result = (XmlElement) outputMessage;
      } else {
        throw new XsulException(faultMessage.toString());

      }

    } catch (IOException e) {
      throw new WorkflowProxyException(e);

    } catch (XmlBuilderException e) {
      throw new WorkflowProxyException(e);
    } catch (GraphException e) {
      throw new WorkflowProxyException(e);
    } catch (ComponentException e) {
      throw new WorkflowProxyException(e);
    }
    XBayaConfiguration configuration = this.xbayaEngine.getConfiguration();
    WsdlDefinitions workflowWSDL;
    try {
      workflowWSDL = workflow.getOdeWorkflowWSDL(configuration
          .getDSCURL(), configuration.getODEURL());
    } catch (Exception e) {
      // shouldnt happen cos we have already called this once
      throw new XBayaRuntimeException(e);
    }
    org.xmlpull.infoset.XmlElement service = workflowWSDL.xml().element(
        null, "service");
    org.xmlpull.infoset.XmlElement port = service.element(null, "port");
    org.xmlpull.infoset.XmlElement address = port.element(null, "address");
    String location = address.attributeValue("location");
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

  /**
   * @param definitions
   * @return The cloned WsdlDefinitions
   */
  public static WsdlDefinitions deepClone(WsdlDefinitions definitions) {
    return new WsdlDefinitions(XMLUtil.deepClone(definitions.xml()));
  }
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

      gpelProcess = workflow.getOdeProcess(dscURI, configuration
          .getODEURL());
      processString = gpelProcess.xmlStringPretty();

      BufferedImage image = workflow.getImage();
      WsdlDefinitions workflowWSDL = workflow.getOdeWorkflowWSDL(dscURI,
          configuration.getODEURL());

      // do some error checking here
      if (workflowName == null || "".equals(workflowName)) {
        throw new IllegalStateException("No workflow name given");
      }

      DeploymentInformationDocument document = DeploymentInformationDocument.Factory
          .newInstance();
      DeploymentInformationDocument.DeploymentInformation deploymentInformation = DeploymentInformationDocument.DeploymentInformation.Factory
          .newInstance();
      DeploymentDocumentsType documentsType = DeploymentDocumentsType.Factory
          .newInstance();

      // setting the process name
      deploymentInformation.setProcessName(StringUtil
          .convertToJavaIdentifier(workflowName));

      // setting workflow template id
      if (templateId != null) {
        deploymentInformation.setTemplateId(templateId.toString());
      }

      // setting process GPEL

      XmlObject gpelProcessXmlObject = XBeansUtil
          .xmlElementToXmlObject(processString);
      documentsType.setBPEL(gpelProcessXmlObject);

      // setting deployment descriptors
      documentsType.setDeploymentDescriptor(XmlObject.Factory
          .parse(XmlConstants.BUILDER
              .serializeToStringPretty(workflow
                  .getODEDeploymentDescriptor(dscURI,
                      configuration.getODEURL()))));

      XMLFile processWSDL = XMLFile.Factory.newInstance();
      processWSDL.setFileName(workflowWSDL.xml().attributeValue("name")
          + ".wsdl");
      processWSDL.setContent(XBeansUtil
          .xmlElementToXmlObject(workflowWSDL.xmlStringPretty()));
      documentsType.setProcessWSDL(processWSDL);

      XMLFile serviceWSDL;
      Map<String, WsdlDefinitions> wsdlMap = workflow.getOdeServiceWSDLs(
          dscURI, configuration.getODEURL());
      XMLFile[] serviceWSDLs = new XMLFile[wsdlMap.size() + 3];
      int index = 0;
      for (String id : wsdlMap.keySet()) {
        WsdlDefinitions wsdl = wsdlMap.get(id);
        serviceWSDL = XMLFile.Factory.newInstance();
        serviceWSDL.setFileName(wsdl.xml().attributeValue("name")
            + ".wsdl");
        serviceWSDL.setContent(XBeansUtil.xmlElementToXmlObject(wsdl
            .xmlStringPretty()));
        serviceWSDLs[index++] = serviceWSDL;
      }
     
      //add the xsds
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

   * @throws WsdlException
   */
  public static void main(String[] args) throws WsdlException, URISyntaxException {

    StreamClient streamTestClient = new StreamClient();
    WsdlDefinitions wsdl = WsdlResolver.getInstance().loadWsdl(new URI("http://pagodatree.cs.indiana.edu:17080/ode/processes/Control_Stream_Echo?wsdl"));
    streamTestClient.invoke("Run", wsdl, "Control_Stream_Echo", "9e15d8ae-0f36-4c2e-ae8a-930557cdcdd2");
  }
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

        result = (XmlElement) faultMessage;
      }
      System.out.println("Received message:\n"
          + XMLUtil.xmlElementToString(result));

      wsdlDefinitions = new WsdlDefinitions(XMLUtil
          .xmlElementToString(result));

      // this is tricky here. This method requires us to return a
      // GcInstance and will call
      // start method with GcInstance as the argument to get
View Full Code Here

Examples of xsul5.wsdl.WsdlDefinitions

            }
           
            //now go through the WSDLS and find the one with the proper port type
            Set<String> keys = wsdls.keySet();
            for (String key : keys) {
              WsdlDefinitions wsdl = wsdls.get(key);
              WsdlPortType portType = wsdl.getPortType(portTypeQname.getLocalPart());
              if(null != portType && portType.getQName().equals(portTypeQname)){
                // this is the right porttype so extract the service and you will be done
                Iterator<WsdlService> svcIterator = wsdl.services().iterator();
                String nsPrefix = null;
                if(svcIterator.hasNext()){
                  WsdlService plService = svcIterator.next();
                  if(null == newNamespaceMap.get(wsdl.getTargetNamespace())){
                    nsPrefix = "p"+newNamespaceMap.size();
                    newNamespaceMap.put(wsdl.getTargetNamespace(), nsPrefix);
                  }else{
                    nsPrefix = newNamespaceMap.get(wsdl.getTargetNamespace());
                  }
                 
                  String portName = null;
                  Iterator<WsdlPort> portItr = plService.ports().iterator();
                  if(portItr.hasNext()){
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.