Package org.apache.axis2.databinding

Examples of org.apache.axis2.databinding.ADBBean.serialize()


            OMElement firstChild =
                (OMElement) inMessage.getEnvelope().getBody().getFirstOMChild();
            inMessage.getEnvelope().build();
            StringWriter writer = new StringWriter();
            firstChild.build();
            firstChild.serialize(writer);
            writer.flush();
            String value = writer.toString();
            if (value != null) {
                InputStream in = new ByteArrayInputStream(value.getBytes());
                GroovyClassLoader loader = new GroovyClassLoader();
View Full Code Here


            options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
            options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);

            //if post is through GET of HTTP
            OMElement response = call.sendReceive();
            response.serialize(System.out);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

                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

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.