Package javax.xml.soap

Examples of javax.xml.soap.SOAPEnvelope.createName()


        schema.addAttribute(attdefAttribute, "unqualified");
        Name elemdefAttribute = env.createName("elementFormDefault");
        schema.addAttribute(elemdefAttribute, "qualified");

        SOAPElement complexType = schema.addChildElement("complexType", "xsd");
        Name nameAttribute = env.createName("name");
        complexType.addAttribute(nameAttribute, "ResultDataType");
        Name mixedAttribute = env.createName("mixed");
        complexType.addAttribute(mixedAttribute, "true");

        ProcessDataInfo result = pd.resultSignature();
View Full Code Here


        schema.addAttribute(elemdefAttribute, "qualified");

        SOAPElement complexType = schema.addChildElement("complexType", "xsd");
        Name nameAttribute = env.createName("name");
        complexType.addAttribute(nameAttribute, "ResultDataType");
        Name mixedAttribute = env.createName("mixed");
        complexType.addAttribute(mixedAttribute, "true");

        ProcessDataInfo result = pd.resultSignature();
        if (result.isEmpty()) {
            return;
View Full Code Here

    protected String getChildTextContent
        (SOAPMessage message, SOAPElement element, String prefix, String name)
        throws SOAPException {
        SOAPPart part = message.getSOAPPart();
        SOAPEnvelope envelope = part.getEnvelope();
        Name nm = envelope.createName(name, prefix, Consts.ASAP_NS);
        Iterator i = element.getChildElements(nm);
        if (!i.hasNext()) {
            return null;
        }
        SOAPElement child = (SOAPElement) i.next();
View Full Code Here

               
        SOAPEnvelope respEnv = respMsg.getSOAPPart().getEnvelope();
        SOAPHeader respHeader = respEnv.getHeader();
        SOAPHeaderElement respNode
            = respHeader.addHeaderElement
            (respEnv.createName(Consts.RESPONSE_HEADER, Consts.ASAP_PREFIX,
                    Consts.ASAP_NS));
       
        // Set the sender to me. This might differ from the value, given in
        // the request as ReceiverKey. We set it to the URL under which we were
        // called.
View Full Code Here

    protected SOAPBodyElement createWfxmlResponseNode(SOAPMessage respMsg,
            String nodeName)
        throws SOAPException {
        SOAPEnvelope respEnv = respMsg.getSOAPPart().getEnvelope();
        SOAPBody respBody = respEnv.getBody();
        Name respName = respEnv.createName(nodeName, Consts.WFXML_PREFIX,
                Consts.WFXML_NS);
       
        SOAPBodyElement node = respBody.addBodyElement(respName);
        node.addNamespaceDeclaration(Consts.ASAP_PREFIX, Consts.ASAP_NS);
       
View Full Code Here

    protected SOAPBodyElement createAsapResponseNode(SOAPMessage respMsg,
            String nodeName)
        throws SOAPException {
        SOAPEnvelope respEnv = respMsg.getSOAPPart().getEnvelope();
        SOAPBody respBody = respEnv.getBody();
        Name respName = respEnv.createName(nodeName, Consts.ASAP_PREFIX,
                Consts.ASAP_NS);

        SOAPBodyElement node = respBody.addBodyElement(respName);

        return node;
View Full Code Here

        */
       
        final String SOAP_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
        SOAPBody sb = se.getBody();
        SOAPBodyElement fault
            = sb.addBodyElement(se.createName("Fault", "SOAP_ENV", SOAP_ENV));
        fault.addChildElement("faultstring")
            .addTextNode(errorMessage);
        SOAPElement detail = fault.addChildElement("detail");
        detail.addChildElement
            ("ErrorCode", Consts.ASAP_PREFIX, Consts.ASAP_NS)
View Full Code Here

            SOAPMessage message = factory.createMessage();
            SOAPPart soapPart = message.getSOAPPart();
            SOAPEnvelope envelope = soapPart.getEnvelope();
            SOAPBody body = envelope.getBody();

            Name name = envelope.createName("MyChild");
            SOAPElement se = body.addChildElement(name);
            assertNotNull(se);
            Iterator childs = body.getChildElements(name);
            int childElementCount = 0;
            for (int a = 0; childs.hasNext(); a++) {
View Full Code Here

            SOAPMessage msg =
                    MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createMessage();
            SOAPEnvelope soapEnvelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = msg.getSOAPBody();

            Name name = soapEnvelope.createName("MyChild1");
            //Add child element Name object with localName=MyChild1
            SOAPElement se = body.addChildElement(name);
            if (se == null) {
                fail("addChildElement() did not return SOAPElement");
                //pass = false;
View Full Code Here

    public void testRemoveAttribute() {
        try {
            SOAPMessage msg = MessageFactory.newInstance().createMessage();
            SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
            SOAPBody body = envelope.getBody();
            Name name = envelope.createName("MyAttr1");
            String value = "MyValue1";
            body.addAttribute(name, value);
            boolean b = body.removeAttribute(name);
            assertTrue("removeAttribute() did not return true", b);
            b = body.removeAttribute(name);
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.