Refine search
/** * * @param arg0 * @throws HandlingReportErrors_Exception */ @WebMethod @RequestWrapper(localName = "submitReport", targetNamespace = "http://ws.handling.interfaces.dddsample.citerus.se/", className = "com.aggregator.SubmitReport") @ResponseWrapper(localName = "submitReportResponse", targetNamespace = "http://ws.handling.interfaces.dddsample.citerus.se/", className = "com.aggregator.SubmitReportResponse") public void submitReport( @WebParam(name = "arg0", targetNamespace = "") HandlingReport arg0) throws HandlingReportErrors_Exception ;
public String getRequestWrapperClassName(Method selected) { Method m = getDeclaredMethod(selected); RequestWrapper rw = m.getAnnotation(RequestWrapper.class); String clsName = ""; if (rw != null) { clsName = rw.className(); } if (clsName.length() > 0) { return clsName; } return null; }
if (webMethod.exclude()) { operationName = getValue(webMethod.operationName(), operationName); operation.setName(operationName); operation.setAction(webMethod.action()); WebParam param = getAnnotation(method, i, WebParam.class); if (param != null) { if (!"".equals(param.targetNamespace())) ns = param.targetNamespace(); if (!"".equals(param.name())) name = param.name(); operation.getParameterModes().set(i, getParameterMode(param.mode())); WebResult result = method.getAnnotation(WebResult.class); if (result != null) { if (!"".equals(result.targetNamespace())) ns = result.targetNamespace(); if (!"".equals(result.name())) name = result.name(); String ns = requestWrapper == null ? tns : getValue(requestWrapper.targetNamespace(), tns); String name = requestWrapper == null ? operationName : getValue(requestWrapper.localName(), operationName); String wrapperBeanName = requestWrapper == null ? "" : requestWrapper.className(); if ("".equals(wrapperBeanName)) { wrapperBeanName = CodeGenerationHelper.getPackagePrefix(clazz) + capitalize(method.getName());
String reqNS = model.getTargetNameSpace(); if (reqWrapper != null) { 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()); String resNS = model.getTargetNameSpace(); if (resWrapper != null) { resClassName = resWrapper.className(); resName = resWrapper.localName().length() > 0 ? resWrapper.localName() : resName; resNS = resWrapper.targetNamespace().length() > 0 ? resWrapper.targetNamespace() : resNS; } else {
if(reqWrapper != null && reqWrapper.className().length()>0){ requestClassName = reqWrapper.className(); }else{ requestClassName = beanPackage + capitalize(method.getName()); if(resWrapper != null && resWrapper.className().length()>0){ responseClassName = resWrapper.className(); }else{ responseClassName = beanPackage + capitalize(method.getName()) + RESPONSE; String reqPartName = "parameters"; if (reqWrapper != null) { if (reqWrapper.targetNamespace().length() > 0) reqNamespace = reqWrapper.targetNamespace(); if (reqWrapper.localName().length() > 0) reqName = reqWrapper.localName(); try { if (reqWrapper.partName().length() > 0) reqPartName = reqWrapper.partName(); } catch(LinkageError e) { if (!isOneway) { if (resWrapper != null) { if (resWrapper.targetNamespace().length() > 0) if (resultQName.getNamespaceURI().length() == 0 && webResult.header()) {
method.getAnnotation(RequestWrapper.class); if (requestWrapper != null) { action = getAction(requestWrapper.targetNamespace(), method, requestWrapper.localName(), false); } else { wmAnnotation.operationName(), false); method.getAnnotation(ResponseWrapper.class); if (responseWrapper != null) { action = getAction(responseWrapper.targetNamespace(), method, responseWrapper.localName(), false); } else { wmAnnotation.operationName(), false);
@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; }
@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; }
/** * 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); } }
public QName getRequestWrapperQName() { if (null != reqWrapper) { return new QName(reqWrapper.targetNamespace(), reqWrapper.localName()); } return SOAPConstants.EMPTY_QNAME; }
private boolean isRequestPayload(Object payload) { Method m = getMethod(); RequestWrapper reqWrapper = m.getAnnotation(RequestWrapper.class); ResponseWrapper respWrapper = m.getAnnotation(ResponseWrapper.class); if (reqWrapper != null) { return payload.getClass().getName().equals(reqWrapper.className()); } else if (respWrapper != null) { return !payload.getClass().getName().equals(respWrapper.className()); } return true; }
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())) { if ((annotation != null) && (annotation.targetNamespace() != null) && (!"".equals(annotation.targetNamespace()))) { if (!webMethod.getDeclaringEndpointInterface().getTargetNamespace().equals(annotation.targetNamespace())) { result.addError(webMethod.getPosition(), "Enunciate doesn't allow declaring a target namespace for a response wrapper that is " + "different from the target namespace of the endpoint interface. If you really must, declare the parameter style BARE and use an xml root " + if ((annotation != null) && (!"".equals(annotation.targetNamespace()))) { if (!annotation.targetNamespace().equals(webParam.getWebMethod().getDeclaringEndpointInterface().getTargetNamespace())) { result.addError(webParam.getPosition(), "Enunciate doesn't allow declaring a target namespace for a web parameter that is different from the " + "target namespace of the endpoint interface. If you really want to, declare the parameter style BARE and use an xml root element from another " +
private Object buildPayloadFromRequest(Object[] args) { RequestWrapper ann = getMethod().getAnnotation(RequestWrapper.class); assert ann != null : "failed to get request wrapper annotation"; Object wrapper = createWrapperInstance(ann.className()); int argIndex = 0; Collection<WebParam> annotations = getWebParamAnnotations(getMethod()); for (WebParam wp : annotations) { setWrapperValue(wrapper, wp.name(), args[argIndex++]); } return wrapper; }
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; }
/** * 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; }
Name methodName = method.getSimpleName(); String operationName = builder.getOperationName(methodName); operationName = webMethod != null && webMethod.operationName().length() > 0 ? webMethod.operationName() : operationName; String reqName = operationName; String resName = operationName + WebServiceConstants.RESPONSE.getValue(); RequestWrapper reqWrapper = method.getAnnotation(RequestWrapper.class); if (reqWrapper != null) { if (reqWrapper.className().length() > 0) requestClassName = reqWrapper.className(); if (reqWrapper.localName().length() > 0) reqName = reqWrapper.localName(); if (reqWrapper.targetNamespace().length() > 0) reqNamespace = reqWrapper.targetNamespace(); ResponseWrapper resWrapper = method.getAnnotation(ResponseWrapper.class); if(resWrapper != null) { if (resWrapper.className().length() > 0) responseClassName = resWrapper.className(); if (resWrapper.localName().length() > 0) resName = resWrapper.localName(); if (resWrapper.targetNamespace().length() > 0)
if(reqWrapper != null && reqWrapper.className().length()>0){ requestClassName = reqWrapper.className(); }else{ requestClassName = beanPackage + capitalize(method.getName()); if(resWrapper != null && resWrapper.className().length()>0){ responseClassName = resWrapper.className(); }else{ responseClassName = beanPackage + capitalize(method.getName()) + RESPONSE; String reqPartName = "parameters"; if (reqWrapper != null) { if (reqWrapper.targetNamespace().length() > 0) reqNamespace = reqWrapper.targetNamespace(); if (reqWrapper.localName().length() > 0) reqName = reqWrapper.localName(); try { if (reqWrapper.partName().length() > 0) reqPartName = reqWrapper.partName(); } catch(LinkageError e) { if (!isOneway) { if (resWrapper != null) { if (resWrapper.targetNamespace().length() > 0) if (resultQName.getNamespaceURI().length() == 0 && webResult.header()) {
@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; }
@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; }
/** * 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); } }