Package com.arjuna.webservices.wsaddr2005

Examples of com.arjuna.webservices.wsaddr2005.EndpointReferenceType


        {
            if (!replyTo.isValid())
            {
                throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_4")) ;
            }
            final AttributedURIType address = replyTo.getAddress() ;
            if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(address.getValue()))
            {
                client.invokeOneWay(soapBodyMessage, toURI) ;
                return null ;
            }
        }
View Full Code Here


     * @throws IOException For invalid destination.
     */
    private static String getDestinationURI(final AddressingContext addressingContext)
        throws IOException
    {
        final AttributedURIType to = addressingContext.getTo() ;
        if (to == null)
        {
            throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_1")) ;
        }
        if (!to.isValid())
        {
            throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_2")) ;
        }
        return to.getValue() ;
    }
View Full Code Here

            {
                final AddressingContext responseAddressingContext = AddressingContext.createResponseContext(addressingContext, MessageId.getMessageId()) ;
                final String soapBodyAction = response.getAction() ;
                if (soapBodyAction != null)
                {
                    responseAddressingContext.setAction(new AttributedURIType(soapBodyAction)) ;
                }
                AddressingContext.setContext(responseContext, responseAddressingContext) ;
               
                final AttributedURIType to = responseAddressingContext.getTo() ;
                if (to != null)
                {
                    if (!to.isValid())
                    {
                        if (WSCLogger.arjLoggerI18N.isDebugEnabled())
                        {
                            WSCLogger.arjLoggerI18N.debug("com.arjuna.webservices.wsaddr2005.handlers.AddressingInterceptorHandler_4") ;
                        }
                    }
                    else
                    {
                        final String toURI = to.getValue() ;
                        if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(toURI))
                        {
                            if (!AddressingConstants.WSA_ADDRESS_NONE.equals(toURI))
                            {
                                try
                                {
                                    WSAddr2005Client.sendOneWay(response, responseAddressingContext, soapDetails, soapService) ;
                                }
                                catch (final IOException ioe)
                                {
                                    // Something happened while sending an async response so null out the replyTo and throw a fault.
                                    addressingContext.setReplyTo(null) ;
                                   
                                    final AnyElement detail = new AnyElement() ;
                                    detail.putAnyContent(new NamedElement(AddressingConstants.WSA_ELEMENT_QNAME_PROBLEM_IRI, responseAddressingContext.getTo())) ;
                                    final NamedElement detailElement = new NamedElement(AddressingConstants.WSA_ELEMENT_QNAME_FAULT_DETAIL, detail) ;
                                    final SoapFault soapFault = new SoapFault10(SoapFaultType.FAULT_SENDER, AddressingConstants.WSA_FAULT_CODE_QNAME_DESTINATION_UNREACHABLE,
                                        "Destination unreachable", detailElement) ;
                                    soapFault.setAction(AddressingConstants.WSA_ACTION_FAULT) ;
                                    throw soapFault ;
                                }
                            }
                            return null ;
                        }
                    }
                }
            }
           
            return response ;
        }
        catch (final SoapFault soapFault)
        {
            final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
           
            final String soapFaultAction = soapFault.getAction() ;
            final String faultAction = (soapFaultAction != null ? soapFaultAction : AddressingConstants.WSA_ACTION_SOAP_FAULT) ;
           
            faultAddressingContext.setAction(new AttributedURIType(faultAction)) ;
           
            final AttributedURIType to = faultAddressingContext.getTo() ;
            if (to != null)
            {
                if (!to.isValid())
                {
                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
                    {
                        WSCLogger.arjLoggerI18N.debug("com.arjuna.webservices.wsaddr2005.handlers.AddressingInterceptorHandler_5") ;
                    }
                }
                else
                {
                    final String toURI = to.getValue() ;
                    if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(toURI))
                    {
                        if (!AddressingConstants.WSA_ADDRESS_NONE.equals(toURI))
                        {
                            try
View Full Code Here

     */
    public void invoke(final XMLStreamReader in, final MessageContext context)
        throws XMLStreamException, SoapFault
    {
        final QName headerName = in.getName() ;
        final AttributedURIType to = new AttributedURIType(in) ;
        final HandlerAddressingContext addressingContext = HandlerAddressingContext.getHandlerContext(context) ;
        if (!addressingContext.isFaultedTo())
        {
            if (addressingContext.getTo() != null)
            {
View Full Code Here

     */
    public void invoke(final XMLStreamReader in, final MessageContext context)
        throws XMLStreamException, SoapFault
    {
        final QName headerName = in.getName() ;
        final AttributedURIType action = new AttributedURIType(in) ;
        final HandlerAddressingContext addressingContext = HandlerAddressingContext.getHandlerContext(context) ;
        if (!addressingContext.isFaultedAction())
        {
            if (addressingContext.getAction() != null)
            {
View Full Code Here

     */
    public void invoke(final XMLStreamReader in, final MessageContext context)
        throws XMLStreamException, SoapFault
    {
        final QName headerName = in.getName() ;
        final AttributedURIType messageID = new AttributedURIType(in) ;
        final HandlerAddressingContext addressingContext = HandlerAddressingContext.getHandlerContext(context) ;
        if (!addressingContext.isFaultedMessageID())
        {
            if (addressingContext.getMessageID() != null)
            {
View Full Code Here

        {
            if (!replyTo.isValid())
            {
                throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_4")) ;
            }
            final AttributedURIType address = replyTo.getAddress() ;
            if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(address.getValue()))
            {
                client.invokeOneWay(soapBodyMessage, toURI) ;
                return null ;
            }
        }
View Full Code Here

     * @throws IOException For invalid destination.
     */
    private static String getDestinationURI(final AddressingContext addressingContext)
        throws IOException
    {
        final AttributedURIType to = addressingContext.getTo() ;
        if (to == null)
        {
            throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_1")) ;
        }
        if (!to.isValid())
        {
            throw new IOException(WSCLogger.log_mesg.getString("com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client_2")) ;
        }
        return to.getValue() ;
    }
View Full Code Here

            {
                final AddressingContext responseAddressingContext = AddressingContext.createResponseContext(addressingContext, MessageId.getMessageId()) ;
                final String soapBodyAction = response.getAction() ;
                if (soapBodyAction != null)
                {
                    responseAddressingContext.setAction(new AttributedURIType(soapBodyAction)) ;
                }
                AddressingContext.setContext(responseContext, responseAddressingContext) ;
               
                final AttributedURIType to = responseAddressingContext.getTo() ;
                if (to != null)
                {
                    if (!to.isValid())
                    {
                        if (WSCLogger.arjLoggerI18N.isDebugEnabled())
                        {
                            WSCLogger.arjLoggerI18N.debug("com.arjuna.webservices.wsaddr2005.handlers.AddressingInterceptorHandler_4") ;
                        }
                    }
                    else
                    {
                        final String toURI = to.getValue() ;
                        if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(toURI))
                        {
                            if (!AddressingConstants.WSA_ADDRESS_NONE.equals(toURI))
                            {
                                try
                                {
                                    WSAddr2005Client.sendOneWay(response, responseAddressingContext, soapDetails, soapService) ;
                                }
                                catch (final IOException ioe)
                                {
                                    // Something happened while sending an async response so null out the replyTo and throw a fault.
                                    addressingContext.setReplyTo(null) ;
                                   
                                    final AnyElement detail = new AnyElement() ;
                                    detail.putAnyContent(new NamedElement(AddressingConstants.WSA_ELEMENT_QNAME_PROBLEM_IRI, responseAddressingContext.getTo())) ;
                                    final NamedElement detailElement = new NamedElement(AddressingConstants.WSA_ELEMENT_QNAME_FAULT_DETAIL, detail) ;
                                    final SoapFault soapFault = new SoapFault(SoapFaultType.FAULT_SENDER, AddressingConstants.WSA_FAULT_CODE_QNAME_DESTINATION_UNREACHABLE,
                                        "Destination unreachable", detailElement) ;
                                    soapFault.setAction(AddressingConstants.WSA_ACTION_FAULT) ;
                                    throw soapFault ;
                                }
                            }
                            return null ;
                        }
                    }
                }
            }
           
            return response ;
        }
        catch (final SoapFault soapFault)
        {
            final AddressingContext faultAddressingContext = AddressingContext.createFaultContext(addressingContext, MessageId.getMessageId()) ;
           
            final String soapFaultAction = soapFault.getAction() ;
            final String faultAction = (soapFaultAction != null ? soapFaultAction : AddressingConstants.WSA_ACTION_SOAP_FAULT) ;
           
            faultAddressingContext.setAction(new AttributedURIType(faultAction)) ;
           
            final AttributedURIType to = faultAddressingContext.getTo() ;
            if (to != null)
            {
                if (!to.isValid())
                {
                    if (WSCLogger.arjLoggerI18N.isDebugEnabled())
                    {
                        WSCLogger.arjLoggerI18N.debug("com.arjuna.webservices.wsaddr2005.handlers.AddressingInterceptorHandler_5") ;
                    }
                }
                else
                {
                    final String toURI = to.getValue() ;
                    if (!AddressingConstants.WSA_ADDRESS_ANONYMOUS.equals(toURI))
                    {
                        if (!AddressingConstants.WSA_ADDRESS_NONE.equals(toURI))
                        {
                            try
View Full Code Here

     */
    public void invoke(final XMLStreamReader in, final MessageContext context)
        throws XMLStreamException, SoapFault
    {
        final QName headerName = in.getName() ;
        final AttributedURIType to = new AttributedURIType(in) ;
        final HandlerAddressingContext addressingContext = HandlerAddressingContext.getHandlerContext(context) ;
        if (!addressingContext.isFaultedTo())
        {
            if (addressingContext.getTo() != null)
            {
View Full Code Here

TOP

Related Classes of com.arjuna.webservices.wsaddr2005.EndpointReferenceType

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.