/** * Gets wsdl from @WebService or @WebServiceProvider */ private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) { // Takes care of @WebService, @WebServiceProvider's wsdlLocation EndpointFactory.verifyImplementorClass(implClass, metadataReader); String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader); if (wsdlLocation != null) { return SDDocumentSource.create(implClass, wsdlLocation); } return null; }
/** * If portName is not already set via DD or programmatically, it uses * annotations on implementorClass to get PortName. * * @return non-null port name */ public static @NotNull QName getDefaultPortName(QName serviceName, Class<?> implType) { return getDefaultPortName(serviceName, implType, null); }
/** * If service name is not already set via DD or programmatically, it uses * annotations {@link WebServiceProvider}, {@link WebService} on implementorClass to get PortName. * * @return non-null service name */ public static @NotNull QName getDefaultServiceName(Class<?> implType) { return getDefaultServiceName(implType, null); }
MetadataReader metadataReader = getExternalMetadatReader(implType, binding); verifyImplementorClass(implType, metadataReader); serviceName = getDefaultServiceName(implType, metadataReader); portName = getDefaultPortName(serviceName,implType, metadataReader); verifyPrimaryWSDL(primaryWsdl, serviceName); Collection<SDDocumentImpl> docList = categoriseMetadata(md.iterator(), serviceName, portTypeName); SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); if (isUseProviderTube(implType, isStandard)) { terminal = createProviderInvokerTube(implType, binding, invoker, container); } else { seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding, primaryDoc); if(binding instanceof SOAPBindingImpl){ primaryDoc = generateWSDL(binding, seiModel, docList, container, implType); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); seiModel.freeze(wsdlPort);
EndpointFactory.verifyImplementorClass(endpointConfiguration.getImplementation(), metadataReader); serviceQName = new QName(annotation.targetNamespace(), annotation.serviceName()); } else { serviceQName = EndpointFactory.getDefaultServiceName(endpointConfiguration.getImplementation(), metadataReader); portQName = new QName(annotation.targetNamespace(), annotation.portName()); } else { portQName = EndpointFactory.getDefaultPortName(serviceQName, implementationClass, metadataReader); .orElse(EndpointFactory.getWsdlLocation(implementationClass, metadataReader)); if (wsdlPath.isEmpty()) { throw SeedException.createNew(WSErrorCode.WSDL_LOCATION_MISSING)
serviceName = EndpointFactory.getDefaultServiceName(implementorClass, metadataReader); portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass, metadataReader); EndpointFactory.verifyImplementorClass(implementorClass, metadataReader); SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass, metadataReader);
/** * Returns the wsdl from @WebService, or @WebServiceProvider annotation using * wsdlLocation element. * * @param implType * endpoint implementation class * make sure that you called {@link #verifyImplementorClass} on it. * @return wsdl if there is wsdlLocation, else null */ public static @Nullable String getWsdlLocation(Class<?> implType) { return getWsdlLocation(implType, new ReflectAnnotationReader()); }
public static <T> WSEndpoint<T> createEndpoint( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) { EndpointFactory factory = container != null ? container.getSPI(EndpointFactory.class) : null; if (factory == null) factory = EndpointFactory.getInstance(); return factory.create( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard); }
/** * Verifies if the endpoint implementor class has @WebService or @WebServiceProvider * annotation * * @return * true if it is a Provider or AsyncProvider endpoint * false otherwise * @throws java.lang.IllegalArgumentException * If it doesn't have any one of @WebService or @WebServiceProvider * If it has both @WebService and @WebServiceProvider annotations */ public static boolean verifyImplementorClass(Class<?> clz) { return verifyImplementorClass(clz, null); }
EndpointFactory.createEndpoint( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);
MetadataReader metadataReader = getExternalMetadatReader(implType, binding); verifyImplementorClass(implType, metadataReader); serviceName = getDefaultServiceName(implType, metadataReader); portName = getDefaultPortName(serviceName,implType, metadataReader); verifyPrimaryWSDL(primaryWsdl, serviceName); Collection<SDDocumentImpl> docList = categoriseMetadata(md.iterator(), serviceName, portTypeName); SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); if (isUseProviderTube(implType, isStandard)) { terminal = createProviderInvokerTube(implType, binding, invoker, container); } else { seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding, primaryDoc); if(binding instanceof SOAPBindingImpl){ primaryDoc = generateWSDL(binding, seiModel, docList, container, implType); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); seiModel.freeze(wsdlPort);
serviceName = EndpointFactory.getDefaultServiceName(implementorClass, metadataReader); portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass, metadataReader); EndpointFactory.verifyImplementorClass(implementorClass, metadataReader); SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass, metadataReader);
/** * Returns the wsdl from @WebService, or @WebServiceProvider annotation using * wsdlLocation element. * * @param implType * endpoint implementation class * make sure that you called {@link #verifyImplementorClass} on it. * @return wsdl if there is wsdlLocation, else null */ public static @Nullable String getWsdlLocation(Class<?> implType) { return getWsdlLocation(implType, new ReflectAnnotationReader()); }
public static <T> WSEndpoint<T> createEndpoint( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) { EndpointFactory factory = container != null ? container.getSPI(EndpointFactory.class) : null; if (factory == null) factory = EndpointFactory.getInstance(); return factory.create( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard); }
/** * Verifies if the endpoint implementor class has @WebService or @WebServiceProvider * annotation * * @return * true if it is a Provider or AsyncProvider endpoint * false otherwise * @throws java.lang.IllegalArgumentException * If it doesn't have any one of @WebService or @WebServiceProvider * If it has both @WebService and @WebServiceProvider annotations */ public static boolean verifyImplementorClass(Class<?> clz) { return verifyImplementorClass(clz, null); }
EndpointFactory.createEndpoint( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);
MetadataReader metadataReader = getExternalMetadatReader(implType, binding); verifyImplementorClass(implType, metadataReader); serviceName = getDefaultServiceName(implType, metadataReader); portName = getDefaultPortName(serviceName,implType, metadataReader); verifyPrimaryWSDL(primaryWsdl, serviceName); Collection<SDDocumentImpl> docList = categoriseMetadata(md.iterator(), serviceName, portTypeName); SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); if (isUseProviderTube(implType, isStandard)) { terminal = createProviderInvokerTube(implType, binding, invoker, container); } else { seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding, primaryDoc); if(binding instanceof SOAPBindingImpl){ primaryDoc = generateWSDL(binding, seiModel, docList, container, implType); wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); seiModel.freeze(wsdlPort);
/** * Gets wsdl from @WebService or @WebServiceProvider */ private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) { // Takes care of @WebService, @WebServiceProvider's wsdlLocation EndpointFactory.verifyImplementorClass(implClass, metadataReader); String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader); if (wsdlLocation != null) { return SDDocumentSource.create(implClass, wsdlLocation); } return null; }
serviceName = EndpointFactory.getDefaultServiceName(implementorClass, metadataReader); portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass, metadataReader); EndpointFactory.verifyImplementorClass(implementorClass, metadataReader); SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass, metadataReader);
/** * Returns the wsdl from @WebService, or @WebServiceProvider annotation using * wsdlLocation element. * * @param implType * endpoint implementation class * make sure that you called {@link #verifyImplementorClass} on it. * @return wsdl if there is wsdlLocation, else null */ public static @Nullable String getWsdlLocation(Class<?> implType) { return getWsdlLocation(implType, new ReflectAnnotationReader()); }