/** * * @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 ;
@WebMethod @Oneway @RequestWrapper(localName = "testOneway", targetNamespace = "http://apache.org/type_test/xml", className = "org.apache.type_test.xml.TestOneway") @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-01-24T13:43:07.825-05:00") public void testOneway( @WebParam(name = "x", targetNamespace = "http://apache.org/type_test/xml") java.lang.String x, @WebParam(name = "y", targetNamespace = "http://apache.org/type_test/xml") java.lang.String y );
@Override public void submitReport(@WebParam(name = "arg0", targetNamespace = "") HandlingReport handlingReport) throws HandlingReportErrors_Exception { final List<String> errors = new ArrayList<String>(); final Date completionTime = parseCompletionTime(handlingReport, errors); final VoyageNumber voyageNumber = parseVoyageNumber(handlingReport.getVoyageNumber(), errors); final HandlingEvent.Type type = parseEventType(handlingReport.getType(), errors); final UnLocode unLocode = parseUnLocode(handlingReport.getUnLocode(), errors); for (String trackingIdStr : handlingReport.getTrackingIds()) { final TrackingId trackingId = parseTrackingId(trackingIdStr, errors); if (errors.isEmpty()) { final Date registrationTime = new Date(); final HandlingEventRegistrationAttempt attempt = new HandlingEventRegistrationAttempt( registrationTime, completionTime, trackingId, voyageNumber, type, unLocode ); applicationEvents.receivedHandlingEventRegistrationAttempt(attempt); } else { logger.error("Parse error in handling report: " + errors); final HandlingReportErrors faultInfo = new HandlingReportErrors(); throw new HandlingReportErrors_Exception(errors.toString(), faultInfo); } } }
for (int x = 0; x < cb.getParamsLength(); x++) { WebParam param = cb.getWebParam(x); if (null != param && param.header()) { if (headerList != null) { matchingList = headerList; || param.mode() == WebParam.Mode.OUT || nodeIdx >= matchingList.getLength()) { break; if (n.getLocalName().equals(param.name()) && n.getNamespaceURI().equals(param.targetNamespace())) { matchFound = true; ++nodeIdx;
String local = null; if (param != null) { tns = param.targetNamespace(); local = param.name();
protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) { WebParam webParam; int cnt = 0; for (VariableElement param : method.getParameters()) { webParam = param.getAnnotation(WebParam.class); if (webParam != null) { if (webParam.header()) continue; if (isEquivalentModes(mode, webParam.mode())) cnt++; } else { if (isEquivalentModes(mode, WebParam.Mode.IN)) { cnt++; } } } return cnt; }
private QName getPartName(OperationInfo op, Method method, int paramNumber, MessageInfo mi, String prefix, boolean isIn) { int partIndex = getPartIndex(method, paramNumber, isIn); method = getDeclaredMethod(method); WebParam param = getWebParam(method, paramNumber); String tns = mi.getName().getNamespaceURI(); String local = null; if (param != null) { if (Boolean.TRUE.equals(isRPC(method)) || isDocumentBare(method) || param.header()) { local = param.partName(); } if (local == null || local.length() == 0) { local = param.name(); } } if (local == null || local.length() == 0) { if (Boolean.TRUE.equals(isRPC(method)) || !Boolean.FALSE.equals(isWrapped(method))) { local = getDefaultLocalName(op, method, paramNumber, partIndex, prefix); } else { local = getOperationName(op.getInterface(), method).getLocalPart(); } } return new QName(tns, local); }
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)); } }
for (int idx = 0; idx < noArgs; idx++) { WebParam param = getWebParam(idx); if ((param.mode() != ignoreParamMode) && !param.header()) { Object wrappedObj = args[idx]; if (param.mode() != WebParam.Mode.IN) { wrappedObj = ((Holder)wrappedObj).value; if (param.name().equals("asyncHandler") && idx == (noArgs - 1)) { break; setWrappedPart(param.name(), wrapperObj, wrappedObj);
LOGGER.warn("Method " + method.getName() + " has no @WebMethod annotation"); } else { this.name = webMethod.action(); WebParam webParam = extractAnnotation(parameterCounter, WebParam.class); if (webParam != null) { paramName = webParam.name(); } else { LOGGER.warn("Method " + method.getName() + " parameter " + parameterCounter + " has no @WebParam annotation");
/** * Whether this is a header param. * * @return Whether this is a header param. */ public boolean isHeader() { boolean header = false; if (annotation != null) { header = annotation.header(); } return header; }
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; }
private static JavaLanguageVariable buildJavaVariableFromMethodParam(Method method, int paramIndex, WebParam xmlAnnotation) { JavaLanguageVariable variable = new JavaLanguageVariable(); variable.setType(GenericsUtils.getMethodGenericParameterTypes(method, paramIndex)); variable.setVariableName(xmlAnnotation.name()); variable.setRequired(true); variable.setHeader(xmlAnnotation.header()); Class<?> paramClass = method.getParameterTypes()[paramIndex]; variable.setMultiOccurs(isClassArrayOrCollection(paramClass)); return variable; }
@Oneway @Action(input = "urn:addRole") @RequestWrapper(localName = "addRole", targetNamespace = "http://service.ws.um.carbon.wso2.org", className = "com.sitewhere.wso2.identity.ws.AddRole") @WebMethod(action = "urn:addRole") public void addRole( @WebParam(name = "roleName", targetNamespace = "http://service.ws.um.carbon.wso2.org") java.lang.String roleName, @WebParam(name = "userList", targetNamespace = "http://service.ws.um.carbon.wso2.org") java.util.List<java.lang.String> userList, @WebParam(name = "permissions", targetNamespace = "http://service.ws.um.carbon.wso2.org") java.util.List<com.sitewhere.asset.modules.wso2.ws.PermissionDTO> permissions );
@WebMethod(operationName = "Notify") @Oneway @Generated(value = "org.apache.cxf.tools.wsdlto.WSDLToJava", date = "2019-02-10T17:00:24.081Z") public void notify( @WebParam(partName = "Notify", name = "Notify", targetNamespace = "http://docs.oasis-open.org/wsn/b-2") org.oasis_open.docs.wsn.b_2.Notify notify );
/** * This method will attach @WebParam annotation data to the <code> ParameterDescriptionComposite</code> * if the annotation was found on the parameter represented by this index in the parameter list. * * @param pdc - <code>ParameterDescriptionComposite</code> * @param order - the current index in the parameter list */ private void attachWebParamAnnotation(ParameterDescriptionComposite pdc, int order) { Annotation[] orderAnnots = paramAnnotations[order]; for (Annotation annot : orderAnnots) { if (annot instanceof WebParam) { WebParam webParam = (WebParam)annot; WebParamAnnot wpAnnot = WebParamAnnot.createWebParamAnnotImpl(); wpAnnot.setHeader(webParam.header()); wpAnnot.setMode(webParam.mode()); wpAnnot.setName(webParam.name()); wpAnnot.setPartName(webParam.partName()); wpAnnot.setTargetNamespace(webParam.targetNamespace()); pdc.setWebParamAnnot(wpAnnot); } } } }