Package org.apache.axis2.soap

Examples of org.apache.axis2.soap.SOAPEnvelope.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


            if (descriptionElement != null) {
                OMElement descriptionValue = descriptionElement.getFirstElement();
                if (descriptionValue != null) {
                    StringWriter writer = new StringWriter();
                    descriptionValue.build();
                    descriptionValue.serialize(writer);
                    writer.flush();
                    service.setAxisServiceName(writer.toString());
                } else {
                    service.setAxisServiceName(descriptionElement.getText());
                }
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.invokeBlocking();
            response.serialize(System.out);

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

            //Blocking invocation
            OMElement result = call.invokeBlocking("echo", payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
            writer.flush();

            System.out.println("Response: " + writer.toString());
View Full Code Here

        Call call = new Call();
        call.setClientOptions(options);
        //if post is through GET of HTTP
        OMElement response = call.invokeBlocking("webSearch", data);
        response.serialize(System.out);
    }
}
View Full Code Here

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


        call.close();
    }
View Full Code Here

           
            call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
            call.setTo(targetEPR);
            OMElement result = call.invokeBlocking(operationName.getLocalPart(),method);
            OMOutput omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
            result.serialize(omOutput);
           omOutput.flush();
            fail("the test must fail due to bad service Name");
        } catch (AxisFault e) {
            e.printStackTrace();
            assertTrue((e.getMessage().indexOf(UtilServer.FAILURE_MESSAGE)) > 0);
View Full Code Here

      OMOutput omOutput = null;

      try {
        if (msgContext.isDoingMTOM()) {
          omOutput = new OMOutput(out, true);
          outputMessage.serialize(omOutput);
          omOutput.flush();
                    omOutput.complete();
          out.flush();
        } else {
          omOutput = new OMOutput(out, false);
View Full Code Here

          omOutput.flush();
                    omOutput.complete();
          out.flush();
        } else {
          omOutput = new OMOutput(out, false);
          outputMessage.serialize(omOutput);
          omOutput.flush();
          out.flush();
        }
      } catch (Exception e) {
        throw new AxisFault("Stream error", e);
View Full Code Here

                writeMessageWithCommons(msgContext, epr, dataOut);
            } else {
                OutputStream out =
                    (OutputStream) msgContext.getProperty(MessageContext.TRANSPORT_OUT);
                OMOutput output = new OMOutput(out, false);
                dataOut.serialize(output);
            }
            msgContext.getOperationContext().setProperty(
                Constants.RESPONSE_WRITTEN,
                Constants.VALUE_TRUE);
        } catch (XMLStreamException e) {
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.