Package org.apache.servicemix.soap.interceptors.xml

Examples of org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor


   
    public void testBadNamespace() throws Exception {
        Message msg = new MessageImpl();
        InputStream is = new ByteArrayInputStream("<hello/>".getBytes());
        msg.setContent(InputStream.class, is);
        new StaxInInterceptor().handleMessage(msg);
        try {
            interceptor.handleMessage(msg);
            fail("Interceptor should have thrown a SoapFault");
        } catch (SoapFault e) {
            log.info(e.getMessage(), e);
View Full Code Here


   
    public void testBadLocalName() throws Exception {
        Message msg = new MessageImpl();
        InputStream is = new ByteArrayInputStream("<test xmlns='http://www.w3.org/2003/05/soap-envelope'/>".getBytes());
        msg.setContent(InputStream.class, is);
        new StaxInInterceptor().handleMessage(msg);
        try {
            interceptor.handleMessage(msg);
            fail("Interceptor should have thrown a SoapFault");
        } catch (SoapFault e) {
            log.info(e.getMessage(), e);
View Full Code Here

   
    public void testEmptyEnvelopeName() throws Exception {
        Message msg = new MessageImpl();
        InputStream is = new ByteArrayInputStream("<Envelope xmlns='http://www.w3.org/2003/05/soap-envelope'/>".getBytes());
        msg.setContent(InputStream.class, is);
        new StaxInInterceptor().handleMessage(msg);
        try {
            interceptor.handleMessage(msg);
            fail("Interceptor should have thrown a SoapFault");
        } catch (SoapFault e) {
            log.info(e.getMessage(), e);
View Full Code Here

                     "  </s:Body>" +
                     "</s:Envelope>";
        Message msg = new MessageImpl();
        InputStream is = new ByteArrayInputStream(str.getBytes());
        msg.setContent(InputStream.class, is);
        new StaxInInterceptor().handleMessage(msg);
        interceptor.handleMessage(msg);
       
        assertNotNull(msg.get(SoapVersion.class));
        assertEquals("s", msg.get(SoapVersion.class).getPrefix());
        assertNotNull(msg.getSoapHeaders().get(new QName("header1")));
View Full Code Here

                     "  </s:Body>" +
                     "</s:Envelope>";
        Message msg = new MessageImpl();
        InputStream is = new ByteArrayInputStream(str.getBytes());
        msg.setContent(InputStream.class, is);
        new StaxInInterceptor().handleMessage(msg);
        interceptor.handleMessage(msg);
       
        assertNotNull(msg.get(SoapVersion.class));
        assertEquals("s", msg.get(SoapVersion.class).getPrefix());
        assertEquals(0, msg.getSoapHeaders().size());
View Full Code Here

        List<Interceptor> phase;
       
        // ServerIn phase
        phase = getInterceptors(Phase.ServerIn);
        phase.add(new AttachmentsInInterceptor());
        phase.add(new StaxInInterceptor());
        phase.add(new SoapInInterceptor(soapVersion));
        phase.add(new WsdlOperationInInterceptor());
        phase.add(new MustUnderstandInterceptor());
        phase.add(new JbiInWsdl1Interceptor(true));
        phase.add(new JbiInInterceptor(true));
       
        // ServerOut phase
        phase = getInterceptors(Phase.ServerOut);
        phase.add(new JbiFaultOutInterceptor());
        phase.add(new JbiOutInterceptor(true));
        phase.add(new JbiOutWsdl1Interceptor(true));
        phase.add(new AttachmentsOutInterceptor());
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new BodyOutInterceptor());
       
        // ServerOutFault phase
        phase = getInterceptors(Phase.ServerOutFault);
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new SoapFaultOutInterceptor());
       
        // ClientOut phase
        phase = getInterceptors(Phase.ClientOut);
        phase.add(new JbiOutInterceptor(false));
        phase.add(new JbiOutWsdl1Interceptor(false));
        phase.add(new AttachmentsOutInterceptor());
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new BodyOutInterceptor());

        // ClientIn phase
        phase = getInterceptors(Phase.ClientIn);
        phase.add(new AttachmentsInInterceptor());
        phase.add(new StaxInInterceptor());
        phase.add(new SoapInInterceptor());
        phase.add(new SoapFaultInInterceptor());
        phase.add(new JbiInWsdl1Interceptor(false));
        phase.add(new JbiInInterceptor(false));
    }
View Full Code Here

        List<Interceptor> phase;
       
        // ServerIn phase
        phase = getInterceptors(Phase.ServerIn);
        phase.add(new AttachmentsInInterceptor());
        phase.add(new StaxInInterceptor());
        phase.add(new SoapInInterceptor(soapVersion));
        phase.add(new SoapActionInOperationInterceptor());
        phase.add(new WsdlOperationInInterceptor());
        phase.add(new MustUnderstandInterceptor());
        phase.add(new JbiInWsdl1Interceptor(true));
        phase.add(new JbiInInterceptor(true));
       
        // ServerOut phase
        phase = getInterceptors(Phase.ServerOut);
        phase.add(new JbiFaultOutInterceptor());
        phase.add(new JbiOutInterceptor(true));
        phase.add(new JbiOutWsdl1Interceptor(true));
        phase.add(new AttachmentsOutInterceptor());
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new BodyOutInterceptor());
       
        // ServerOutFault phase
        phase = getInterceptors(Phase.ServerOutFault);
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new SoapFaultOutInterceptor());
       
        // ClientOut phase
        phase = getInterceptors(Phase.ClientOut);
        phase.add(new JbiOutInterceptor(false));
        phase.add(new JbiOutWsdl1Interceptor(false));
        phase.add(new SoapActionOutOperationInterceptor());
        phase.add(new AttachmentsOutInterceptor());
        phase.add(new StaxOutInterceptor());
        phase.add(new SoapOutInterceptor(soapVersion));
        phase.add(new BodyOutInterceptor());

        // ClientIn phase
        phase = getInterceptors(Phase.ClientIn);
        phase.add(new AttachmentsInInterceptor());
        phase.add(new StaxInInterceptor());
        phase.add(new SoapInInterceptor());
        phase.add(new SoapFaultInInterceptor());
        phase.add(new JbiInWsdl1Interceptor(false));
        phase.add(new JbiInInterceptor(false));
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.soap.interceptors.xml.StaxInInterceptor

Copyright © 2018 www.massapicom. 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.