Package org.xmlpull.v1.builder

Examples of org.xmlpull.v1.builder.XmlElement


            }

            String wsdl = (String) outputMessage.getObjectPart(WSDL_PART);
            logger.finest("WSDL: " + wsdl);

            XmlElement definitionsElement = XMLUtil.stringToXmlElement3(wsdl);

            this.serviceDefinitions = new WsdlDefinitions(definitionsElement);
            return this.serviceDefinitions;
        } catch (RuntimeException e) {
            String message = "Failed to create a service";
View Full Code Here


      }

      String wsdl = (String) outputMessage.getObjectPart(WSDL_PART);
      logger.finest("WSDL: " + wsdl);

      XmlElement definitionsElement = XMLUtil.stringToXmlElement3(wsdl);

      this.serviceDefinitions = new WsdlDefinitions(definitionsElement);
      return this.serviceDefinitions;
    } catch (RuntimeException e) {
      String message = "Failed to create a service";
View Full Code Here

        Integer serviceTimestep = null;
        InvocationEntity serviceEntity = notifier.createEntity(
                serviceWorkflowID, serviceServiceID, serviceNodeID,
                serviceTimestep);

        XmlElement inputBody = (XmlElement) ((XmlElement) inputMessage)
                .getParent();
        XmlObject inputBodyObject = XBeansUtil.xmlElementToXmlObject(inputBody);

        InvocationContext context = notifier.invokingService(myEntity,
                serviceEntity, null, inputBodyObject);

        if (outputMap != null) {
            WSIFMessage outputMessage = operation.createOutputMessage();
            Soap11Util.getInstance()
                    .wrapBodyContent((XmlElement) outputMessage);
            for (String key : outputMap.keySet()) {
                String value = outputMap.get(key);
                outputMessage.setObjectPart(key, value);
            }
            XmlElement outputBody = (XmlElement) ((XmlElement) outputMessage)
                    .getParent();
            XmlObject outputBodyObject = XBeansUtil
                    .xmlElementToXmlObject(outputBody);

            notifier.receivedResult(context, null, outputBodyObject);
View Full Code Here

         *      org.apache.xmlbeans.XmlObject)
         */
        public void deliverMessage(String topic, NotificationType type,
                XmlObject message) {

            XmlElement event = XBeansUtil.xmlObjectToXmlElement(message);
            this.eventData.addEvent(XMLUtil.xmlElement3ToXmlElement5(event));
        }
View Full Code Here

        if (LEADTypes.isArrayType(type)) {
          // split string into items using " " as separator
          Pattern pattern = Pattern.compile("[,\\s]+");
          // String[] result = p.split("one,two, three four , five");
          String[] result = pattern.split((String) value);
          XmlElement arrayEl = XmlConstants.BUILDER.newFragment(name);
          for (int i = 0; i < result.length; i++) {
            logger.finest("split=" + result[i]);
            arrayEl.addElement("value").addChild(result[i]);
          }
          this.inputMessage.setObjectPart(name, arrayEl);
          value = null; // no need to set string value below
        }
View Full Code Here

        }
        InvocationEntity serviceEntity = this.notifier.createEntity(
                serviceWorkflowID, serviceServiceID, serviceNodeID,
                serviceTimestep);

        XmlElement soapHeader = soapEnvelope.element(null,
                XmlConstants.S_HEADER);
        XmlElement soapBody = soapEnvelope.element(null, XmlConstants.S_BODY);
        XmlObject headerObject = null;
        if (soapHeader != null) {
            headerObject = XBeansUtil.xmlElementToXmlObject(soapHeader);
        }
        XmlObject bodyObject = XBeansUtil.xmlElementToXmlObject(soapBody);
View Full Code Here

    public boolean processIncomingXml(XmlElement soapEnvelope,
            MessageContext context) throws DynamicInfosetInvokerException {
        logger.finest("soapEnvelope: "
                + XMLUtil.xmlElementToString(soapEnvelope));

        XmlElement soapHeader = soapEnvelope.element(null,
                XmlConstants.S_HEADER);
        XmlObject headerObject = null;
        if (soapHeader != null) {
            headerObject = XBeansUtil.xmlElementToXmlObject(soapHeader);
        }

        XmlElement soapBody = soapEnvelope.element(null, XmlConstants.S_BODY);
        XmlObject bodyObject = XBeansUtil.xmlElementToXmlObject(soapBody);
        XmlElement faultElement = soapBody.element(null, "Fault");
        if (faultElement == null) {
            this.notifier.receivedResult(this.invocationContext, headerObject,
                    bodyObject, RECEIVE_RESULT_MESSAGE);
        } else {
            this.notifier.receivedFault(this.invocationContext, headerObject,
View Full Code Here

      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());
View Full Code Here

      ProcessNameDocument processNameDocument = ProcessNameDocument.Factory
          .newInstance();
      // TODO : do we use template id or process name here?
      processNameDocument.setProcessName(workflow.getName());

      XmlElement inputMessageElement = xmlObjectToEl(processNameDocument);

      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 {
        result = (XmlElement) faultMessage;
      }
View Full Code Here

            WSDLGenerator wsdlGenerator = new WSDLGenerator();
            Hashtable serviceTable = wsdlGenerator.generateWSDL(null, serviceQname, null,
                    serviceMap, true);
            String wsdl = (String) serviceTable.get(WSDLConstants.AWSDL);

            XmlElement ele = XmlConstants.BUILDER.parseReader(new StringReader(wsdl))
                    .getDocumentElement();

            registryService.registerServiceMap(serviceMapAsStr, XmlConstants.BUILDER
                    .serializeToString(ele));
            return serviceQname;
View Full Code Here

TOP

Related Classes of org.xmlpull.v1.builder.XmlElement

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.