public Boolean isWrapperPartQualified(MessagePartInfo mpi) { Annotation[] annotations = (Annotation[])mpi.getProperty("parameter.annotations"); if (annotations != null) { for (Annotation an : annotations) { String tns = null; if (an instanceof WebParam) { tns = ((WebParam)an).targetNamespace(); } else if (an instanceof WebResult) { tns = ((WebResult)an).targetNamespace(); } if (tns != null && !StringUtils.isEmpty(tns)) { return Boolean.TRUE; } } } return null; }
String local = null; if (webResult != null) { tns = webResult.targetNamespace(); local = webResult.name();
/** * The namespace of the web result. * * @return The namespace of the web result. */ public String getTargetNamespace() { String targetNamespace = isImplicitSchemaElement() ? method.getDeclaringEndpointInterface().getTargetNamespace() : ""; if ((this.annotation != null) && (this.annotation.targetNamespace() != null) && (!"".equals(this.annotation.targetNamespace()))) { targetNamespace = this.annotation.targetNamespace(); } return targetNamespace; }
/** * The namespace of the web result. * * @return The namespace of the web result. */ public String getTargetNamespace() { String targetNamespace = isImplicitSchemaElement() ? method.getDeclaringEndpointInterface().getTargetNamespace() : ""; if ((this.annotation != null) && (this.annotation.targetNamespace() != null) && (!"".equals(this.annotation.targetNamespace()))) { targetNamespace = this.annotation.targetNamespace(); } return targetNamespace; }
public QName getWebResultQName() { if (null != webResultAnnotation) { if (getSOAPStyle() == Style.DOCUMENT) { if ("".equals(webResultAnnotation.name())) { return new QName(webResultAnnotation.targetNamespace(), "return"); } return new QName(webResultAnnotation.targetNamespace(), webResultAnnotation.name()); } else { return new QName("", webResultAnnotation.partName()); } } return SOAPConstants.EMPTY_QNAME; }
public QName getWebResultQName() { WebResult res = getWebResult(); if (null != res) { if (getSOAPStyle() == Style.DOCUMENT) { if ("".equals(res.name())) { return new QName(res.targetNamespace(), "return"); } return new QName(res.targetNamespace(), res.name()); } else { return new QName("", res.partName()); } } return new QName("", ""); }
public Boolean isWrapperPartQualified(MessagePartInfo mpi) { Annotation[] annotations = (Annotation[])mpi.getProperty("parameter.annotations"); if (annotations != null) { for (Annotation an : annotations) { String tns = null; if (an instanceof WebParam) { tns = ((WebParam)an).targetNamespace(); } else if (an instanceof WebResult) { tns = ((WebResult)an).targetNamespace(); } if (tns != null && !StringUtils.isEmpty(tns)) { return Boolean.TRUE; } } } return null; }
protected WebResult(TypeMirror delegate, WebMethod method) { super(delegate); this.method = method; javax.jws.WebResult annotation = method.getAnnotation(javax.jws.WebResult.class); String name = "return"; if ((annotation != null) && (annotation.name() != null) && (!"".equals(annotation.name()))) { name = annotation.name(); } this.name = name; String targetNamespace = method.getDeclaringEndpointInterface().getTargetNamespace(); if ((annotation != null) && (annotation.targetNamespace() != null) && (!"".equals(annotation.targetNamespace()))) { targetNamespace = annotation.targetNamespace(); } this.targetNamespace = targetNamespace; String partName = "return"; if ((annotation != null) && (!"".equals(annotation.partName()))) { partName = annotation.partName(); } this.partName = partName; this.header = ((annotation != null) && (annotation.header())); this.adapterType = AdapterUtil.findAdapterType(method); }
if (webResult != null && webResult.targetNamespace().length() > 0) { webResultNS = webResult.targetNamespace();
if (webResult != null && webResult.targetNamespace().length() > 0) { webResultNS = webResult.targetNamespace();
if (webResult != null && webResult.targetNamespace().length() > 0) { webResultNS = webResult.targetNamespace();
resultName = webResult.name().length() > 0 ? webResult.name() : resultName; resultName = webResult.partName().length() > 0 ? webResult.partName() : resultName; resultTNS = webResult.targetNamespace().length() > 0 ? webResult.targetNamespace() : resultTNS; isHeader = webResult.header();
protected void introspectAnnotations(Annotation[] annotations, DataType targetDataType) { WebResult result = getAnnotation(annotations, WebResult.class); if (result != null) { QName name = new QName(result.targetNamespace(), result.name()); targetDataType.setLogical(new XMLType(name, null)); } WebParam param = getAnnotation(annotations, WebParam.class); if (param != null) { QName name = new QName(param.targetNamespace(), param.name()); targetDataType.setLogical(new XMLType(name, null)); } }
String local = null; if (webResult != null) { tns = webResult.targetNamespace(); local = webResult.name();
public WebResultAnnotation getWebResultAnnotation(Method method) { Annotation[][] annotations = method.getParameterAnnotations(); WebResult webResult = (WebResult) method.getAnnotation(WebResult.class); if (webResult != null) { WebResultAnnotation annot = new WebResultAnnotation(); annot.setName(webResult.name()); annot.setTargetNamespace(webResult.targetNamespace()); annot.setHeader(webResult.header()); annot.setPartName(webResult.partName()); return annot; } else { return null; } }
&& method.getAnnotation(javax.xml.ws.ResponseWrapper.class) == null || method.getAnnotation(WebResult.class) != null && method.getAnnotation(WebResult.class).targetNamespace().isEmpty()) { field.setTargetNamespace("");
public String getAnnoWebResultTargetNamespace() { if (!isOperationReturningResult()) { return null; } if (webResultTargetNamespace == null) { if (getAnnoWebResult() != null && !DescriptionUtils.isEmpty(getAnnoWebResult().targetNamespace())) { webResultTargetNamespace = getAnnoWebResult().targetNamespace(); } else if (getAnnoSoapBindingStyle() == SOAPBinding.Style.DOCUMENT && getAnnoSoapBindingParameterStyle() == SOAPBinding.ParameterStyle.WRAPPED && !getAnnoWebResultHeader()) { // Default for operation style DOCUMENT and paramater style WRAPPED and the return value // does not map to a header per JSR-181 MR Sec 4.5.1, pg 23-24 webResultTargetNamespace = WebResult_TargetNamespace_DEFAULT; } else { // Default is the namespace from the WebService per JSR-181 MR Sec 4.5.1, pg 23-24 webResultTargetNamespace = ((EndpointDescriptionJava)getEndpointInterfaceDescription() .getEndpointDescription()).getAnnoWebServiceTargetNamespace(); } } return webResultTargetNamespace; }
public String getAnnoWebResultTargetNamespace() { if (!isOperationReturningResult()) { return null; } if (webResultTargetNamespace == null) { if (getAnnoWebResult() != null && !DescriptionUtils.isEmpty(getAnnoWebResult().targetNamespace())) { webResultTargetNamespace = getAnnoWebResult().targetNamespace(); } else if (getAnnoSoapBindingStyle() == SOAPBinding.Style.DOCUMENT && getAnnoSoapBindingParameterStyle() == SOAPBinding.ParameterStyle.WRAPPED && !getAnnoWebResultHeader()) { // Default for operation style DOCUMENT and paramater style WRAPPED and the return value // does not map to a header per JSR-181 MR Sec 4.5.1, pg 23-24 webResultTargetNamespace = WebResult_TargetNamespace_DEFAULT; } else { // Default is the namespace from the WebService per JSR-181 MR Sec 4.5.1, pg 23-24 webResultTargetNamespace = ((EndpointDescriptionJava)getEndpointInterfaceDescription() .getEndpointDescription()).getAnnoWebServiceTargetNamespace(); } } return webResultTargetNamespace; }
/** * This method will drive the attachment of @WebResult annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachWebResultAnnotation(MethodDescriptionComposite mdc, Method method) { WebResult webResult = (WebResult)ConverterUtils.getAnnotation(WebResult.class, method); if (webResult != null) { WebResultAnnot wrAnnot = WebResultAnnot.createWebResultAnnotImpl(); wrAnnot.setHeader(webResult.header()); wrAnnot.setName(webResult.name()); wrAnnot.setPartName(webResult.partName()); wrAnnot.setTargetNamespace(webResult.targetNamespace()); mdc.setWebResultAnnot(wrAnnot); } }
/** * This method will drive the attachment of @WebResult annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachWebResultAnnotation(MethodDescriptionComposite mdc, Method method) { WebResult webResult = (WebResult)ConverterUtils.getAnnotation(WebResult.class, method); if (webResult != null) { WebResultAnnot wrAnnot = WebResultAnnot.createWebResultAnnotImpl(); wrAnnot.setHeader(webResult.header()); wrAnnot.setName(webResult.name()); wrAnnot.setPartName(webResult.partName()); wrAnnot.setTargetNamespace(webResult.targetNamespace()); mdc.setWebResultAnnot(wrAnnot); } }