FileDocCategorySizeDatePackage
ActionDumpPipe.javaAPI DocExample3856Tue May 29 17:13:52 BST 2007com.sun.xml.ws.assembler

ActionDumpPipe

public class ActionDumpPipe extends com.sun.xml.ws.api.pipe.helper.AbstractFilterPipeImpl
author
Arun Gupta

Fields Summary
private final String
name
private final com.sun.xml.ws.api.WSBinding
binding
Constructors Summary
public ActionDumpPipe(com.sun.xml.ws.api.WSBinding binding, com.sun.xml.ws.api.pipe.Pipe next)

        this("ActionDumpPipe", binding, next);
    
public ActionDumpPipe(String name, com.sun.xml.ws.api.WSBinding binding, com.sun.xml.ws.api.pipe.Pipe next)

        super(next);
        this.name = name;
        this.binding = binding;
    
private ActionDumpPipe(ActionDumpPipe that, com.sun.xml.ws.api.pipe.PipeCloner cloner)
Copy constructor.

        super(that, cloner);
        this.name = that.name;
        this.binding = that.binding;
    
Methods Summary
public com.sun.xml.ws.api.pipe.Pipecopy(com.sun.xml.ws.api.pipe.PipeCloner cloner)

        return new ActionDumpPipe(this, cloner);
    
protected voiddump(com.sun.xml.ws.api.message.Packet packet)

        if (packet.getMessage() != null)
            dumpAction(packet);
    
protected voiddumpAction(com.sun.xml.ws.api.message.Packet packet)

        try {
            Message m = packet.getMessage().copy();

            String to = m.getHeaders().getTo(binding.getAddressingVersion(), binding.getSOAPVersion());
            String action = m.getHeaders().getAction(binding.getAddressingVersion(), binding.getSOAPVersion());

            System.out.println("{To, Action}: {" + to + ", " + action + "}");
        } catch (Exception e) {
            e.printStackTrace();
        }
    
public com.sun.xml.ws.api.message.Packetprocess(com.sun.xml.ws.api.message.Packet packet)

        dump(packet);
        Packet reply = next.process(packet);
        dump(reply);
        return reply;