Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPBody


        soapOperation.setStyle("rpc");
        bindingOperation.addExtensibilityElement(soapOperation);
        bindingOperation.setOperation(operation);
        bindingOperation.setName(operation.getName());
        BindingInput bindingInput = definition.createBindingInput();
        SOAPBody inputBody = (SOAPBody) extensionRegistry.createExtension(BindingInput.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "body"));
        inputBody.setUse("encoded");
        bindingInput.addExtensibilityElement(inputBody);
        bindingOperation.setBindingInput(bindingInput);
        BindingOutput bindingOutput = definition.createBindingOutput();
        bindingOutput.addExtensibilityElement(inputBody);
        bindingOperation.setBindingOutput(bindingOutput);
View Full Code Here


            List elements = bindingInput.getExtensibilityElements();
            QName qn = new QName(def.getTargetNamespace(), op.getName());
            for (Iterator i = elements.iterator(); i.hasNext();) {
                Object element = i.next();
                if (SOAPBody.class.isInstance(element)) {
                    SOAPBody body = (SOAPBody)element;
                    if (body.getNamespaceURI() != null) {
                        qn = new QName(body.getNamespaceURI(), op.getName());
                    }
                }
            }
           
            ServerDataBindingCallback cb = getDataBindingCallback(qn, null,
View Full Code Here

                  }
                  if(null != part) obj= part;
                }

                if ( obj instanceof SOAPBody ) {
                    SOAPBody sBody  = (SOAPBody) obj ;
                    list = sBody.getEncodingStyles();
                    if ( list != null && list.size() > 0 )
                        this.setEncodingStyle( (String) list.get(0) );
                    String ns = sBody.getNamespaceURI();
                    if (ns != null && !ns.equals(""))
                      setOperationName( new QName( ns, opName ) );
                    break ;
                }
            }
View Full Code Here

            }
            if (operation.getInput() != null) {
                BindingInput in = def.createBindingInput();
                in.setName(operation.getInput().getName());
                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();
        SOAPBody wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingInput, SOAPBody.class);
        List<SOAPHeader> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingInput, SOAPHeader.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);
                if (operation.getStyle() == Style.DOCUMENT) {
                    input.setElementName(wsdlPart.getElementName());
                }
            } else {
View Full Code Here

        Output wsdlOutput = wsdlOperation.getOutput();
        if (wsdlOutput == null) {
            return;
        }
        BindingOutput wsdlBindingOutput = wsdlBindingOperation.getBindingOutput();
        SOAPBody wsdlSoapBody = WSDLUtils.getExtension(wsdlBindingOutput, SOAPBody.class);
        List<SOAPHeader> wsdlSoapHeaders = WSDLUtils.getExtensions(wsdlBindingOutput, SOAPHeader.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 (SOAPHeader h : wsdlSoapHeaders) {
View Full Code Here

        }
        if (operation.getInput() != null) {
            BindingInput in = def.createBindingInput();
            in.setName(operation.getInput().getName());
            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

            soapOperation.setSoapActionURI("");
            bindingOperation.addExtensibilityElement(soapOperation);
            if (operation.getInput() != null) {
                BindingInput bindingInput = definition.createBindingInput();
                configureBindingInput(bindingInput, operation.getInput());
                SOAPBody soapBody =
                    (SOAPBody)definition.getExtensionRegistry().createExtension(BindingInput.class, SOAP_BODY);
                soapBody.setUse("literal");
                bindingInput.addExtensibilityElement(soapBody);
                bindingOperation.setBindingInput(bindingInput);
            }
            if (operation.getOutput() != null) {
                BindingOutput bindingOutput = definition.createBindingOutput();
                configureBindingOutput(bindingOutput, operation.getOutput());
                SOAPBody soapBody =
                    (SOAPBody)definition.getExtensionRegistry().createExtension(BindingOutput.class, SOAP_BODY);
                soapBody.setUse("literal");
                bindingOutput.addExtensibilityElement(soapBody);
                bindingOperation.setBindingOutput(bindingOutput);
            }
            for (Iterator fi = operation.getFaults().values().iterator(); fi.hasNext();) {
                Fault fault = (Fault)fi.next();
View Full Code Here

        if (bindInput != null) {
            Iterator it = bindInput.getExtensibilityElements().iterator();
            while (it.hasNext()) {
                ExtensibilityElement elem = (ExtensibilityElement) it.next();
                if (elem instanceof SOAPBody) {
                    SOAPBody body = (SOAPBody) elem;
                    ns = body.getNamespaceURI();
                    break;
                }
            }
        }
View Full Code Here

                  }
                  if(null != part) obj= part;
                }

                if ( obj instanceof SOAPBody ) {
                    SOAPBody sBody  = (SOAPBody) obj ;
                    list = sBody.getEncodingStyles();
                    if ( list != null && list.size() > 0 )
                        this.setEncodingStyle( (String) list.get(0) );
                    String ns = sBody.getNamespaceURI();
                    if (ns != null && !ns.equals(""))
                      setOperationName( new QName( ns, opName ) );
                    break ;
                }
            }
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPBody

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.