org.codehaus.enunciate.contract.jaxws.WebFault.getPackage()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(62)

本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebFault.getPackage()方法的一些代码示例,展示了WebFault.getPackage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebFault.getPackage()方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxws.WebFault
类名称:WebFault
方法名:getPackage

WebFault.getPackage介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

/**
 * Calculates a namespace URI for a given package.  Default implementation uses the algorithm defined in
 * section 3.2 of the jax-ws spec.
 *
 * @return The calculated namespace uri.
 */
protected String calculateNamespaceURI() {
 PackageDeclaration pkg = getPackage();
 if ((pkg == null) || ("".equals(pkg.getQualifiedName()))) {
  throw new ValidationException(getPosition(), "A web service in no package must specify a target namespace.");
 }
 String[] tokens = pkg.getQualifiedName().split("\\.");
 String uri = "http://";
 for (int i = tokens.length - 1; i >= 0; i--) {
  uri += tokens[i];
  if (i != 0) {
   uri += ".";
  }
 }
 uri += "/";
 return uri;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * Calculates a namespace URI for a given package.  Default implementation uses the algorithm defined in
 * section 3.2 of the jax-ws spec.
 *
 * @return The calculated namespace uri.
 */
protected String calculateNamespaceURI() {
 PackageDeclaration pkg = getPackage();
 if ((pkg == null) || ("".equals(pkg.getQualifiedName()))) {
  throw new ValidationException(getPosition(), getQualifiedName() + ": a web fault in no package must specify a target namespace.");
 }
 String[] tokens = pkg.getQualifiedName().split("\\.");
 String uri = "http://";
 for (int i = tokens.length - 1; i >= 0; i--) {
  uri += tokens[i];
  if (i != 0) {
   uri += ".";
  }
 }
 uri += "/";
 return uri;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * The qualified name of the implicit fault bean of this web fault, or null if this web fault
 * does not define an implicit faul bean.
 *
 * @return The qualified name of the implicit fault bean of this web fault.
 */
public String getImplicitFaultBeanQualifiedName() {
 String faultBean = null;
 if (isImplicitSchemaElement()) {
  faultBean = getPackage().getQualifiedName() + ".jaxws." + getSimpleName() + "Bean";
  if ((annotation != null) && (annotation.faultBean() != null) && (!"".equals(annotation.faultBean()))) {
   faultBean = annotation.faultBean();
  }
 }
 return faultBean;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

/**
 * The qualified name of the implicit fault bean of this web fault, or null if this web fault
 * does not define an implicit faul bean.
 *
 * @return The qualified name of the implicit fault bean of this web fault.
 */
public String getImplicitFaultBeanQualifiedName() {
 String faultBean = null;
 if (isImplicitSchemaElement()) {
  faultBean = getPackage().getQualifiedName() + ".jaxws." + getSimpleName() + "Bean";
  if ((annotation != null) && (annotation.faultBean() != null) && (!"".equals(annotation.faultBean()))) {
   faultBean = annotation.faultBean();
  }
 }
 return faultBean;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-csharp

String pckg = webFault.getPackage().getQualifiedName();
if (!this.packageToNamespaceConversions.containsKey(pckg)) {
 this.packageToNamespaceConversions.put(pckg, packageToNamespace(pckg));

代码示例来源:origin: org.codehaus.enunciate/enunciate-gwt

if ((this.enforceNamespaceConformance) && (!fault.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace)) && (!isKnownGwtType(fault))) {
 result.addError(fault, String.format("The package of the fault, %s, must start with the GWT module namespace, %s.", fault.getPackage().getQualifiedName(), gwtModuleNamespace));

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

if ((this.enforceNamespaceConformance) && (!fault.getPackage().getQualifiedName().startsWith(this.gwtModuleNamespace))) {
 result.addError(fault.getPosition(), String.format("The package of the fault, %s, must start with the GWT module namespace, %s.", fault.getPackage().getQualifiedName(), gwtModuleNamespace));

代码示例来源:origin: org.codehaus.enunciate/enunciate-gwt

String pckg = webFault.getPackage().getQualifiedName();
if (!pckg.startsWith(this.rpcModuleNamespace) && !conversions.containsKey(pckg) && (getKnownGwtModule(webFault) == null)) {
 conversions.put(pckg, clientNamespace + "." + pckg);

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

String pckg = webFault.getPackage().getQualifiedName();
if (!conversions.containsKey(pckg)) {
 conversions.put(pckg, pckg + "." + clientNamespace);

相关文章