com.sun.xml.internal.ws.resources.ProviderApiMessages Java Examples
The following examples show how to use
com.sun.xml.internal.ws.resources.ProviderApiMessages.
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: WSServiceDelegate.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #2
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #3
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #4
Source File: ProviderImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(EndpointReference endpointReference, Class<T> clazz, WebServiceFeature... webServiceFeatures) { /* final @NotNull MemberSubmissionEndpointReference msepr = EndpointReferenceUtil.transform(MemberSubmissionEndpointReference.class, endpointReference); WSService service = new WSServiceDelegate(msepr.toWSDLSource(), msepr.serviceName.name, Service.class); */ if(endpointReference == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); WSEndpointReference wsepr = new WSEndpointReference(endpointReference); WSEndpointReference.Metadata metadata = wsepr.getMetaData(); WSService service; if(metadata.getWsdlSource() != null) service = (WSService) createServiceDelegate(metadata.getWsdlSource(), metadata.getServiceName(), Service.class); else throw new WebServiceException("WSDL metadata is missing in EPR"); return service.getPort(wsepr, clazz, webServiceFeatures); }
Example #5
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #6
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #7
Source File: ProviderImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(EndpointReference endpointReference, Class<T> clazz, WebServiceFeature... webServiceFeatures) { /* final @NotNull MemberSubmissionEndpointReference msepr = EndpointReferenceUtil.transform(MemberSubmissionEndpointReference.class, endpointReference); WSService service = new WSServiceDelegate(msepr.toWSDLSource(), msepr.serviceName.name, Service.class); */ if(endpointReference == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); WSEndpointReference wsepr = new WSEndpointReference(endpointReference); WSEndpointReference.Metadata metadata = wsepr.getMetaData(); WSService service; if(metadata.getWsdlSource() != null) service = (WSService) createServiceDelegate(metadata.getWsdlSource(), metadata.getServiceName(), Service.class); else throw new WebServiceException("WSDL metadata is missing in EPR"); return service.getPort(wsepr, clazz, webServiceFeatures); }
Example #8
Source File: WSServiceDelegate.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #9
Source File: WSServiceDelegate.java From hottub with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #10
Source File: ProviderImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(EndpointReference endpointReference, Class<T> clazz, WebServiceFeature... webServiceFeatures) { /* final @NotNull MemberSubmissionEndpointReference msepr = EndpointReferenceUtil.transform(MemberSubmissionEndpointReference.class, endpointReference); WSService service = new WSServiceDelegate(msepr.toWSDLSource(), msepr.serviceName.name, Service.class); */ if(endpointReference == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); WSEndpointReference wsepr = new WSEndpointReference(endpointReference); WSEndpointReference.Metadata metadata = wsepr.getMetaData(); WSService service; if(metadata.getWsdlSource() != null) service = (WSService) createServiceDelegate(metadata.getWsdlSource(), metadata.getServiceName(), Service.class); else throw new WebServiceException("WSDL metadata is missing in EPR"); return service.getPort(wsepr, clazz, webServiceFeatures); }
Example #11
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #12
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #13
Source File: WSServiceDelegate.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #14
Source File: WSServiceDelegate.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #15
Source File: WSServiceDelegate.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #16
Source File: WSServiceDelegate.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #17
Source File: WSServiceDelegate.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #18
Source File: WSServiceDelegate.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { //get the portType from SEI QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); WSDLService tmpWsdlService = this.wsdlService; if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); if (port == null) { throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); } QName portName = port.getName(); return getPort(portName, portInterface,features); }
Example #19
Source File: WSServiceDelegate.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { if (portName == null || portInterface == null) throw new IllegalArgumentException(); WSDLService tWsdlService = this.wsdlService; if (tWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei tWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy if (tWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } WSDLPort portModel = getPortModel(tWsdlService, portName); return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); }
Example #20
Source File: WSServiceDelegate.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #21
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #22
Source File: WSServiceDelegate.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #23
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #24
Source File: WSServiceDelegate.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #25
Source File: WSServiceDelegate.java From hottub with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #26
Source File: WSServiceDelegate.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #27
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private QName addPortEpr(WSEndpointReference wsepr) { if (wsepr == null) throw new WebServiceException(ProviderApiMessages.NULL_EPR()); QName eprPortName = getPortNameFromEPR(wsepr, null); //add Port, if it does n't exist; // TODO: what if it has different epr address? { PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName, getPortModel(wsdlService, eprPortName).getBinding().getBindingId()); if (!ports.containsKey(eprPortName)) { ports.put(eprPortName, portInfo); } } return eprPortName; }
Example #28
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * * @param wsepr EndpointReference from which portName will be extracted. * If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName * @param portTypeName * should be null in dispatch case * should be non null in SEI case * @return * port name from EPR after validating various metadat elements. * Also if service instance does n't have wsdl, * then it gets the WSDL metadata from EPR and builds wsdl model. */ private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) { QName portName; WSEndpointReference.Metadata metadata = wsepr.getMetaData(); QName eprServiceName = metadata.getServiceName(); QName eprPortName = metadata.getPortName(); if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) { throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n" + " The two Service QNames must match"); } if (wsdlService == null) { Source eprWsdlSource = metadata.getWsdlSource(); if (eprWsdlSource == null) { throw new WebServiceException(ProviderApiMessages.NULL_WSDL()); } try { WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null); wsdlService = eprWsdlMdl.getService(serviceName); if (wsdlService == null) throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName, buildNameList(eprWsdlMdl.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress())); } } portName = eprPortName; if (portName == null && portTypeName != null) { //get the first port corresponding to the SEI WSDLPort port = wsdlService.getMatchingPort(portTypeName); if (port == null) throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); portName = port.getName(); } if (portName == null) throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME()); if (wsdlService.get(portName) == null) throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames())); return portName; }
Example #29
Source File: WSServiceDelegate.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * * @param wsepr EndpointReference from which portName will be extracted. * If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName * @param portTypeName * should be null in dispatch case * should be non null in SEI case * @return * port name from EPR after validating various metadat elements. * Also if service instance does n't have wsdl, * then it gets the WSDL metadata from EPR and builds wsdl model. */ private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) { QName portName; WSEndpointReference.Metadata metadata = wsepr.getMetaData(); QName eprServiceName = metadata.getServiceName(); QName eprPortName = metadata.getPortName(); if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) { throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n" + " The two Service QNames must match"); } if (wsdlService == null) { Source eprWsdlSource = metadata.getWsdlSource(); if (eprWsdlSource == null) { throw new WebServiceException(ProviderApiMessages.NULL_WSDL()); } try { WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null); wsdlService = eprWsdlMdl.getService(serviceName); if (wsdlService == null) throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName, buildNameList(eprWsdlMdl.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress())); } } portName = eprPortName; if (portName == null && portTypeName != null) { //get the first port corresponding to the SEI WSDLPort port = wsdlService.getMatchingPort(portTypeName); if (port == null) throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); portName = port.getName(); } if (portName == null) throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME()); if (wsdlService.get(portName) == null) throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames())); return portName; }
Example #30
Source File: WSServiceDelegate.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * * @param wsepr EndpointReference from which portName will be extracted. * If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName * @param portTypeName * should be null in dispatch case * should be non null in SEI case * @return * port name from EPR after validating various metadat elements. * Also if service instance does n't have wsdl, * then it gets the WSDL metadata from EPR and builds wsdl model. */ private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) { QName portName; WSEndpointReference.Metadata metadata = wsepr.getMetaData(); QName eprServiceName = metadata.getServiceName(); QName eprPortName = metadata.getPortName(); if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) { throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n" + " The two Service QNames must match"); } if (wsdlService == null) { Source eprWsdlSource = metadata.getWsdlSource(); if (eprWsdlSource == null) { throw new WebServiceException(ProviderApiMessages.NULL_WSDL()); } try { WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null); wsdlService = eprWsdlMdl.getService(serviceName); if (wsdlService == null) throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName, buildNameList(eprWsdlMdl.getServices().keySet()))); } catch (MalformedURLException e) { throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress())); } } portName = eprPortName; if (portName == null && portTypeName != null) { //get the first port corresponding to the SEI WSDLPort port = wsdlService.getMatchingPort(portTypeName); if (port == null) throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); portName = port.getName(); } if (portName == null) throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME()); if (wsdlService.get(portName) == null) throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames())); return portName; }