Package javax.wsdl.extensions.soap12

Examples of javax.wsdl.extensions.soap12.SOAP12Operation


     */
    @Override
    protected void populateBindingOutput(Definition definition, BindingOutput bindingOutput, Output output)
            throws WSDLException {
        super.populateBindingOutput(definition, bindingOutput, output);
        SOAP12Body soapBody = (SOAP12Body) createSoapExtension(definition, BindingOutput.class, "body");
        populateSoapBody(soapBody);
        bindingOutput.addExtensibilityElement(soapBody);
    }
View Full Code Here


                if (soap11) {
                    SOAPBody body = new SOAPBodyImpl();
                    body.setUse("literal");
                    in.addExtensibilityElement(body);
                } else {
                    SOAP12Body body = new SOAP12BodyImpl();
                    body.setUse("literal");
                    in.addExtensibilityElement(body);
                }
                bindingOp.setBindingInput(in);
            }
            if (operation.getOutput() != null) {
                BindingOutput out = def.createBindingOutput();
                out.setName(operation.getOutput().getName());
                if (soap11) {
                    SOAPBody body = new SOAPBodyImpl();
                    body.setUse("literal");
                    out.addExtensibilityElement(body);
                } else {
                    SOAP12Body body = new SOAP12BodyImpl();
                    body.setUse("literal");
                    out.addExtensibilityElement(body);
                }
                bindingOp.setBindingOutput(out);
            }
            for (Iterator itf = operation.getFaults().values().iterator(); itf
View Full Code Here

        Input wsdlInput = wsdlOperation.getInput();
        if (wsdlInput == null) {
            return;
        }
        BindingInput wsdlBindingInput = wsdlBindingOperation.getBindingInput();
        SOAP12Body wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingInput, SOAP12Body.class);
        List<SOAP12Header> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingInput, SOAP12Header.class);
        Wsdl1SoapMessageImpl input = new Wsdl1SoapMessageImpl();
        input.setName(wsdlInput.getMessage().getQName());
        input.setNamespace(wsdlSoapBody.getNamespaceURI());
        String inputName = wsdlInput.getName();
        if (inputName == null || inputName.length() == 0) {
            inputName = wsdlOperation.getName();
        }
        input.setMessageName(inputName);
       
        for (Iterator itPart = wsdlInput.getMessage().getOrderedParts(null).iterator(); itPart.hasNext();) {
            Part wsdlPart = (Part) itPart.next();
            Wsdl1SoapPartImpl part = new Wsdl1SoapPartImpl();
            part.setName(wsdlPart.getName());
            part.setType(wsdlPart.getTypeName());
            part.setElement(wsdlPart.getElementName());
            if ((wsdlSoapBody.getParts() == null && wsdlInput.getMessage().getOrderedParts(null).size() == 1) ||
                    wsdlSoapBody.getParts().contains(part.getName())) {
                part.setBody(true);
                input.setElementName(wsdlPart.getElementName());
            } else {
                boolean header = false;
                for (SOAP12Header h : wsdlSoapHeaders) {
View Full Code Here

        Output wsdlOutput = wsdlOperation.getOutput();
        if (wsdlOutput == null) {
            return;
        }
        BindingOutput wsdlBindingOutput = wsdlBindingOperation.getBindingOutput();
        SOAP12Body wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingOutput, SOAP12Body.class);
        List<SOAP12Header> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingOutput, SOAP12Header.class);
        Wsdl1SoapMessageImpl output = new Wsdl1SoapMessageImpl();
        output.setName(wsdlOutput.getMessage().getQName());
        output.setNamespace(wsdlSoapBody.getNamespaceURI());
        String outputName = wsdlOutput.getName();
        if (outputName == null || outputName.length() == 0) {
            outputName = wsdlOperation.getName() + "Response";
        }
        output.setMessageName(outputName);
       
        for (Iterator itPart = wsdlOutput.getMessage().getOrderedParts(null).iterator(); itPart.hasNext();) {
            Part wsdlPart = (Part) itPart.next();
            Wsdl1SoapPartImpl part = new Wsdl1SoapPartImpl();
            part.setName(wsdlPart.getName());
            part.setType(wsdlPart.getTypeName());
            part.setElement(wsdlPart.getElementName());
            if ((wsdlSoapBody.getParts() == null && wsdlOutput.getMessage().getOrderedParts(null).size() == 1) ||
                    wsdlSoapBody.getParts().contains(part.getName())) {
                part.setBody(true);
                output.setElementName(wsdlPart.getElementName());
            } else {
                boolean header = false;
                for (SOAP12Header h : wsdlSoapHeaders) {
View Full Code Here

            if (soap11) {
                SOAPBody body = new SOAPBodyImpl();
                body.setUse("literal");
                in.addExtensibilityElement(body);
            } else {
                SOAP12Body body = new SOAP12BodyImpl();
                body.setUse("literal");
                in.addExtensibilityElement(body);
            }
            bindingOp.setBindingInput(in);
        }
        if (operation.getOutput() != null) {
            BindingOutput out = def.createBindingOutput();
            out.setName(operation.getOutput().getName());
            if (soap11) {
                SOAPBody body = new SOAPBodyImpl();
                body.setUse("literal");
                out.addExtensibilityElement(body);
            } else {
                SOAP12Body body = new SOAP12BodyImpl();
                body.setUse("literal");
                out.addExtensibilityElement(body);
            }
            bindingOp.setBindingOutput(out);
        }
        for (Iterator<?> itf = operation.getFaults().values().iterator(); itf.hasNext();) {
View Full Code Here

        BindingInput bindingInput = bindingOperation.getBindingInput();
        Assert.assertNotNull("No binding input", bindingInput);
        Assert.assertEquals("Invalid name", "Input", bindingInput.getName());
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingInput.getExtensibilityElements().size());
        SOAP12Body soapBody = (SOAP12Body) bindingInput.getExtensibilityElements().get(0);
        Assert.assertEquals("Invalid soap body use", "literal", soapBody.getUse());

        BindingOutput bindingOutput = bindingOperation.getBindingOutput();
        Assert.assertNotNull("No binding output", bindingOutput);
        Assert.assertEquals("Invalid name", "Output", bindingOutput.getName());
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingOutput.getExtensibilityElements().size());
        soapBody = (SOAP12Body) bindingOutput.getExtensibilityElements().get(0);
        Assert.assertEquals("Invalid soap body use", "literal", soapBody.getUse());

        BindingFault bindingFault = bindingOperation.getBindingFault("Fault");
        Assert.assertNotNull("No binding fault", bindingFault);
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingFault.getExtensibilityElements().size());
View Full Code Here

     */
    @Override
    protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault)
            throws WSDLException {
        super.populateBindingFault(definition, bindingFault, fault);
        SOAP12Fault soapFault = (SOAP12Fault) createSoapExtension(definition, BindingFault.class, "fault");
        populateSoapFault(bindingFault, soapFault);
        bindingFault.addExtensibilityElement(soapFault);
    }
View Full Code Here

                    SOAPFault soapFault = new SOAPFaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                } else {
                    SOAP12Fault soapFault = new SOAP12FaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                }
                bindingOp.addBindingFault(bindingFault);
            }
            binding.addBindingOperation(bindingOp);
View Full Code Here

                SOAPFault soapFault = new SOAPFaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            } else {
                SOAP12Fault soapFault = new SOAP12FaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            }
            bindingOp.addBindingFault(bindingFault);
        }
        return bindingOp;
View Full Code Here

        BindingFault bindingFault = bindingOperation.getBindingFault("Fault");
        Assert.assertNotNull("No binding fault", bindingFault);
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingFault.getExtensibilityElements().size());
        SOAP12Fault soapFault = (SOAP12Fault) bindingFault.getExtensibilityElements().get(0);
        Assert.assertEquals("Invalid soap fault use", "literal", soapFault.getUse());

        Service service = definition.getService(new QName(namespace, "Service"));
        Assert.assertNotNull("No Service created", service);
        Assert.assertEquals("Invalid amount of ports", 1, service.getPorts().size());
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap12.SOAP12Operation

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.