Examples of StaxInInterceptor


Examples of org.apache.cxf.interceptor.StaxInInterceptor

                    return new SoapMessage(message);
                }
            };

            newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
            newMO.getBindingInterceptors().add(new StaxInInterceptor());

            // This will not work if one of the endpoints disables message
            // processing. But, if you've disabled message processing, you
            // probably aren't going to use this feature.
           
View Full Code Here

Examples of org.apache.cxf.interceptor.StaxInInterceptor

                        obj = dataReader.read(n);
                    }
                }
                message.setContent(Object.class, obj);
            } else if (message instanceof XMLMessage) {
                new StaxInInterceptor().handleMessage(message);
               
                DataReader<XMLStreamReader> dataReader = getDataReader(message);
                Class<?> readType = type;
                if (readType == Object.class) {
                    readType = null;
View Full Code Here

Examples of org.apache.cxf.interceptor.StaxInInterceptor

        sb.getOutFaultInterceptors().add(new StaxOutInterceptor());
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

        sb.getInInterceptors().add(new AttachmentInInterceptor());
        sb.getInInterceptors().add(new StaxInInterceptor());
        sb.getInInterceptors().add(new SoapActionInInterceptor());
       
        sb.getOutInterceptors().add(new AttachmentOutInterceptor());
        sb.getOutInterceptors().add(new StaxOutInterceptor());
        sb.getOutInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);
View Full Code Here

Examples of org.apache.cxf.interceptor.StaxInInterceptor

                        return new SoapMessage(message);
                    }
                };
   
                newMO.getBindingInterceptors().add(new AttachmentInInterceptor());
                newMO.getBindingInterceptors().add(new StaxInInterceptor());
   
                // This will not work if one of the endpoints disables message
                // processing. But, if you've disabled message processing, you
                // probably aren't going to use this feature.
               
View Full Code Here

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

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

   
    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

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

   
    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

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

                     "  </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

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

                     "  </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

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

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