- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebMethod.getWebResult()
方法的一些代码示例,展示了WebMethod.getWebResult()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebMethod.getWebResult()
方法的具体详情如下:
包路径:org.codehaus.enunciate.contract.jaxws.WebMethod
类名称:WebMethod
方法名:getWebResult
[英]The web result of this web method.
[中]此web方法的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.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-core
/**
* Finds an example resource method, according to the following preference order:
*
* <ol>
* <li>The first method annotated with {@link DocumentationExample}.
* <li>The first web method that returns a declared type.
* <li>The first web method.
* </ol>
*
* @return An example resource method, or if no good examples were found.
*/
public WebMethod findExampleWebMethod() {
WebMethod example = null;
for (EndpointInterface ei : this.endpointInterfaces) {
for (WebMethod method : ei.getWebMethods()) {
if (method.getAnnotation(DocumentationExample.class) != null && !method.getAnnotation(DocumentationExample.class).exclude()) {
return method;
}
else if (method.getWebResult() != null && method.getWebResult().getType() instanceof DeclaredType
&& (example == null || example.getWebResult() == null || (!(example.getWebResult().getType() instanceof DeclaredType)))) {
example = method;
}
else {
//we'll prefer the first one we find with an output.
example = example == null ? method : example;
}
}
}
return example;
}
代码示例来源: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
/**
* 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-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-amf
for (WebMethod webMethod : ei.getWebMethods()) {
if (!isAMFTransient(webMethod)) {
if (!isSupported(webMethod.getWebResult())) {
result.addError(webMethod, "AMF doesn't support '" + webMethod.getWebResult() + "' as a return 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-full
imports.add(classnameFor.convert((ImplicitChildElement) webMethod.getWebResult()));
addComponentTypes(returnType, imports);
DecoratedTypeMirror returnType = (DecoratedTypeMirror) webMethod.getReturnType();
if (!returnType.isVoid()) {
imports.add(classnameFor.convert((ImplicitChildElement) webMethod.getWebResult()));
addComponentTypes(returnType, imports);
代码示例来源:origin: org.codehaus.enunciate/enunciate-gwt
if (!isSupported(webMethod.getWebResult())) {
result.addError(webMethod, "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
if (!isSupported(webMethod.getWebResult())) {
result.addError(webMethod.getPosition(), "GWT doesn't support '" + webMethod.getWebResult() + "' as a return type.");
代码示例来源:origin: org.codehaus.enunciate/enunciate-amf
imports.add(classnameFor.convert((ImplicitChildElement) webMethod.getWebResult()));
addComponentTypes(returnType, imports);
DecoratedTypeMirror returnType = (DecoratedTypeMirror) webMethod.getReturnType();
if (!returnType.isVoid()) {
imports.add(classnameFor.convert((ImplicitChildElement) webMethod.getWebResult()));
addComponentTypes(returnType, imports);
代码示例来源:origin: org.codehaus.enunciate/enunciate-csharp
/**
* Gets the client-side package for the type, type declaration, package, or their string values.
*
* @param list The arguments.
* @return The string value of the client-side package.
*/
public Object exec(List list) throws TemplateModelException {
if (list.size() < 1) {
throw new TemplateModelException("The responseDocumentQName method method must have a web method as a parameter.");
}
TemplateModel from = (TemplateModel) list.get(0);
Object unwrapped = BeansWrapper.getDefaultInstance().unwrap(from);
if (!(unwrapped instanceof WebMethod)) {
throw new TemplateModelException("A web method must be provided.");
}
WebMethod webMethod = (WebMethod) unwrapped;
if (webMethod.getSoapBindingStyle() != SOAPBinding.Style.DOCUMENT || webMethod.getSoapUse() != SOAPBinding.Use.LITERAL) {
throw new TemplateModelException("No response document qname available for a " + webMethod.getSoapBindingStyle() + "/" + webMethod.getSoapUse() + " web method.");
}
if (webMethod.getResponseWrapper() != null) {
return new QName(webMethod.getResponseWrapper().getElementNamespace(), webMethod.getResponseWrapper().getElementName());
}
else if (webMethod.getSoapParameterStyle() == SOAPBinding.ParameterStyle.BARE) {
WebResult wr = webMethod.getWebResult();
if (!wr.isHeader()) {
return new QName(wr.getTargetNamespace(), wr.getElementName());
}
}
return null;
}
代码示例来源:origin: org.codehaus.enunciate/enunciate-csharp
if (webMethod.getWebResult().isHeader()) {
Declaration conflict = paramsByName.put(webMethod.getWebResult().getElementName(), webMethod);
if (conflict != null) {
result.addError(webMethod, "C# requires that all header parameters defined in the same endpoint interface have unique names. " +
if (webMethod.getWebResult().getType() instanceof MapType) {
result.addError(webMethod, "C# can't handle types that are maps.");
代码示例来源:origin: org.codehaus.enunciate/enunciate-jaxws
if (webMethod.getWebResult().getType() instanceof MapType) {
result.addError(webMethod, "There's a bug in JAXB ruining support for maps in return values or in parameters. For more information, see " +
"https://jaxb.dev.java.net/issues/show_bug.cgi?id=268 and http://forums.java.net/jive/thread.jspa?messageID=361990");
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
if (webMethod.getWebResult().getType() instanceof MapType) {
result.addError(webMethod.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-full
this.generatedAnnotations.method2WebMethod.put(methodKey, wmAnnotation);
WebResult webResult = webMethod.getWebResult();
SerializableWebResultAnnotation wrAnnotation = new SerializableWebResultAnnotation();
wrAnnotation.setHeader(webResult.isHeader());
代码示例来源:origin: org.codehaus.enunciate/enunciate-full
if (!webMethod.getDeclaringEndpointInterface().getTargetNamespace().equals(webMethod.getWebResult().getTargetNamespace())) {
代码示例来源:origin: org.codehaus.enunciate/enunciate-xfire-client
this.generatedAnnotations.method2WebMethod.put(methodKey, wmAnnotation);
WebResult webResult = webMethod.getWebResult();
SerializableWebResultAnnotation wrAnnotation = new SerializableWebResultAnnotation();
wrAnnotation.setHeader(webResult.isHeader());
本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebMethod.getWebResult()方法的一些代码示例,展示了WebMethod.getWe
我是一名优秀的程序员,十分优秀!