Package org.jibx.ws.transport

Examples of org.jibx.ws.transport.MessageProperties


        Processor processor = getProcessor();

        m_outCtx.setBody(request);

        String opname = null;
        MessageProperties msgProps = PoxProtocol.INSTANCE.buildMessageProperties(opname, getMessageOptions());
        DuplexConnection duplex = getChannel().getDuplex(msgProps, getMessageOptions().getXmlOptions());
        processor.invoke(duplex.getOutbound(), duplex.getInbound());

        return m_inCtx.getBody();
    }
View Full Code Here


        String charset = msgOptions.getEncoding().toString();
        String outtype = msgOptions.getOutMediaTypeCode();
        String[] intypes = msgOptions.getInMediaTypeCodes();
       
        MessageProperties props = new MessageProperties();
        props.setContentType(getMediaTypeMapper().getMediaTypeFor(outtype));
       
        MediaType[] acceptTypes = new MediaType[intypes.length];
        for (int i = 0; i < intypes.length; i++) {
            acceptTypes[i] = getMediaTypeMapper().getMediaTypeFor(intypes[i]);
        }
        props.setAcceptTypes(acceptTypes);

        if (charset != null) {
            props.setCharset(charset);
        }

        return props;
    }
View Full Code Here

        }

        Processor processor = getProcessor();
        m_outCtx.setBody(request);

        MessageProperties msgProps = m_protocol.buildMessageProperties(m_operationName, getMessageOptions());
        DuplexConnection duplex = getChannel().getDuplex(msgProps, getMessageOptions().getXmlOptions());
        processor.invoke(duplex.getOutbound(), duplex.getInbound());

        Object body = m_inCtx.getBody();
        if (body instanceof SoapFault) {
View Full Code Here

       
        String charset = msgOptions.getEncoding().toString();
        String outtype = msgOptions.getOutMediaTypeCode();
        String[] intypes = msgOptions.getInMediaTypeCodes();       
       
        MessageProperties props = new MessageProperties();
        props.setContentType(getMediaTypeMapper().getMediaTypeFor(outtype));
       
        MediaType[] acceptTypes = new MediaType[intypes.length];
        for (int i = 0; i < intypes.length; i++) {
            acceptTypes[i] = getMediaTypeMapper().getMediaTypeFor(intypes[i]);
        }
        props.setAcceptTypes(acceptTypes);
       
        if (m_soapVersion.equals(SoapVersion.SOAP1_1)) {
            String soapAction;
            if (opname == null) {
                soapAction = ""; // No value means that there is no indication of the intent of the message.
            } else {
                soapAction = "\"" + opname + "\"";
            }
            props.setProperty(SOAPACTION_HEADER, soapAction);
//        } else if (m_soapVersion.equals(SoapVersion.SOAP1_2)) {
//            if (opname != null && opname.length() > 0) {
//                props.setOperation(opname);
//            }
        } else {
            throw new IllegalStateException("Internal error - unsupported SOAP version " + m_soapVersion);
        }
        if (charset != null) {
            props.setCharset(charset);
        }

        return props;
    }
View Full Code Here

        m_soapClient.setOutBodyBindingFactory(BindingDirectory.getFactory(Person.class));
        m_soapClient.setInBodyBindingFactory(BindingDirectory.getFactory(Customer.class));
        m_soapClient.setOperationName("testSoapClientAction");
        m_soapClient.call(TestObjects.REQUEST_OBJECT);

        MessageProperties properties = StubbedChannel.getProperties();
        assertRequestProperties(properties, "text/xml", "UTF-8", "text/xml", "\"testSoapClientAction\"");
    }
View Full Code Here

        m_soapClient.setOutBodyBindingFactory(BindingDirectory.getFactory(Person.class));
        m_soapClient.setInBodyBindingFactory(BindingDirectory.getFactory(Customer.class));
        m_soapClient.setOperationName("");
        m_soapClient.call(TestObjects.REQUEST_OBJECT);

        MessageProperties properties = StubbedChannel.getProperties();
        assertRequestProperties(properties, "text/xml", "UTF-8", "text/xml", "\"\"");
    }
View Full Code Here

       
        m_soapClient.setOutBodyBindingFactory(BindingDirectory.getFactory(Person.class));
        m_soapClient.setInBodyBindingFactory(BindingDirectory.getFactory(Customer.class));
        m_soapClient.call(TestObjects.REQUEST_OBJECT);

        MessageProperties properties = StubbedChannel.getProperties();
        assertRequestProperties(properties, "text/xml", "UTF-8", "text/xml", "");
    }
View Full Code Here

TOP

Related Classes of org.jibx.ws.transport.MessageProperties

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.