Examples of SoapBody


Examples of javax.wsdl.extensions.soap.SOAPBody

        serviceDesc.setStyle(getStyle(binding));


        BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
        SOAPBody soapBody = (SOAPBody) SchemaInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());

        if (soapBody.getUse() != null) {
            Use use = Use.getUse(soapBody.getUse());
            serviceDesc.setUse(use);
        } else {
            serviceDesc.setUse(Use.ENCODED);
        }
        boolean hasEncoded = serviceDesc.getUse() == Use.ENCODED;
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPBody

                log.debug("Extensibility Element type is:" + extElement.getElementType());
                log.debug("Extensibility Element class is:" + extElement.getClass().getName());
            }
            // SOAP 1.1 body element found!
            if (extElement instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) extElement;
                partsList = soapBody.getParts();
            } else if (extElement instanceof SOAP12Body) {
                SOAP12Body soapBody = (SOAP12Body) extElement;
                partsList = soapBody.getParts();
            } else if (extElement instanceof MIMEMultipartRelated) {
                MIMEMultipartRelated minMimeMultipartRelated = (MIMEMultipartRelated) extElement;
                List mimePartsList = minMimeMultipartRelated.getMIMEParts();
                MIMEPart mimePart = null;
                Object object;
                List mimePartElements;
                ExtensibilityElement mimePartExtensibilityElement;
                for (Iterator mimePartsIter = mimePartsList.iterator(); mimePartsIter.hasNext();) {
                    object = mimePartsIter.next();
                    if (object instanceof MIMEPart) {
                        mimePart = (MIMEPart) object;
                        mimePartElements = mimePart.getExtensibilityElements();
                        for (Iterator mimePartElementsIter = mimePartElements.iterator(); mimePartElementsIter.hasNext();)
                        {
                            mimePartExtensibilityElement = (ExtensibilityElement) mimePartElementsIter.next();
                            if (mimePartExtensibilityElement instanceof SOAPBody) {
                                SOAPBody soapBody = (SOAPBody) mimePartExtensibilityElement;
                                partsList = soapBody.getParts();
                            } else if (mimePartExtensibilityElement instanceof SOAP12Body) {
                                SOAP12Body soapBody = (SOAP12Body) mimePartExtensibilityElement;
                                partsList = soapBody.getParts();
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPBody

        String namespace = null;
        for (Iterator iter = extensibilityElements.iterator(); iter.hasNext();) {
            extElement = (ExtensibilityElement) iter.next();
            // SOAP 1.1 body element found!
            if (extElement instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) extElement;
                namespace = soapBody.getNamespaceURI();
            } else if (extElement instanceof SOAP12Body) {
                SOAP12Body soapBody = (SOAP12Body) extElement;
                namespace = soapBody.getNamespaceURI();
            }
        }
        return namespace;
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

                    System.out.println("3: \t\t" + soapH.getNodeName() + "> " + soapH.getValue());
                  }
                }
              }
              if (obj instanceof SOAPBody) {
                SOAPBody soapBody = (SOAPBody) obj;
                Iterator it4 = soapBody.getChildElements();
                if (it4 != null) {
                  while (it4.hasNext()) {
                    System.out.println("4: \t" + soapBody.getNodeName());
                    Object obj4 = it4.next();
                    if (obj4 instanceof SOAPBodyElement) {
                      SOAPBodyElement soapBodyElement = (SOAPBodyElement) obj4;
                      System.out.println("5: \t" + soapBodyElement.getNodeName());
                      Iterator it5 = soapBodyElement.getChildElements();
View Full Code Here

Examples of javax.xml.soap.SOAPBody

                }

                if (outbound) {
                    try {
                        // append handler id to SOAP response message
                        SOAPBody body = msg.getSOAPBody();
                        Node resp = body.getFirstChild();

                        if (resp.getNodeName().contains("pingResponse")) {
                            Node child = resp.getFirstChild();
                            Document doc = resp.getOwnerDocument();
                            Node info = doc.createElementNS(child.getNamespaceURI(), child.getLocalName());
View Full Code Here

Examples of javax.xml.soap.SOAPBody

        }

        boolean ret = true;
        try {
            SOAPMessage msg  = ctx.getMessage();
            SOAPBody body = msg.getSOAPBody();

            if (body.getFirstChild().getFirstChild() == null) {
                return true;
            }

            Node commandNode = body.getFirstChild().getFirstChild().getFirstChild();
            String arg = commandNode.getNodeValue();
            String namespace = body.getFirstChild().getFirstChild().getNamespaceURI();
           
            StringTokenizer strtok = new StringTokenizer(arg, " ");
            String hid = strtok.nextToken();
            String direction = strtok.nextToken();
            String command = strtok.nextToken();
           
            if (getHandlerId().equals(hid)
                && "inbound".equals(direction)) {
                if ("stop".equals(command)) {

                    // remove the incoming request body.
                    Document doc = body.getOwnerDocument();
                    // build the SOAP response for this message
                    //
                    Node wrapper = doc.createElementNS(namespace, "pingResponse");
                    wrapper.setPrefix("ns4");
                    body.removeChild(body.getFirstChild());
                    body.appendChild(wrapper);

                    for (String info : getHandlerInfoList(ctx)) {
                        // copy the the previously invoked handler list into the response. 
                        // Ignore this handlers information as it will be added again later.
                        //
View Full Code Here

Examples of javax.xml.soap.SOAPBody

               && Names.WSA_ANONYMOUS_ADDRESS.equals(maps.getTo().getValue());
    }
   
    private boolean isIncomingPartialResponse(SOAPMessageContext context)
        throws SOAPException {
        SOAPBody body =
            context.getMessage().getSOAPPart().getEnvelope().getBody();
        return !ContextUtils.isOutbound(context)
               && ContextUtils.isRequestor(context)
               && !body.getChildElements().hasNext();
    }
View Full Code Here

Examples of javax.xml.soap.SOAPBody

        callback = cb;
    }

    public Object read(int idx, T input) {
        Source obj = null;       
        SOAPBody src = (SOAPBody)input;   
        try {
            Document doc = src.extractContentAsDocument();
            assert doc != null;
   
            if (DOMSource.class.isAssignableFrom(callback.getSupportedFormats()[0])) {
                obj = new DOMSource();
                ((DOMSource)obj).setNode(doc);         
View Full Code Here

Examples of javax.xml.soap.SOAPBody

    public DOMSource invoke(DOMSource request) {
        DOMSource response = new DOMSource();
        try {
            SOAPMessage msg = factory.createMessage();           
            SOAPBody body = msg.getSOAPBody();
            body.addDocument((Document)request.getNode());

            Node n = getElementChildNode(body);
            if (n.getLocalName().equals(sayHi.getLocalPart())) {
                response.setNode(sayHiResponse.getSOAPBody().extractContentAsDocument());
            } else if (n.getLocalName().equals(greetMe.getLocalPart())) {
View Full Code Here

Examples of javax.xml.soap.SOAPBody

    public SAXSource invoke(SAXSource request) {
        SAXSource response = new SAXSource();
        try {
            SOAPMessage msg = factory.createMessage();
            msg.getSOAPPart().setContent(request);
            SOAPBody body = msg.getSOAPBody();
            Node n = body.getFirstChild();

            while (n.getNodeType() != Node.ELEMENT_NODE) {
                n = n.getNextSibling();
            }
            if (n.getLocalName().equals(sayHi.getLocalPart())) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.