FileDocCategorySizeDatePackage
ProviderInOnly.javaAPI DocGlassfish v2 API5314Fri May 04 22:30:28 BST 2007com.sun.enterprise.jbi.serviceengine.comm

ProviderInOnly

public class ProviderInOnly extends MessageExchangeTransportImpl
This class handles sending message to & receiving message from NMR when 1) Role of the component is Provider. 2) Message exchange pattern is In-Only.
author
bhavanishankar@dev.java.net

Fields Summary
protected javax.jbi.messaging.InOnly
me
Constructors Summary
public ProviderInOnly(javax.jbi.messaging.InOnly me)

        super(me);
        this.me = me;
    
Methods Summary
public UnWrappedMessagereceive(com.sun.enterprise.jbi.serviceengine.util.soap.EndpointMetaData emd)

        NormalizedMessage normalizedMessage = receiveNormalized();
        UnWrappedMessage unwrappedMessage = null;
        if(normalizedMessage != null) {
            try {
                String operationName = me.getOperation().getLocalPart();
                
                unwrappedMessage = new UnWrappedMessage();
                unwrappedMessage.setNormalizedMessage(normalizedMessage);
                
                if(normalizedMessage instanceof Fault) {
                    unwrappedMessage.unwrapFault();
                } else {
                    unwrappedMessage.setWSDLMessageType(
                            new QName(
                            emd.getInputMessage(operationName).getQName().getNamespaceURI(),
                            operationName));
                    
                    unwrappedMessage.setWSDLBindingStyle(
                            emd.getBindingStyle(operationName));
                    
                    unwrappedMessage.setWSDLOrderedParts(
                            emd.getInputMessage(operationName).getOrderedParts(null));
                    
                    unwrappedMessage.setWSDLPartBindings(
                            emd.getInputPartBindings(operationName));
                    
                    unwrappedMessage.unwrap();
                }
            } catch(Exception ex) {
                logger.log(Level.INFO, ex.getMessage());
            }
        }
        return unwrappedMessage;
    
public javax.jbi.messaging.NormalizedMessagereceiveNormalized()

        msg = me.getInMessage();
        preReceive();
        return msg;
    
public voidsend(javax.jbi.messaging.NormalizedMessage response)

        me.setStatus(ExchangeStatus.DONE);
        send();
    
public voidsend(com.sun.xml.ws.api.message.Message abstractMessage, com.sun.enterprise.jbi.serviceengine.util.soap.EndpointMetaData emd)

        if(abstractMessage != null && abstractMessage.isFault()) {
            try {
                String s =UnWrappedMessage.toString(abstractMessage.readPayload());
                logger.log(Level.SEVERE, s); // log the fault message
            } catch (XMLStreamException e) {
                //Can't do anything here
            }
            sendError(null);
        } else {
            send(null);
        }