Java Code Examples for com.sun.xml.internal.ws.api.server.SDDocument#WSDL
The following examples show how to use
com.sun.xml.internal.ws.api.server.SDDocument#WSDL .
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: EndpointFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 2
Source File: EndpointFactory.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 3
Source File: WSDLGenResolver.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 4
Source File: EndpointFactory.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 5
Source File: EndpointFactory.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 6
Source File: WSDLGenResolver.java From hottub with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 7
Source File: EndpointFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull Collection<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 8
Source File: EndpointFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 9
Source File: WSDLGenResolver.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull Collection<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 10
Source File: EndpointFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 11
Source File: WSDLGenResolver.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 12
Source File: WSDLGenResolver.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 13
Source File: EndpointFactory.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 14
Source File: EndpointFactory.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 15
Source File: EndpointFactory.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 16
Source File: EndpointFactory.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 17
Source File: EndpointFactory.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }
Example 18
Source File: WSDLGenResolver.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) { this.docs = docs; this.serviceName = serviceName; this.portTypeName = portTypeName; for (SDDocumentImpl doc : docs) { if(doc.isWSDL()) { SDDocument.WSDL wsdl = (SDDocument.WSDL) doc; if(wsdl.hasPortType()) abstractWsdl = doc; } if(doc.isSchema()) { SDDocument.Schema schema = (SDDocument.Schema) doc; List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace()); if (sysIds == null) { sysIds = new ArrayList<SDDocumentImpl>(); nsMapping.put(schema.getTargetNamespace(), sysIds); } sysIds.add(doc); } } }
Example 19
Source File: EndpointFactory.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example 20
Source File: EndpointFactory.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Verifies whether the given primaryWsdl contains the given serviceName. * If the WSDL doesn't have the service, it throws an WebServiceException. */ private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) { SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null); if (!(primaryDoc instanceof SDDocument.WSDL)) { throw new WebServiceException(primaryWsdl.getSystemId()+ " is not a WSDL. But it is passed as a primary WSDL"); } SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc; if (!wsdlDoc.hasService()) { if(wsdlDoc.getAllServices().isEmpty()) throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+ " since it doesn't have Service "+serviceName); else throw new WebServiceException("WSDL "+primaryDoc.getSystemId() +" has the following services "+wsdlDoc.getAllServices() +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?"); } }