@Override public QName getRequestWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); RequestWrapper rw = m.getAnnotation(RequestWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
/** * The local name of the element. * * @return The local name of the element. */ public String getElementName() { String name = webMethod.getSimpleName(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.localName()))) { name = annotation.localName(); } return name; }
/** * The local name of the element. * * @return The local name of the element. */ public String getElementName() { String name = webMethod.getOperationName(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.localName()))) { name = annotation.localName(); } return name; }
/** * The local name of the element. * * @return The local name of the element. */ public String getElementName() { String name = webMethod.getOperationName(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.localName()))) { name = annotation.localName(); } return name; }
public QName getRequestWrapperQName() { if (null != reqWrapper) { return new QName(reqWrapper.targetNamespace(), reqWrapper.localName()); } return SOAPConstants.EMPTY_QNAME; }
@Override protected QName createInputMessageName(OperationInfo op) { if (op.getMethod().isAnnotationPresent(RequestWrapper.class)) { RequestWrapper wrapper = op.getMethod().getAnnotation(RequestWrapper.class); String ns = wrapper.targetNamespace(); if (ns.length() == 0) ns = op.getService().getPortType().getNamespaceURI(); String name = wrapper.localName(); if (name.length() == 0) name = op.getName(); return new QName(ns, name); } return super.createInputMessageName(op); }
public String getElementNamespace() { String targetNamespace = webMethod.getDeclaringEndpointInterface().getTargetNamespace(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.targetNamespace()))) { targetNamespace = annotation.targetNamespace(); } return targetNamespace; }
public String getElementNamespace() { String targetNamespace = webMethod.getDeclaringEndpointInterface().getTargetNamespace(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.targetNamespace()))) { targetNamespace = annotation.targetNamespace(); } return targetNamespace; }
public String getElementNamespace() { String targetNamespace = webMethod.getDeclaringEndpointInterface().getTargetNamespace(); javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.localName() != null) && (!"".equals(annotation.targetNamespace()))) { targetNamespace = annotation.targetNamespace(); } return targetNamespace; }
/** * For wrapped parameter style (based on the annotation and the WSDL), returns the wrapper * value. For non-wrapped (i.e. bare) parameter style, returns null. * * @return */ public String getAnnoRequestWrapperLocalName() { if (!isWrappedParameters()) { // A wrapper is only meaningful for wrapped parameters return null; } if (requestWrapperLocalName == null) { if (getAnnoRequestWrapper() != null && !DescriptionUtils.isEmpty(getAnnoRequestWrapper().localName())) { requestWrapperLocalName = getAnnoRequestWrapper().localName(); } else { // The default value of localName is the value of operationQName as // defined in the WebMethod annotation. [JAX-WS Sec. 7.3, p. 80] requestWrapperLocalName = getAnnoWebMethodOperationName(); } } return requestWrapperLocalName; }
@Override public QName getRequestWrapperName(OperationInfo op, Method method) { Method m = getDeclaredMethod(method); RequestWrapper rw = m.getAnnotation(RequestWrapper.class); String nm = null; String lp = null; if (rw != null) { nm = rw.targetNamespace(); lp = rw.localName(); } WebMethod meth = m.getAnnotation(WebMethod.class); if (meth != null && StringUtils.isEmpty(lp)) { lp = meth.operationName(); } if (StringUtils.isEmpty(nm)) { nm = op.getName().getNamespaceURI(); } if (!StringUtils.isEmpty(nm) && !StringUtils.isEmpty(lp)) { return new QName(nm, lp); } return null; }
/** * For wrapped parameter style (based on the annotation and the WSDL), returns the wrapper * value. For non-wrapped (i.e. bare) parameter style, returns null. * * @return */ public String getAnnoRequestWrapperLocalName() { if (!isWrappedParameters()) { // A wrapper is only meaningful for wrapped parameters return null; } if (requestWrapperLocalName == null) { if (getAnnoRequestWrapper() != null && !DescriptionUtils.isEmpty(getAnnoRequestWrapper().localName())) { requestWrapperLocalName = getAnnoRequestWrapper().localName(); } else { // The default value of localName is the value of operationQName as // defined in the WebMethod annotation. [JAX-WS Sec. 7.3, p. 80] requestWrapperLocalName = getAnnoWebMethodOperationName(); } } return requestWrapperLocalName; }
action = getAction(requestWrapper.targetNamespace(), method, requestWrapper.localName(), false); } else {
/** * This method will drive the attachment of @RequestWrapper annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachRequestWrapperAnnotation(MethodDescriptionComposite mdc, Method method) { RequestWrapper requestWrapper = (RequestWrapper)ConverterUtils.getAnnotation( RequestWrapper.class, method); if (requestWrapper != null) { RequestWrapperAnnot rwAnnot = RequestWrapperAnnot.createRequestWrapperAnnotImpl(); rwAnnot.setClassName(requestWrapper.className()); rwAnnot.setLocalName(requestWrapper.localName()); rwAnnot.setTargetNamespace(requestWrapper.targetNamespace()); try { rwAnnot.setPartName(requestWrapper.partName()); } catch (NoSuchMethodError ex) { // Ignore: we are running on Java 1.6 and the JAX-WS 2.2 libs have not been endorsed } mdc.setRequestWrapperAnnot(rwAnnot); } }
/** * This method will drive the attachment of @RequestWrapper annotation data to the * <code>MethodDescriptionComposite</code> * * @param mdc - <code>MethodDescriptionComposite</code> * @param method - <code>Method</code> */ private void attachRequestWrapperAnnotation(MethodDescriptionComposite mdc, Method method) { RequestWrapper requestWrapper = (RequestWrapper)ConverterUtils.getAnnotation( RequestWrapper.class, method); if (requestWrapper != null) { RequestWrapperAnnot rwAnnot = RequestWrapperAnnot.createRequestWrapperAnnotImpl(); rwAnnot.setClassName(requestWrapper.className()); rwAnnot.setLocalName(requestWrapper.localName()); rwAnnot.setTargetNamespace(requestWrapper.targetNamespace()); try { rwAnnot.setPartName(requestWrapper.partName()); } catch (NoSuchMethodError ex) { // Ignore: we are running on Java 1.6 and the JAX-WS 2.2 libs have not been endorsed } mdc.setRequestWrapperAnnot(rwAnnot); } }