Package org.apache.axis2.builder

Examples of org.apache.axis2.builder.Builder.processDocument()


    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
        SOAPBuilder soapBuilder = new SOAPBuilder();
        SOAPEnvelope env = ctx.getEnvelope();
        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
        ctx.setEnvelope(env);
    }
}
View Full Code Here


        // Building the SOAP envelope from the OMElement
        SOAPBuilder soapBuilder = new SOAPBuilder();
        SOAPEnvelope env = ctx.getEnvelope();
        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, "text/xml", ctx);
        ctx.setEnvelope(env);

        RampartEngine engine = new RampartEngine();
        engine.process(ctx);
View Full Code Here

        FileInputStream fis = new FileInputStream(file);
        MessageContext mc = new MessageContext();
       
        //Set up a mock envelope
        try {  
            OMElement envelope = soapBuilder.processDocument(fis, SOAP11Constants.SOAP_11_CONTENT_TYPE, mc);  
        } catch (Exception e) {
        }

        SOAPProcessingException e =  new SOAPProcessingException(
            "Transport level information does not match with SOAP" +
View Full Code Here

    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
        SOAPBuilder soapBuilder = new SOAPBuilder();
        SOAPEnvelope env = ctx.getEnvelope();
        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
        ctx.setEnvelope(env);
    }
}
View Full Code Here

        FileInputStream fis = new FileInputStream(file);
        MessageContext mc = new MessageContext();
       
        //Set up a mock envelope
        try {  
            OMElement envelope = soapBuilder.processDocument(fis, SOAP11Constants.SOAP_11_CONTENT_TYPE, mc);  
        } catch (Exception e) {
        }

        SOAPProcessingException e =  new SOAPProcessingException(
            "Transport level information does not match with SOAP" +
View Full Code Here

                textMessageBuilder = (TextMessageBuilder)builder;
            } else {
                textMessageBuilder = new TextMessageBuilderAdapter(builder);
            }
            String content = ((TextMessage)message).getText();
            documentElement = textMessageBuilder.processDocument(content, contentType, msgContext);
        } else {
            handleException("Unsupported JMS message type " + message.getClass().getName());
            return; // Make compiler happy
        }
        msgContext.setEnvelope(TransportUtils.createSOAPEnvelope(documentElement));
View Full Code Here

                textMessageBuilder = (TextMessageBuilder)builder;
            } else {
                textMessageBuilder = new TextMessageBuilderAdapter(builder);
            }
            String content = ((TextMessage)message).getText();
            documentElement = textMessageBuilder.processDocument(content, contentType, msgContext);
        } else {
            handleException("Unsupported JMS message type " + message.getClass().getName());
            return; // Make compiler happy
        }
        msgContext.setEnvelope(TransportUtils.createSOAPEnvelope(documentElement));
View Full Code Here

                textMessageBuilder = (TextMessageBuilder)builder;
            } else {
                textMessageBuilder = new TextMessageBuilderAdapter(builder);
            }
            String content = ((TextMessage)message).getText();
            documentElement = textMessageBuilder.processDocument(content, contentType, msgContext);
        } else {
            handleException("Unsupported JMS message type " + message.getClass().getName());
            return; // Make compiler happy
        }
        msgContext.setEnvelope(TransportUtils.createSOAPEnvelope(documentElement));
View Full Code Here

                        } else {
                            responseString = "{}";
                        }
                        InputStream in = new ByteArrayInputStream(responseString.getBytes());
                        JSONOMBuilder builder = new JSONOMBuilder();
                        element = builder.processDocument(in, contentType, inMessage);
                        element.buildNext();
                    }
                } else {
                    element =
                            buildResponse(annotated, engine.isJson(), response, xmlSchemaElement);
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.