Package org.apache.axis2.om

Examples of org.apache.axis2.om.OMElement.serialize()


                if (descriptionValue != null) {
                    StringWriter writer = new StringWriter();

                    descriptionValue.build();
                    descriptionValue.serialize(writer);
                    writer.flush();
                    service.setServiceDescription(writer.toString());
                } else {
                    service.setServiceDescription(descriptionElement.getText());
                }
View Full Code Here


                    Constants.TRANSPORT_HTTP,
                    false);
            call.setTo(targetEPR);
            OMElement result = call.invokeBlocking(
                    operationName.getLocalPart(), method);
            result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
                            System.out));
            fail("the test must fail due to bad service Name");
        } catch (AxisFault e) {
            log.info(e.getMessage());
            String message = e.getMessage();
View Full Code Here

                    }else{
                        throw new AxisFault(HTTPConstants.HTTPOutTransportInfo + " does not set");
                    }
                }
                omOutput.setOutputStream(out, msgContext.isDoingMTOM());
                dataOut.serialize(omOutput);
                omOutput.flush();
            }
            if(msgContext.getOperationContext() != null){
                msgContext.getOperationContext().setProperty(
                        Constants.RESPONSE_WRITTEN,
View Full Code Here

              //Pick the char set encoding from the msgContext
                String charSetEnc = (String) msgContext
            .getProperty(MessageContext.CHARACTER_SET_ENCODING);
        omOutput.setOutputStream(out, msgContext.isDoingMTOM());
                omOutput.setCharSetEncoding(charSetEnc);
        outputMessage.serialize(omOutput);
                omOutput.flush();
                out.flush();
            } catch (Exception e) {
                throw new AxisFault(e);
            }
View Full Code Here

    OMText textNode = factory.createText(elem,tempText);
   
    ((Text)textNode).appendData(textToAppend);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
      elem.serialize(baos);
      System.out.println(new String(baos.toByteArray()));
      //TODO TEMPORARY: remove this
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
View Full Code Here

                ByteArrayInputStream(scheamTypes.getBytes()));
        OMFactory fac = OMAbstractFactory.getOMFactory();

        StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
        OMElement scheamElement = staxOMBuilder.getDocumentElement();
        scheamElement.serialize(writer);
    }

    /**
     * @param extElement
     * @throws IOException
View Full Code Here

                        OMAbstractFactory.getSOAP11Factory(), reader);
    }

    public void testElementSerilization() throws Exception {
        OMElement elt = builder.getDocumentElement();
        elt.serialize(writer);

    }

    public void testElementSerilizationCacheOff() throws Exception {
        OMElement elt = builder.getDocumentElement();
View Full Code Here

    }

    public void testElementSerilizationCacheOff() throws Exception {
        OMElement elt = builder.getDocumentElement();
        elt.serialize(writer);

    }

    public void testElementSerilizationChild() throws Exception {
        OMElement elt = builder.getDocumentElement();
View Full Code Here

                false);

        OMElement result =
                call.invokeBlocking(operationName.getLocalPart(),
                        payload);
        result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
                System.out));
        call.close();
    }

    public void testEchoXMLCompleteSync() throws Exception {
View Full Code Here

                Constants.TRANSPORT_TCP,
                true);

        OMElement result = call.invokeBlocking(
                operationName.getLocalPart(), payloadElement);
        result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
                System.out));
        call.close();

    }
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.