Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPBody.addChild()


                                    .setText(resourcePath
                                            + ClientStatisticsPublisherConstants.BAM_USER_DEFINED_EVENT_TOPIC_SEPARATOR
                                            + ClientStatisticsPublisherConstants.BAM_USER_DEFINED_EVENT_NAME);

                            SOAPBody body = eventEnv.getBody();
                            body.addChild(createOMElement(event.getMessage().toString()));
                            eventMessageContext
                                    .getOptions()
                                    .setAction(
                                               ClientStatisticsPublisherConstants.BAM_USER_DEFINED_EVENT_PUBLISH_ACTION);
                            eventMessageContext
View Full Code Here


                SOAPEnvelope env = factory.createSOAPEnvelope();
                SOAPHeader header = factory.createSOAPHeader(env);
                SOAPBody body = factory.createSOAPBody(env);
                outMsgContext.setEnvelope(env);
                OMElement respElmt = factory.createOMElement(new QName("http://axis2.ode.apache.org", "faultTestResponse"));
                body.addChild(respElmt);
                respElmt.setText("dummy");
                SOAPHeaderBlock headerBlock = factory.createSOAPHeaderBlock("ConversationId",
                        factory.createOMNamespace("http://my.company/super/protocol", "pns"), header);
                headerBlock.setText("ZZYV");
                AxisEngine.send(outMsgContext);
View Full Code Here

                XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
                if (schemaType instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = ((XmlSchemaComplexType) schemaType);
                    ResponseBuilder.handleComplexTypeInResponse(complexType, outElement, response, fac,
                            false);
                    body.addChild(outElement);
                } else if (xmlSchemaElement.getSchemaTypeName() == Constants.XSD_ANYTYPE) {
                    if (response !=null) {
                        // If its anyType that means we have to add xsi:type
                        OMElement element = ResponseBuilder.buildResponse(false, response,
                                xmlSchemaElement);
View Full Code Here

                    if (response !=null) {
                        // If its anyType that means we have to add xsi:type
                        OMElement element = ResponseBuilder.buildResponse(false, response,
                                xmlSchemaElement);
                        if (element != null) {
                            body.addChild(element);
                        }
                    }
                }
            } else if (response !=null) {
                OMElement element =
View Full Code Here

                        ResponseBuilder.buildResponse(annotated, response, xmlSchemaElement);
                if (log.isDebugEnabled()) {
                    log.debug("The built element is " + element.toString());
                }
                if (element != null) {
                    body.addChild(element);
                }
            }

             outMessage.setEnvelope(envelope);
               
View Full Code Here

                XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
                if (schemaType instanceof XmlSchemaComplexType) {
                    XmlSchemaComplexType complexType = ((XmlSchemaComplexType) schemaType);
                    handleComplexTypeInResponse(complexType, outElement, response, fac,
                            engine.isJson(), false);
                    body.addChild(outElement);
                } else if (xmlSchemaElement.getSchemaTypeName() == Constants.XSD_ANYTYPE) {
                    if (!JavaScriptEngine.isNull(response)) {
                        // If its anyType that means we have to add xsi:type
                        OMElement element = buildResponse(false, engine.isJson(), response,
                                xmlSchemaElement);
View Full Code Here

                    if (!JavaScriptEngine.isNull(response)) {
                        // If its anyType that means we have to add xsi:type
                        OMElement element = buildResponse(false, engine.isJson(), response,
                                xmlSchemaElement);
                        if (element != null) {
                            body.addChild(element);
                        }
                    }
                }
            } else if (!JavaScriptEngine.isNull(response)) {
                OMElement element;
View Full Code Here

                } else {
                    element =
                            buildResponse(annotated, engine.isJson(), response, xmlSchemaElement);
                }
                if (element != null) {
                    body.addChild(element);
                }
            }
            outMessage.setEnvelope(envelope);
        } catch (Throwable throwable) {
            log.error(throwable.getMessage(), throwable);
View Full Code Here

                    }
                    StAXBuilder builder = new StAXOMBuilder(xmlReader);
                    OMNodeEx documentElement = (OMNodeEx) builder.getDocumentElement();
                    documentElement.setParent(null);
                    SOAPBody body = soapEnvelope.getBody();
                    body.addChild(documentElement);

                }
            } catch (XMLStreamException e) {
                throw AxisFault.makeFault(e);
            } catch (IOException e) {
View Full Code Here

    public void setPayloadXML(Object payload) throws OMException, ScriptException {
        SOAPBody body = mc.getEnvelope().getBody();
        OMElement firstChild = body.getFirstElement();
        OMElement omElement = xmlHelper.toOMElement(payload);
        if (firstChild == null) {
            body.addChild(omElement);
        } else {
            firstChild.insertSiblingAfter(omElement);
            firstChild.detach();
        }
    }
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.