Examples of SOAP12Fault


Examples of javax.wsdl.extensions.soap12.SOAP12Fault

     */
    @Override
    protected void populateBindingFault(Definition definition, BindingFault bindingFault, Fault fault)
            throws WSDLException {
        super.populateBindingFault(definition, bindingFault, fault);
        SOAP12Fault soapFault = (SOAP12Fault) createSoapExtension(definition, BindingFault.class, "fault");
        populateSoapFault(bindingFault, soapFault);
        bindingFault.addExtensibilityElement(soapFault);
    }
View Full Code Here

Examples of javax.wsdl.extensions.soap12.SOAP12Fault

                    SOAPFault soapFault = new SOAPFaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                } else {
                    SOAP12Fault soapFault = new SOAP12FaultImpl();
                    soapFault.setUse("literal");
                    soapFault.setName(fault.getName());
                    bindingFault.addExtensibilityElement(soapFault);
                }
                bindingOp.addBindingFault(bindingFault);
            }
            binding.addBindingOperation(bindingOp);
View Full Code Here

Examples of javax.wsdl.extensions.soap12.SOAP12Fault

                SOAPFault soapFault = new SOAPFaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            } else {
                SOAP12Fault soapFault = new SOAP12FaultImpl();
                soapFault.setUse("literal");
                soapFault.setName(fault.getName());
                bindingFault.addExtensibilityElement(soapFault);
            }
            bindingOp.addBindingFault(bindingFault);
        }
        return bindingOp;
View Full Code Here

Examples of javax.wsdl.extensions.soap12.SOAP12Fault

        BindingFault bindingFault = bindingOperation.getBindingFault("Fault");
        Assert.assertNotNull("No binding fault", bindingFault);
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingFault.getExtensibilityElements().size());
        SOAP12Fault soapFault = (SOAP12Fault) bindingFault.getExtensibilityElements().get(0);
        Assert.assertEquals("Invalid soap fault use", "literal", soapFault.getUse());

        Service service = definition.getService(new QName(namespace, "Service"));
        Assert.assertNotNull("No Service created", service);
        Assert.assertEquals("Invalid amount of ports", 1, service.getPorts().size());
View Full Code Here

Examples of javax.wsdl.extensions.soap12.SOAP12Fault

                throw new Exception("Missing Fault [" + soapFault.getName() + "] in operation [" + operation.getName()
                        + "]");
            }
            result.addAll(fault.getMessage().getOrderedParts(null));
        } else {
            SOAP12Fault soap12Fault = WsdlUtils.getExtensiblityElement(bindingFault.getExtensibilityElements(),
                    SOAP12Fault.class);

            if (soap12Fault != null && soap12Fault.getName() != null) {
                Fault fault = operation.getFault(soap12Fault.getName());
                if (fault != null && fault.getMessage() != null) {
                    result.addAll(fault.getMessage().getOrderedParts(null));
                }
            } else {
                Fault fault = operation.getFault(faultName);
View Full Code Here

Examples of org.springframework.ws.soap.soap12.Soap12Fault

        boolean result = resolver.resolveException(context, null, new MySenderException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap12Fault fault = (Soap12Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_12.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Sender error", fault.getFaultReasonText(Locale.ENGLISH));
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap12.Soap12Fault

        boolean result = resolver.resolveException(context, null, new MyReceiverException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap12Fault fault = (Soap12Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_12.getServerOrReceiverFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Receiver error", fault.getFaultReasonText(Locale.ENGLISH));
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap12.Soap12Fault

                Soap11Body soap11Body = (Soap11Body) soapBody;
                fault = soap11Body.addFault(definition.getFaultCode(), faultStringOrReason, definition.getLocale());
            }
            else if (soapBody instanceof Soap12Body) {
                Soap12Body soap12Body = (Soap12Body) soapBody;
                Soap12Fault soap12Fault = soap12Body.addServerOrReceiverFault(faultStringOrReason, definition
                        .getLocale());
                soap12Fault.addFaultSubcode(definition.getFaultCode());
                fault = soap12Fault;
            }
            else {
                throw new IllegalStateException("This class only supports SOAP 1.1 and SOAP 1.2.");
            }
View Full Code Here

Examples of org.springframework.ws.soap.soap12.Soap12Fault

        boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap12Fault fault = (Soap12Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_12.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Sender error", fault.getFaultReasonText(Locale.ENGLISH));
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

Examples of org.springframework.ws.soap.soap12.Soap12Fault

        boolean result = resolver.resolveException(context, null, new IllegalArgumentException("bla"));
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Response has no fault", response.getSoapBody().hasFault());
        Soap12Fault fault = (Soap12Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_12.getServerOrReceiverFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Receiver error", fault.getFaultReasonText(Locale.ENGLISH));
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
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.