Package com.ibm.wsdl

Examples of com.ibm.wsdl.MessageImpl


//    <wsdl:message name="listGroupsResponseMessage">
//    <wsdl:part name="part1" element="ns:listGroupsResponse" />
//</wsdl:message>
   
    public Message createMessage(String name){
        Message message =  new MessageImpl();
        message.setQName(new QName("http://extreme.indiana.edu/xregistry2/2007_02_21",name+"ResponseMessage","msgns"));
        Part part = new PartImpl();
        part.setElementName(new QName("http://extreme.indiana.edu/xregistry2/2007_02_21",name+"Response","ns"));
        message.addPart(part);
        return message;
    }
View Full Code Here


        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);
       
       
        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacConstants.SERVICE_REQ_MSG_SUFFIX+"_" +UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);
       
        operation.setInput(ip);
       
        if(outputparameter.size() > 0){
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacConstants.SERVICE_RESP_MSG_SUFFIX +"_" +UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(),outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
View Full Code Here

        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);

        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacSchemaConstants.SERVICE_REQ_MSG_SUFFIX + "_" + UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacSchemaConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);

        operation.setInput(ip);

        if (outputParameterTypes.length > 0) {
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacSchemaConstants.SERVICE_RESP_MSG_SUFFIX + "_"
                    + UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(), outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacSchemaConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
View Full Code Here

        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);

        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacSchemaConstants.SERVICE_REQ_MSG_SUFFIX + "_" + UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacSchemaConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);

        operation.setInput(ip);

        if (outputParameterTypes.length > 0) {
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacSchemaConstants.SERVICE_RESP_MSG_SUFFIX + "_"
                    + UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(), outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacSchemaConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
View Full Code Here

    private Message getMessage(HashMap mappings, Class returnType) {
        String mappingName = (String) mappings.get(returnType.getName());

        // First create message
        Message message = new MessageImpl();
        message.setQName(new QName(mappingName));

        // create the part of the message
        Part part = new PartImpl();
        part.setName("param");
        part.setElementName(new QName(mappingName));
        message.addPart(part);
        message.setUndefined(false);
        return message;
    }
View Full Code Here

TOP

Related Classes of com.ibm.wsdl.MessageImpl

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.