Package com.arjuna.webservices

Examples of com.arjuna.webservices.SoapFault


        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("4") ;
       
        final String reason = "testSendErrorReason" ;
        final SoapFaultType soapFaultType = SoapFaultType.FAULT_SENDER ;
        final QName subcode = ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME ;
        final SoapFault soapFault = new SoapFault10(soapFaultType, subcode, reason) ;
       
        ParticipantClient.getClient().sendSoapFault(addressingContext, soapFault, new InstanceIdentifier("sender")) ;
       
        final ParticipantDetails details = testParticipantProcessor.getParticipantDetails(messageId, 10000) ;
        final SoapFault receivedSoapFault = details.getSoapFault() ;
       
        assertNotNull(receivedSoapFault) ;
        assertEquals(soapFaultType, receivedSoapFault.getSoapFaultType()) ;
        assertEquals(subcode, receivedSoapFault.getSubcode()) ;
        assertEquals(reason, receivedSoapFault.getReason()) ;
        // don't expect reply to address or identifier
        checkDetails(details, false, messageId, null);
    }
View Full Code Here


     */
    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
        final MessageContext responseContext, final String action, final XMLStreamReader in)
        throws XMLStreamException, SoapFault
    {
        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
        final ArjunaContext arjunaContext = ArjunaContext.getContext(context) ;
        TaskManager.getManager().queueTask(new Task() {
            public void executeTask() {
                TerminationParticipantProcessor.getProcessor().handleSoapFault(soapFault, addressingContext, arjunaContext) ;
View Full Code Here

     */
    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
        final MessageContext responseContext, final String action, final XMLStreamReader in)
        throws XMLStreamException, SoapFault
    {
        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
        final ArjunaContext arjunaContext = ArjunaContext.getContext(context) ;
        TaskManager.getManager().queueTask(new Task() {
            public void executeTask() {
                CoordinatorProcessor.getProcessor().soapFault(soapFault, addressingContext, arjunaContext) ;
View Full Code Here

     */
    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
        final MessageContext responseContext, final String action, final XMLStreamReader in)
        throws XMLStreamException, SoapFault
    {
        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
        final ArjunaContext arjunaContext = ArjunaContext.getContext(context) ;
        TaskManager.getManager().queueTask(new Task() {
            public void executeTask() {
                ParticipantProcessor.getProcessor().soapFault(soapFault, addressingContext, arjunaContext) ;
View Full Code Here

     */
    public SoapBody invoke(final SoapDetails soapDetails, final MessageContext context,
        final MessageContext responseContext, final String action, final XMLStreamReader in)
        throws XMLStreamException, SoapFault
    {
        final SoapFault soapFault = soapDetails.parseSoapFault(in) ;
        final AddressingContext addressingContext = AddressingContext.getContext(context) ;
        final ArjunaContext arjunaContext = ArjunaContext.getContext(context) ;
        TaskManager.getManager().queueTask(new Task() {
            public void executeTask() {
                CompletionInitiatorProcessor.getProcessor().handleSoapFault(soapFault, addressingContext, arjunaContext) ;
View Full Code Here

        final AddressingContext addressingContext = AddressingContext.createRequestContext(coordinatorServiceURI, messageId);
        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("5");
        final String reason = "testSendErrorReason" ;
        final SoapFaultType soapFaultType = SoapFaultType.FAULT_SENDER ;
        final QName subcode = ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME ;
        final SoapFault soapFault = new SoapFault10(soapFaultType, subcode, reason) ;

        // for this test we use the soap fault client to send a message where we have no valid instance identifier
        // we could also test the case where we have an instance identifier but it never gets exercised anyway!
        CoordinatorClient.getClient().sendSoapFault(addressingContext, soapFault, new InstanceIdentifier("sender"));

        CoordinatorDetails details = testCoordinatorProcessor.getCoordinatorDetails(messageId, 10000);
        assertNotNull(details.hasSoapFault());
        assertEquals(details.hasSoapFault().getSoapFaultType(), soapFault.getSoapFaultType());
        assertEquals(details.hasSoapFault().getReason(), soapFault.getReason());
        assertEquals(details.hasSoapFault().getSubcode(), soapFault.getSubcode());
        // don't expect reply to address nor an identifier
        checkDetails(details, false, messageId, null);
    }
View Full Code Here

        final W3CEndpointReference completionInitiatorEndpoint = TestUtil.getCompletionInitiatorEndpoint(instanceIdentifier);
        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(TestUtil.completionInitiatorServiceURI, messageId) ;

        final SoapFaultType soapFaultType = SoapFaultType.FAULT_SENDER ;
        final QName subcode = ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME ;
        final SoapFault soapFault = new SoapFault11(soapFaultType, subcode, reason) ;

        final TestCompletionInitiatorCallback callback = new TestCompletionInitiatorCallback() {
            public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final ArjunaContext arjunaContext)
            {
                assertEquals(addressingProperties.getTo().getURI().toString(), TestUtil.completionInitiatorServiceURI);
                assertNull(addressingProperties.getFrom());
                assertNull(addressingProperties.getFaultTo());
                assertNotNull(addressingProperties.getReplyTo());
                assertTrue(AddressingHelper.isNoneReplyTo(addressingProperties));
                assertNotNull(addressingProperties.getMessageID());
                assertEquals(addressingProperties.getMessageID().getURI().toString(), messageId);

                assertNotNull(arjunaContext) ;
                assertEquals(instanceIdentifier, arjunaContext.getInstanceIdentifier().getInstanceIdentifier()) ;

                assertNotNull(soapFault) ;
                assertEquals(soapFaultType, soapFault.getSoapFaultType()) ;
                assertEquals(subcode, soapFault.getSubcode()) ;
                assertEquals(reason, soapFault.getReason()) ;
            }
        };
        final CompletionInitiatorProcessor initiator = CompletionInitiatorProcessor.getProcessor() ;
        initiator.registerCallback(instanceIdentifier, callback) ;
View Full Code Here

        final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("4") ;

        final String reason = "testSendErrorReason" ;
        final SoapFaultType soapFaultType = SoapFaultType.FAULT_SENDER ;
        final QName subcode = ArjunaTXConstants.UNKNOWNERROR_ERROR_CODE_QNAME ;
        final SoapFault soapFault = new SoapFault11(soapFaultType, subcode, reason) ;

        ParticipantClient.getClient().sendSoapFault(addressingProperties, soapFault, new InstanceIdentifier("sender")) ;

        final ParticipantDetails details = testParticipantProcessor.getParticipantDetails(messageId, 10000) ;
        final SoapFault receivedSoapFault = details.getSoapFault() ;

        assertNotNull(receivedSoapFault) ;
        assertEquals(soapFaultType, receivedSoapFault.getSoapFaultType()) ;
        assertEquals(subcode, receivedSoapFault.getSubcode()) ;
        assertEquals(reason, receivedSoapFault.getReason()) ;

        checkDetails(details, false, false, messageId, null);
    }
View Full Code Here

            Fault fault)
    {
        MessageContext ctx = webServiceCtx.getMessageContext();
        final AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
        final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
        final SoapFault soapFault = SoapFault11.fromFault(fault);

        TaskManager.getManager().queueTask(new Task() {
            public void executeTask() {
                CoordinatorCompletionParticipantProcessor.getProcessor().soapFault(soapFault, inboundAddressProperties, arjunaContext); ;
            }
View Full Code Here

        {
            final AddressingProperties faultAddressingProperties = AddressingHelper.createFaultContext(addressingProperties, MessageId.getMessageId()) ;
            final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier() ;

            final String message = WSTLogger.log_mesg.getString("com.arjuna.wst11.messaging.engines.CoordinatorEngine.sendUnknownTransaction_1") ;
            final SoapFault soapFault = new SoapFault11(SoapFaultType.FAULT_SENDER, AtomicTransactionConstants.WSAT_ERROR_CODE_UNKNOWN_TRANSACTION_QNAME, message) ;
            ParticipantClient.getClient().sendSoapFault(faultAddressingProperties, soapFault, instanceIdentifier) ;
        }
        catch (final Throwable th)
        {
            if (WSTLogger.arjLoggerI18N.isWarnEnabled())
View Full Code Here

TOP

Related Classes of com.arjuna.webservices.SoapFault

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.