@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; }
public String getWrapperTns(Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); if (reqWrapper != null) { return reqWrapper.targetNamespace(); } return null; }
public String getWrapperTns(Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); if (reqWrapper != null) { return reqWrapper.targetNamespace(); } return null; }
public String getWrapperTns(Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); if (reqWrapper != null) { return reqWrapper.targetNamespace(); } return null; }
public String getWrapperTns(Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); if (reqWrapper != null) { return reqWrapper.targetNamespace(); } return null; }
public QName getRequestWrapperQName() { if (null != reqWrapper) { return new QName(reqWrapper.targetNamespace(), reqWrapper.localName()); } return SOAPConstants.EMPTY_QNAME; }
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; }
@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); }
@Override public WrapperBeanClass getWrapperBeanClass(final Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); javax.jws.WebMethod webMethod = method.getAnnotation(javax.jws.WebMethod.class); String methName = webMethod == null ? null : webMethod.operationName(); if (StringUtils.isEmpty(methName)) { methName = method.getName(); } String reqClassName = getClassName(); String reqNs = null; if (reqWrapper != null) { reqClassName = reqWrapper.className().length() > 0 ? reqWrapper.className() : reqClassName; reqNs = reqWrapper.targetNamespace().length() > 0 ? reqWrapper.targetNamespace() : null; } if (reqClassName == null) { reqClassName = getPackageName(method) + ".jaxws." + StringUtils.capitalize(methName); } WrapperBeanClass jClass = new WrapperBeanClass(); jClass.setFullClassName(reqClassName); jClass.setNamespace(reqNs); return jClass; }
@Override public WrapperBeanClass getWrapperBeanClass(final Method method) { javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class); javax.jws.WebMethod webMethod = method.getAnnotation(javax.jws.WebMethod.class); String methName = webMethod == null ? null : webMethod.operationName(); if (StringUtils.isEmpty(methName)) { methName = method.getName(); } String reqClassName = getClassName(); String reqNs = null; if (reqWrapper != null) { reqClassName = reqWrapper.className().length() > 0 ? reqWrapper.className() : reqClassName; reqNs = reqWrapper.targetNamespace().length() > 0 ? reqWrapper.targetNamespace() : null; } if (reqClassName == null) { reqClassName = getPackageName(method) + ".jaxws." + StringUtils.capitalize(methName); } WrapperBeanClass jClass = new WrapperBeanClass(); jClass.setFullClassName(reqClassName); jClass.setNamespace(reqNs); return jClass; }
@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 getAnnoRequestWrapperTargetNamespace() { if (!isWrappedParameters()) { // A wrapper is only meaningful for wrapped parameters return null; } if (requestWrapperTargetNamespace == null) { if (getAnnoRequestWrapper() != null && !DescriptionUtils.isEmpty(getAnnoRequestWrapper().targetNamespace())) { requestWrapperTargetNamespace = getAnnoRequestWrapper().targetNamespace(); } else { // The default value for targetNamespace is the target namespace of the SEI. [JAX-WS Sec 7.3, p. 80] requestWrapperTargetNamespace = getEndpointInterfaceDescription().getTargetNamespace(); } } return requestWrapperTargetNamespace; }
/** * 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 getAnnoRequestWrapperTargetNamespace() { if (!isWrappedParameters()) { // A wrapper is only meaningful for wrapped parameters return null; } if (requestWrapperTargetNamespace == null) { if (getAnnoRequestWrapper() != null && !DescriptionUtils.isEmpty(getAnnoRequestWrapper().targetNamespace())) { requestWrapperTargetNamespace = getAnnoRequestWrapper().targetNamespace(); } else { // The default value for targetNamespace is the target namespace of the SEI. [JAX-WS Sec 7.3, p. 80] requestWrapperTargetNamespace = getEndpointInterfaceDescription().getTargetNamespace(); } } return requestWrapperTargetNamespace; }
method.getAnnotation(RequestWrapper.class); if (requestWrapper != null) { action = getAction(requestWrapper.targetNamespace(), method, requestWrapper.localName(),
reqClassName = reqWrapper.className().length() > 0 ? reqWrapper.className() : reqClassName; reqName = reqWrapper.localName().length() > 0 ? reqWrapper.localName() : reqName; reqNS = reqWrapper.targetNamespace().length() > 0 ? reqWrapper.targetNamespace() : reqNS; } else { reqClassName = model.getPackageName() + ".types." + AnnotationUtil.capitalize(method.getName());
if (webMessage instanceof RequestWrapper) { javax.xml.ws.RequestWrapper annotation = webMethod.getAnnotation(javax.xml.ws.RequestWrapper.class); if ((annotation != null) && (annotation.targetNamespace() != null) && (!"".equals(annotation.targetNamespace()))) { if (!webMethod.getDeclaringEndpointInterface().getTargetNamespace().equals(annotation.targetNamespace())) {
/** * 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); } }