gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-26 11:21:05 25 4
gpt4 key购买 nike

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

WebMethod.getWebParameters介绍

[英]The list of web parameters for this method.
[中]此方法的web参数列表。

代码示例

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

public Collection<WebMessagePart> getParts() {
 ArrayList<WebMessagePart> parts = new ArrayList<WebMessagePart>();
 for (WebParam webParam : this.webMethod.getWebParameters()) {
  if ((!webParam.isHeader()) && (webParam.isInput())) {
   parts.add(webParam);
  }
 }
 return parts;
}

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

public Collection<WebMessagePart> getParts() {
 ArrayList<WebMessagePart> parts = new ArrayList<WebMessagePart>();
 for (WebParam webParam : this.webMethod.getWebParameters()) {
  if ((!webParam.isHeader()) && (webParam.isInput())) {
   parts.add(webParam);
  }
 }
 return parts;
}

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

/**
 * The web parameters for the method that this is wrapping.
 *
 * @return The web parameters for the method that this is wrapping.
 */
public Collection<ImplicitChildElement> getChildElements() {
 Collection<ImplicitChildElement> childElements = new ArrayList<ImplicitChildElement>();
 for (WebParam webParam : webMethod.getWebParameters()) {
  if (webParam.isInput() && !webParam.isHeader()) {
   childElements.add(webParam);
  }
 }
 return childElements;
}

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

/**
 * The web parameters for the method that this is wrapping.
 *
 * @return The web parameters for the method that this is wrapping.
 */
public Collection<ImplicitChildElement> getChildElements() {
 Collection<ImplicitChildElement> childElements = new ArrayList<ImplicitChildElement>();
 for (WebParam webParam : webMethod.getWebParameters()) {
  if (webParam.isInput() && !webParam.isHeader()) {
   childElements.add(webParam);
  }
 }
 return childElements;
}

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

public Collection<WebMessagePart> getParts() {
 ArrayList<WebMessagePart> parts = new ArrayList<WebMessagePart>();
 for (WebParam webParam : this.webMethod.getWebParameters()) {
  if ((webParam.isOutput()) && (!webParam.isHeader())) {
   parts.add(webParam);
  }
 }
 TypeMirror returnType = this.webMethod.getReturnType();
 if (!(returnType instanceof VoidType)) {
  parts.add(this.webMethod.getWebResult());
 }
 return parts;
}

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

public Collection<WebMessagePart> getParts() {
 ArrayList<WebMessagePart> parts = new ArrayList<WebMessagePart>();
 for (WebParam webParam : this.webMethod.getWebParameters()) {
  if ((webParam.isOutput()) && (!webParam.isHeader())) {
   parts.add(webParam);
  }
 }
 TypeMirror returnType = this.webMethod.getReturnType();
 if (!(returnType instanceof VoidType)) {
  parts.add(this.webMethod.getWebResult());
 }
 return parts;
}

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

/**
 * The collection of output parameters for this response.
 *
 * @return The collection of output parameters for this response.
 */
public Collection<ImplicitChildElement> getChildElements() {
 Collection<ImplicitChildElement> childElements = new ArrayList<ImplicitChildElement>();
 if (!(webMethod.getReturnType() instanceof VoidType)) {
  WebResult webResult = webMethod.getWebResult();
  if (!webResult.isHeader()) {
   childElements.add(webResult);
  }
 }
 for (WebParam webParam : webMethod.getWebParameters()) {
  if (webParam.isOutput() && !webParam.isHeader()) {
   childElements.add(webParam);
  }
 }
 return childElements;
}

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

/**
 * The collection of output parameters for this response.
 *
 * @return The collection of output parameters for this response.
 */
public Collection<ImplicitChildElement> getChildElements() {
 Collection<ImplicitChildElement> childElements = new ArrayList<ImplicitChildElement>();
 if (!(webMethod.getReturnType() instanceof VoidType)) {
  WebResult webResult = webMethod.getWebResult();
  if (!webResult.isHeader()) {
   childElements.add(webResult);
  }
 }
 for (WebParam webParam : webMethod.getWebParameters()) {
  if (webParam.isOutput() && !webParam.isHeader()) {
   childElements.add(webParam);
  }
 }
 return childElements;
}

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

/**
 * Adds any type definitions referenced by a web method.
 *
 * @param webMethod The web method.
 */
protected void addReferencedTypeDefinitions(WebMethod webMethod) {
 REFERENCE_STACK.get().addFirst("\"see also\" annotation");
 addSeeAlsoTypeDefinitions(webMethod);
 REFERENCE_STACK.get().removeFirst();
 WebResult result = webMethod.getWebResult();
 REFERENCE_STACK.get().addFirst("return type");
 addReferencedTypeDefinitions(result.isAdapted() ? result.getAdapterType() : result.getType());
 REFERENCE_STACK.get().removeFirst();
 for (WebParam webParam : webMethod.getWebParameters()) {
  REFERENCE_STACK.get().addFirst("parameter " + webParam.getSimpleName());
  addReferencedTypeDefinitions(webParam.isAdapted() ? webParam.getAdapterType() : webParam.getType());
  REFERENCE_STACK.get().removeFirst();
 }
 for (WebFault webFault : webMethod.getWebFaults()) {
  REFERENCE_STACK.get().addFirst("thrown fault " + webFault.getSimpleName());
  addReferencedTypeDefinitions(webFault);
  REFERENCE_STACK.get().removeFirst();
 }
}

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

