Java Code Examples for com.sun.xml.internal.ws.binding.BindingImpl#getAddressingVersion()

The following examples show how to use com.sun.xml.internal.ws.binding.BindingImpl#getAddressingVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Stub.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 2
Source File: Stub.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 3
Source File: Stub.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 4
Source File: Stub.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 5
Source File: Stub.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 6
Source File: Stub.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 7
Source File: Stub.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}
 
Example 8
Source File: Stub.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
    Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
    try {
        this.owner = owner;
        this.portInfo = portInfo;
        this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
        this.portname = portname;
        if (portname == null) {
            if (portInfo != null) {
                this.portname = portInfo.getPortName();
            } else if (wsdlPort != null) {
                this.portname = wsdlPort.getName();
            }
        }
        this.binding = binding;

        ComponentFeature cf = binding.getFeature(ComponentFeature.class);
        if (cf != null && Target.STUB.equals(cf.getTarget())) {
            components.add(cf.getComponent());
        }
        ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
        if (csf != null) {
            for (ComponentFeature cfi : csf.getComponentFeatures()) {
                if (Target.STUB.equals(cfi.getTarget()))
                    components.add(cfi.getComponent());
            }
        }

        // if there is an EPR, EPR's address should be used for invocation instead of default address
        if (epr != null) {
            this.requestContext.setEndPointAddressString(epr.getAddress());
        } else {
            this.requestContext.setEndpointAddress(defaultEndPointAddress);
        }
        this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
        this.endpointReference = epr;
        wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);

        this.cleanRequestContext = this.requestContext.copy();

        // ManagedObjectManager MUST be created before the pipeline
        // is constructed.

        managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);

        if (master != null) {
            this.tubes = new TubePool(master);
        } else {
            this.tubes = new TubePool(createPipeline(portInfo, binding));
        }

        addrVersion = binding.getAddressingVersion();

        // This needs to happen after createPipeline.
        // TBD: Check if it needs to happen outside the Stub constructor.
        managedObjectManager.resumeJMXRegistration();
    } finally {
        ContainerResolver.getDefault().exitContainer(old);
    }
}