Package org.apache.cxf.ws.policy

Examples of org.apache.cxf.ws.policy.PolicyEngineImpl$BindingFault


     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:QName is represented
     * in the Component model extensions by the expected QName.
     */
    public void testSoapFaultCode_QName()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[0];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
        assertTrue("The SOAPFaultCode does not represent a QName.", soapFaultCode.isQName());
        assertEquals("The QName represented by the SOAPFaultCode is not the expected one.",
View Full Code Here


     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:token "#any" is
     * represented in the Component model extensions by SOAPFaultCode.ANY.
     */
    public void testSoapFaultCode_TokenAny()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[1];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
        assertEquals("The SOAPFaultCode does not represent the xs:token #any.",
                SOAPFaultCode.ANY,
View Full Code Here

     * property for the corresponding binding fault defaults to token "#any".
     * This should be represented in the Component model extensions by SOAPFaultCode.ANY.
     */
    public void testSoapFaultCode_Default()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[2];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
        assertEquals("The wsoap:code extension attribute was omitted, so SOAPFaultCode.ANY was expected by default.",
                SOAPFaultCode.ANY,
View Full Code Here

     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type list of xs:QName is represented
     * in the Component model extensions by an array of the expected QNames.
     */
    public void testSoapFaultSubcodes_QNames()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[0];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
        assertTrue("The SOAPFaultSubcodes does not represent a QName.", soapFaultSubcodes.isQNames());
        assertTrue("The QNames represented by the SOAPFaultSubcodes are not the expected ones.",
View Full Code Here

     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type xs:token "#any" is
     * represented in the Component model extensions by SOAPFaultSubcodes.ANY.
     */
    public void testSoapFaultSubcodes_TokenAny()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[1];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.",
                SOAPFaultSubcodes.ANY,
View Full Code Here

     * property for the corresponding binding fault defaults to token "#any".
     * This should be represented in the Component model extensions by SOAPFaultSubcodes.ANY.
     */
    public void testSoapFaultSubcodes_Default()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[2];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.",
                SOAPFaultSubcodes.ANY,
View Full Code Here

     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects
     * parsed from &lt;wsoap:module&gt; elements within a binding &lt;fault&gt; element.
     */
    public void testGetSoapModules()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[1];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPModule[] actual = soapBindFaultExts.getSoapModules();
        assertEquals("Unexpected number of SOAPModule objects.", 3, actual.length);
    }
View Full Code Here

     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeaderBlock
     * objects parsed from &lt;wsoap:header&lt; elements within a binding &lt;fault&gt; element.
     */
    public void testGetSoapHeaders()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[2];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPHeaderBlock[] actual = soapBindFaultExts.getSoapHeaders();
        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
    }
View Full Code Here

     * Test that the value for the {http error status code} property returned by the
     * <code>getHttpErrorStatusCode</code> method matches the value parsed from the WSDL.
     */
    public void testGetHttpErrorStatusCode()
    {
        BindingFault bindFault = fBindFaults[0];
        HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);
       
        HTTPErrorStatusCode actual = httpBindFaultExts.getHttpErrorStatusCode();
        assertNotNull("The value for http error status code was null", actual);
        assertEquals("Unexpected value for http error status code.",
                123,
                actual.getCode().intValue());

        bindFault = fBindFaults[1];
        httpBindFaultExts =  (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
        assertNotNull("The BindingFault does not contain an HTTPBindingFaultExtensions object.",
                httpBindFaultExts);
       
        actual = httpBindFaultExts.getHttpErrorStatusCode();
View Full Code Here

     * Test that the value for the {http transfer coding} property returned by the
     * <code>getHttpTransferCoding</code> method matches the value from the WSDL.
     */
    public void testGetHttpTransferCoding()
    {
        BindingFault bindFault = fBindFaults[0];
        HTTPBindingFaultExtensions httpBindFaultExts = (HTTPBindingFaultExtensions)bindFault
            .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP);
       
        String actual = httpBindFaultExts.getHttpContentEncoding();
        assertNotNull("The value for http transfer coding was null", actual);
        assertEquals("Unexpected value for http transfer coding.",
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.policy.PolicyEngineImpl$BindingFault

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.