@Override
public ValidationResult validateEndpointInterface(EndpointInterface ei) {
 ValidationResult result = new ValidationResult();
 HashSet<String> uniqueMethodNames = new HashSet<String>();
 for (WebMethod webMethod : ei.getWebMethods()) {
  if (!uniqueMethodNames.add(webMethod.getSimpleName())) {
   result.addError(webMethod, "Sorry, the xfire client module doesn't support overloaded methods yet.  Unfortunately, each method has " +
    "to have a unique name.");
  }
  for (WebParam webParam : webMethod.getWebParameters()) {
   if (webParam.isOutput()) {
    //todo: add support for in in/out parameters.
    result.addError(webParam, "The xfire client module doesn't support IN/OUT or OUT parameters yet....");
   }
  }
 }
 return result;
}

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

@Override
public ValidationResult validateEndpointInterface(EndpointInterface ei) {
 ValidationResult result = new ValidationResult();
 HashSet<String> uniqueMethodNames = new HashSet<String>();
 for (WebMethod webMethod : ei.getWebMethods()) {
  if (!uniqueMethodNames.add(webMethod.getSimpleName())) {
   result.addError(webMethod.getPosition(), "Sorry, the xfire client module doesn't support overloaded methods yet.  Unfortunately, each method has " +
    "to have a unique name.");
  }
  for (WebParam webParam : webMethod.getWebParameters()) {
   if (webParam.isOutput()) {
    //todo: add support for in in/out parameters.
    result.addError(webParam.getPosition(), "The xfire client module doesn't support IN/OUT or OUT parameters yet....");
   }
  }
 }
 return result;
}

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

@Override
public ValidationResult validateEndpointInterface(EndpointInterface ei) {
 ValidationResult result = super.validateEndpointInterface(ei);
 EndpointInterface visited = visitedEndpoints.put(ei.getServiceName(), ei);
 if (visited != null) {
  if (visited.getTargetNamespace().equals(ei.getTargetNamespace())) {
   result.addError(ei.getPosition(), "Ummm... you already have a service named " + ei.getServiceName() + " at " +
    visited.getPosition() + ".  You need to disambiguate.");
  }
 }
 for (WebMethod webMethod : ei.getWebMethods()) {
  for (WebParam webParam : webMethod.getWebParameters()) {
   if ((webParam.isHeader()) && ("".equals(webParam.getAnnotation(javax.jws.WebParam.class).name()))) {
    //todo: lift this constraint by serializing the parameter names to some file you can load for metadata...
    result.addError(webParam.getPosition(), "For now, Enunciate requires you to specify a 'name' on the @WebParam annotation if it's a header.");
   }
  }
 }
 return result;
}

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

result.addError(webMethod, "AMF doesn't support '" + webMethod.getWebResult() + "' as a return type.");
for (WebParam webParam : webMethod.getWebParameters()) {
 if (!isSupported(webParam.getType())) {
  result.addError(webParam, "AMF doesn't support '" + webParam.getType() + "' as a parameter type.");

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

@Override
public ValidationResult validateEndpointInterface(EndpointInterface ei) {
 ValidationResult result = super.validateEndpointInterface(ei);
 if (!isAMFTransient(ei)) {
  for (WebMethod webMethod : ei.getWebMethods()) {
   if (!isAMFTransient(webMethod)) {
    if (!isSupported(webMethod.getWebResult())) {
     result.addError(webMethod.getPosition(), "AMF doesn't support '" + webMethod.getWebResult() + "' as a return type.");
    }
    for (WebParam webParam : webMethod.getWebParameters()) {
     if (!isSupported(webParam.getType())) {
      result.addError(webParam.getPosition(), "AMF doesn't support '" + webParam.getType() + "' as a parameter type.");
     }
    }
   }
  }
  if (ei.getEndpointImplementations().size() > 1) {
   ArrayList<String> impls = new ArrayList<String>();
   for (EndpointImplementation impl : ei.getEndpointImplementations()) {
    impls.add(impl.getQualifiedName());
   }
   result.addError(ei.getPosition(), "Sorry, AMF doesn't support two endpoint implementations for interface '" + ei.getQualifiedName() +
    "'.  Found " + ei.getEndpointImplementations().size() + " implementations (" + impls.toString() + ").");
  }
 }
 
 return result;
}

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

result.addError(webMethod, "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
for (WebParam webParam : webMethod.getWebParameters()) {
 if (!isSupported(webParam.getType())) {
  result.addError(webParam, "GWT doesn't support '" + webParam.getType() + "' as a parameter type.");

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

Collection<WebParam> params = webMethod.getWebParameters();
for (WebParam param : params) {
 if (!param.isHeader()) {

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

result.addError(webMethod.getPosition(), "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
for (WebParam webParam : webMethod.getWebParameters()) {
 if (!isSupported(webParam.getType())) {
  result.addError(webParam.getPosition(), "GWT doesn't support '" + webParam.getType() + "' as a parameter type.");

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

for (WebParam webParam : webMethod.getWebParameters()) {
 if (webParam.getType() instanceof MapType) {
  result.addError(webParam, "There's a bug in JAXB ruining support for maps in return values or in parameters.  For more information, see " +

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

for (WebParam webParam : webMethod.getWebParameters()) {
 if (webParam.getType() instanceof MapType) {
  result.addError(webParam.getPosition(), "For some reason, JAXB doesn't support maps in return values or in parameters.  Still need to investigate further the reason....");

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

Map<String, Declaration> paramsByName = new HashMap<String, Declaration>();
for (WebMethod webMethod : ei.getWebMethods()) {
 for (WebParam webParam : webMethod.getWebParameters()) {

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com