Package xsul.wsif

Examples of xsul.wsif.WSIFMessage


                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
        // seconds

        WSIFPort port = wclient.getPort();
        WSIFOperation operation = port.createOperation("add");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        // Input
        XmlElement arrayElement = XmlConstants.BUILDER.newFragment("input");
        for (int i = 0; i < 5; i++) {
            XmlElement valueElement = arrayElement.addElement("value");
View Full Code Here


     * @param wsdlQName
     * @return The concrete WSDL
     * @throws ComponentRegistryException
     */
    public String getConcreteWsdl(String wsdlQName) throws ComponentRegistryException {
        WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } },
                "getConcreateWsdl");
        return (String) response.getObjectPart(DESC_AS_STRING);
    }
View Full Code Here

     * @param serviceName
     * @return The list of concreate WSDL QNames.
     * @throws ComponentRegistryException
     */
    public String[] findService(String serviceName) throws ComponentRegistryException {
        WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } },
                SEARCH_SERVICE_INSTANCE);
        return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {});
    }
View Full Code Here

     * @param serviceName
     * @return The list of abstract WSDL QNames.
     * @throws ComponentRegistryException
     */
    public String[] findServiceDesc(String serviceName) throws ComponentRegistryException {
        WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } },
                SEARCH_SERVIE);
        return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {});
    }
View Full Code Here

     * @param wsdlQName
     * @return The AWSDL.
     * @throws ComponentRegistryException
     */
    public String getAbstractWsdl(String wsdlQName) throws ComponentRegistryException {
        WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } },
                GET_ABSTRACT_WSDL);
        return (String) response.getObjectPart(DESC_AS_STRING);
    }
View Full Code Here

            throws ComponentRegistryException {

        WSIFPort port = wclient.getPort();

        WSIFOperation operation = port.createOperation(opName);
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();
        String messageName = operation.createInputMessage().getName();
        XmlElement inputMsgElem = builder.newFragment(this.requestNS, messageName);

        for (int i = 0; i < args.length; i++) {
            createMessage((String) args[i][0], args[i][1], inputMsgElem);
View Full Code Here

        // null selects the first port in the first service.

        WSIFPort port = client.getPort();
        WSIFOperation operation = port.createOperation("add");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        inputMessage.setObjectPart("x", "2");
        inputMessage.setObjectPart("y", "3");

        // not needed in XSUL 2.9+
View Full Code Here

                logger.info("name: " + name);
                Object value = output.getValue();
                logger.info("value: " + value);
            }
        } else {
            WSIFMessage fault = invoker.getFault();
            logger.info("fault: " + fault);
        }

        service.shutdownServer();
    }
View Full Code Here

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(definitions));
        WSIFClient client = WSIFRuntime.getDefault().newClientFor(service, null);
        WSIFPort port = client.getPort();
        WSIFOperation operation = port.createOperation(operationName);
        WSIFMessage inputMessage = operation.createInputMessage();

        for (String key : inputMap.keySet()) {
            String value = inputMap.get(key);
            inputMessage.setObjectPart(key, value);
        }

        URI myWorkflowID = null;
        URI myServiceID = URI.create(XBayaConstants.APPLICATION_SHORT_NAME);
        String myNodeID = null;
        Integer myTimestep = null;
        InvocationEntity myEntity = notifier.createEntity(myWorkflowID, myServiceID, myNodeID, myTimestep);

        URI serviceWorkflowID = null;
        URI serviceServiceID = URI.create("ServiceID");
        String serviceNodeID = nodeID;
        Integer serviceTimestep = null;
        InvocationEntity serviceEntity = notifier.createEntity(serviceWorkflowID, serviceServiceID, serviceNodeID,
                serviceTimestep);
        WorkflowTrackingContext workflowContext = notifier.createTrackingContext(new Properties(), this.configuration
                .getBrokerURL().toASCIIString(), myWorkflowID, myServiceID, myNodeID, myTimestep);

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

        InvocationContext context = notifier.invokingService(workflowContext, 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(workflowContext, context, null, outputBodyObject);
View Full Code Here

     * @param wsdlQName
     * @return The concrete WSDL
     * @throws ComponentRegistryException
     */
    public String getConcreteWsdl(String wsdlQName) throws ComponentRegistryException {
        WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } },
                "getConcreateWsdl");
        return (String) response.getObjectPart(DESC_AS_STRING);
    }
View Full Code Here

TOP

Related Classes of xsul.wsif.WSIFMessage

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.