/** * @return the Service interface class name */ public String getInterfaceClassName() { if (_serviceInterfaceClassName == null || _serviceInterfaceClassName.length() == 0) { return NameUtil.toClassName(getName()); } return _serviceInterfaceClassName; }
/** * A convenience method to return a valid class name built from this * operation name. * * @return a valid class name built from the operation name. */ public String getClassName() { return NameUtil.toClassName(getName()); }
/** * @return the Service implementation class name */ public String getImplementationClassName() { if (_serviceImplementationClassName == null || _serviceImplementationClassName.length() == 0) { if (getName() == null) { return DEFAULT_IMPL_SUFFIX; } return NameUtil.toClassName(getName() + DEFAULT_IMPL_SUFFIX); } return _serviceImplementationClassName; }
/** * Root elements can be created with special methods in the JAXB object * factory. This method will use reflection to create a JAXBElement. * * @param objectFactory the JAXB object factory * @param elementName the XML element name * @param type an occurrence of the element type * @return a JAXBElement * @throws WebServiceInvokerException if the JAXBElement cannot be created */ private JAXBElement < ? > getJAXBElement(final Object objectFactory, final String elementName, final Object type) throws WebServiceInvokerException { try { String createName = "create" + NameUtil.toClassName(elementName); Method creator = objectFactory.getClass().getMethod(createName, type.getClass()); return (JAXBElement < ? >) creator.invoke(objectFactory, type); } catch (IllegalAccessException e) { throw new WebServiceInvokerException(e); } catch (SecurityException e) { throw new WebServiceInvokerException(e); } catch (NoSuchMethodException e) { throw new WebServiceInvokerException(e); } catch (IllegalArgumentException e) { throw new WebServiceInvokerException(e); } catch (InvocationTargetException e) { throw new WebServiceInvokerException(e); } }
/** * Create a typesafeEnumClass markup. This marks the simple Type as eligible * to become a separate Enum class. * * @param jaxbNamespace the JAXB namespace * @param jaxbNamespacePrefix the JAXB namespace prefix * @param xsdSimpleType the simple type to annotate * @param elementName the name of the element whose simple type we are * dealing with. */ protected void injectJaxbTypeSafeEnumClassAnnotation( final String jaxbNamespace, final String jaxbNamespacePrefix, final XmlSchemaSimpleType xsdSimpleType, final String elementName) { XmlSchemaAppInfo appInfo = getXmlSchemaAppInfo(xsdSimpleType); DocumentFragment markupParent = getMarkupParent(appInfo); Element typesafeEnumClassEl = getElement(markupParent, jaxbNamespace, jaxbNamespacePrefix, JAXB_TYPESAFEENUMCLASS); typesafeEnumClassEl.setAttribute(JAXB_TYPESAFEENUMCLASS_NAME, NameUtil.toClassName(elementName)); appInfo.setMarkup(markupParent.getChildNodes()); }
if (type instanceof XmlSchemaComplexType) { String rootClassName = NameUtil .toClassName(((XmlSchemaComplexType) type) .getName()); if (jaxbModel.getTypeNamePrefix() != null) {