Package javax.wsdl

Examples of javax.wsdl.Input


            OperationType opType = op.getStyle();
            if (opType == null) {
                throw new WSIFException("operation " + name + " has no type!");
            }
            if (opType.equals(OperationType.REQUEST_RESPONSE)) {
                Input input = op.getInput();
                Output output = op.getOutput();
                if (input == null) {
                    throw new WSIFException("missing input message for operation " + name);
                }
                if (output == null) {
                    throw new WSIFException("missing output message for operation " + name);
                }
            } else if (opType.equals(OperationType.ONE_WAY)) {
                Input input = op.getInput();
                if (input == null) {
                    throw new WSIFException("missing input message for operation " + name);
                }
            } else {
                // Log message
View Full Code Here


        } catch (XmlMapException ex) {
            throw new WSIFException("Could not initialize mapping.", ex);
        }

        // first determine list of arguments
        Input input = operation.getInput();
        if (input != null) {
            List parts;
            if (partNames != null) {
                parts = new Vector();
                for (Iterator i = partNames.iterator(); i.hasNext();) {
                    String partName = (String) i.next();
                    Part part = input.getMessage().getPart(partName);
                    if (part == null) {
                        throw new WSIFException(
                            "no input part named " + partName + " for bining operation " + getName());
                    }
                    parts.add(part);
                }
            } else {
                parts = input.getMessage().getOrderedParts(null);
            }
            int count = parts.size();
            names = new String[count];
            types = new Class[count];
View Full Code Here

                Trc.ignoredException(ignored);
            }
        }

        // first determine list of arguments
        Input input = operation.getInput();
        if (input != null) {
            List parts;
            if (partNames != null) {
                parts = new Vector();
                for (Iterator i = partNames.iterator(); i.hasNext();) {
                    String partName = (String) i.next();
                    Part part = input.getMessage().getPart(partName);
                    if (part == null) {
                        throw new WSIFException(
                            "no input part named "
                                + partName
                                + " for binding operation "
                                + getName());
                    }
                    parts.add(part);
                }
            } else {
                parts = input.getMessage().getOrderedParts(null);
            }
            int count = parts.size();
            names = new String[count];
            types = new Class[count];
View Full Code Here

                            + "' is overloaded. "
                            + "Please specify the operation in the form "
                            + "'operationName:inputMessageName:outputMesssageName' to distinguish it");
                }
                found = true;
                Input opInput = op.getInput();
                inputName = (opInput.getName() == null) ? null : opInput.getName();
                Output opOutput = op.getOutput();
                outputName = (opOutput.getName() == null) ? null : opOutput.getName();
            }
        }

        WSIFOperation operation =
            port.createOperation(operationName, inputName, outputName);
        WSIFMessage input = operation.createInputMessage();
        WSIFMessage output = operation.createOutputMessage();
        WSIFMessage fault = operation.createFaultMessage();

        // retrieve list of names and types for input and names for output
        List operationList = portType.getOperations();

        // find portType operation to prepare in/oout message w/ parts
        boolean found = false;
        String[] outNames = new String[0];
        Class[] outTypes = new Class[0];
        for (Iterator i = operationList.iterator(); i.hasNext();) {
            Operation op = (Operation) i.next();
            String name = op.getName();
            if (!name.equals(operationName)) {
                continue;
            }
            if (found) {
                throw new RuntimeException("overloaded operations are not supported in this sample");
            }
            found = true;

            //System.err.println("op = "+op);
            Input opInput = op.getInput();

            // first determine list of arguments
            String[] inNames = new String[0];
            Class[] inTypes = new Class[0];
            if (opInput != null) {
                List parts = opInput.getMessage().getOrderedParts(null);
                unWrapIfWrappedDocLit(parts, name, def);
                int count = parts.size();
                inNames = new String[count];
                inTypes = new Class[count];
                retrieveSignature(parts, inNames, inTypes);
View Full Code Here

            OperationType opType = op.getStyle();
            if (opType == null) {
                throw new WSIFException("operation " + name + " has no type!");
            }
            if (opType.equals(OperationType.REQUEST_RESPONSE)) {
                Input input = op.getInput();
                Output output = op.getOutput();
                if (input == null) {
                    throw new WSIFException("missing input message for operation " + name);
                }
                if (output == null) {
                    throw new WSIFException("missing output message for operation " + name);
                }
            } else if (opType.equals(OperationType.ONE_WAY)) {
                Input input = op.getInput();
                if (input == null) {
                    throw new WSIFException("missing input message for operation " + name);
                }
            } else {
                // Log message
View Full Code Here

        }
        List<String> porderList = CastUtils.cast((List)op.getParameterOrdering());
        opInfo.setParameterOrdering(porderList);
        this.copyExtensors(opInfo, op.getExtensibilityElements());
        this.copyExtensionAttributes(opInfo, op);
        Input input = op.getInput();
        if (input != null) {
            if (input.getMessage() == null) {
                throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "input", op.getName(), input.getName());
            }
            MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(), MessageInfo.Type.INPUT);
            opInfo.setInput(input.getName(), minfo);
            buildMessage(minfo, input.getMessage());
            copyExtensors(minfo, input.getExtensibilityElements());
            copyExtensionAttributes(minfo, input);
        }
        Output output = op.getOutput();
        if (output != null) {
            if (output.getMessage() == null) {
View Full Code Here

                addNamespace(operationInfo.getName().getNamespaceURI(), def);
                if (operationInfo.isOneWay()) {
                    operation.setStyle(OperationType.ONE_WAY);
                }
                this.addExtensibilityElements(operation, getWSDL11Extensors(operationInfo));
                Input input = def.createInput();
                input.setName(operationInfo.getInputName());
                Message message = def.createMessage();
                buildMessage(message, operationInfo.getInput(), def);
                this.addExtensibilityAttributes(input, getInputExtensionAttributes(operationInfo));
                input.setMessage(message);
                operation.setInput(input);
                operation.setParameterOrdering(operationInfo.getParameterOrdering());
               
                if (operationInfo.getOutput() != null) {
                    Output output = def.createOutput();
View Full Code Here

        javax.wsdl.Operation wsdlOperation =
                retrieveWSDLOperation(operationName, portType);

        // Get the Input and Output objects to create the WSIFOperation and
        // messages.
        Input wsdlInput = wsdlOperation.getInput();
        String inputName = (wsdlInput.getName() == null) ? null :
                wsdlInput.getName();
        Output wsdlOutput = wsdlOperation.getOutput();
        String outputName = (wsdlOutput.getName() == null) ? null :
                wsdlOutput.getName();

        WSIFOperation wsifOperation =
                wsifPort.createOperation(operationName, inputName, outputName);
        WSIFMessage input = wsifOperation.createInputMessage();
        WSIFMessage output = wsifOperation.createOutputMessage();
        WSIFMessage fault = wsifOperation.createFaultMessage();

        initializeInputParts(wsdlInput.getMessage(), message, input);

        createTypeMappings(input, output, wsifService, wsifOperation);

        try {
            wsifOperation.executeRequestResponseOperation(
View Full Code Here

    * @return DOCUMENT_ME
    */
   public static Input createInput( String  name,
                                    Message msg )
   {
      Input input = getWSDLFactory(  ).newDefinition(  ).createInput(  );
      input.setName( name );
      input.setMessage( msg );
      return input;
   }
View Full Code Here

    }

    public void createInputMessage() {
        // message
        if (inputMessage == null) {
            Input input = definition.createInput();
            Message msg = definition.createMessage();
            msg.setQName(new QName(definition.getTargetNamespace(), operation.getName()));
            input.setMessage(msg);
            String msgName = operation.getName() + "Request";
            input.setName(msgName);
            msg.setUndefined(false);
            operation.setInput(input);
            definition.addMessage(msg);
           
            BindingInput bindingInput = definition.createBindingInput();
View Full Code Here

TOP

Related Classes of javax.wsdl.Input

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.