javax.jws.WebParam Java Examples

The following examples show how to use javax.jws.WebParam. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExecutorServices.java    From freehealth-connector with GNU Affero General Public License v3.0 6 votes vote down vote up
@WebResult(
   name = "GetPrescriptionForExecutorResultSealed",
   targetNamespace = ""
)
@RequestWrapper(
   localName = "getPrescriptionForExecutor",
   targetNamespace = "http://services.recipe.be",
   className = "be.recipe.services.GetPrescriptionForExecutor"
)
@WebMethod
@ResponseWrapper(
   localName = "getPrescriptionForExecutorResponse",
   targetNamespace = "http://services.recipe.be",
   className = "be.recipe.services.GetPrescriptionForExecutorResponse"
)
byte[] getPrescriptionForExecutor(@WebParam(name = "GetPrescriptionForExecutorParamSealed",targetNamespace = "") byte[] var1, @WebParam(name = "PartyIdentificationParam",targetNamespace = "") PartyIdentification var2) throws RecipeException;
 
Example #2
Source File: WebServiceVisitor.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
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;
}
 
Example #3
Source File: WebServiceVisitor.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected boolean isLegalParameter(VariableElement param,
                                   ExecutableElement method,
                                   TypeElement typeElement,
                                   int paramIndex) {
    if (!isLegalType(param.asType())) {
        builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(typeElement.getQualifiedName(),
                method.getSimpleName(),
                param.getSimpleName(),
                param.asType().toString()), param);
        return false;
    }
    TypeMirror holderType;
    holderType = builder.getHolderValueType(param.asType());
    WebParam webParam = param.getAnnotation(WebParam.class);
    WebParam.Mode mode = null;
    if (webParam != null)
        mode = webParam.mode();

    if (holderType != null) {
        if (mode != null && mode == WebParam.Mode.IN)
            builder.processError(WebserviceapMessages.WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(typeElement.getQualifiedName(), method.toString(), paramIndex), param);
    } else if (mode != null && mode != WebParam.Mode.IN) {
        builder.processError(WebserviceapMessages.WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(typeElement.getQualifiedName(), method.toString(), paramIndex), param);
    }

    return true;
}
 
Example #4
Source File: Media.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * This operation removes a VideoEncoderConfiguration from an existing media
 *         profile. If the
 *         media profile does not contain a VideoEncoderConfiguration, the operation has no effect. The
 *         removal shall be persistent.
 *       
 */
@WebMethod(operationName = "RemoveVideoEncoderConfiguration", action = "http://www.onvif.org/ver10/media/wsdl/RemoveVideoEncoderConfiguration")
@RequestWrapper(localName = "RemoveVideoEncoderConfiguration", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.RemoveVideoEncoderConfiguration")
@ResponseWrapper(localName = "RemoveVideoEncoderConfigurationResponse", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.RemoveVideoEncoderConfigurationResponse")
public void removeVideoEncoderConfiguration(

    @WebParam(name = "ProfileToken", targetNamespace = "http://www.onvif.org/ver10/media/wsdl")
    java.lang.String profileToken
);
 
Example #5
Source File: Media.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * This operation modifies an audio decoder configuration. The
 *         ForcePersistence flag indicates if
 *         the changes shall remain after reboot of the device.
 *       
 */
@WebMethod(operationName = "SetAudioDecoderConfiguration", action = "http://www.onvif.org/ver10/media/wsdl/SetAudioDecoderConfiguration")
@RequestWrapper(localName = "SetAudioDecoderConfiguration", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.SetAudioDecoderConfiguration")
@ResponseWrapper(localName = "SetAudioDecoderConfigurationResponse", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.SetAudioDecoderConfigurationResponse")
public void setAudioDecoderConfiguration(

    @WebParam(name = "Configuration", targetNamespace = "http://www.onvif.org/ver10/media/wsdl")
    org.onvif.ver10.schema.AudioDecoderConfiguration configuration,
    @WebParam(name = "ForcePersistence", targetNamespace = "http://www.onvif.org/ver10/media/wsdl")
    boolean forcePersistence
);
 
Example #6
Source File: BookmarkService.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
@WebMethod
public Bookmark[] getAll(@WebParam(name = "token") String token) throws AccessDeniedException, RepositoryException, DatabaseException {
	log.debug("getAll({})", token);
	BookmarkModule bm = ModuleManager.getBookmarkModule();
	List<Bookmark> col = bm.getAll(token);
	Bookmark[] result = col.toArray(new Bookmark[col.size()]);
	log.debug("getAll: {}", col);
	return result;
}
 
Example #7
Source File: RecipeExecutorPortType.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
@WebResult(
   name = "AliveCheckResponse",
   targetNamespace = "urn:be:fgov:ehealth:recipe:protocol:v2",
   partName = "body"
)
@WebMethod(
   action = "urn:be:fgov:ehealth:recipe:protocol:v1:AliveCheck"
)
AliveCheckResponse aliveCheck(@WebParam(partName = "body",name = "AliveCheckRequest",targetNamespace = "urn:be:fgov:ehealth:recipe:protocol:v2") AliveCheckRequest var1);
 
Example #8
Source File: Media.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * This operation requests all audio encoder configurations of a device that
 *         are compatible with a certain media profile. Each of the returned configurations shall be a
 *         valid input parameter for the AddAudioSourceConfiguration command on the media profile. The
 *         result varies depending on the capabilities, configurations and settings in the device.
 *       
 */
@WebMethod(operationName = "GetCompatibleAudioEncoderConfigurations", action = "http://www.onvif.org/ver10/media/wsdl/GetCompatibleAudioEncoderConfigurations")
@RequestWrapper(localName = "GetCompatibleAudioEncoderConfigurations", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.GetCompatibleAudioEncoderConfigurations")
@ResponseWrapper(localName = "GetCompatibleAudioEncoderConfigurationsResponse", targetNamespace = "http://www.onvif.org/ver10/media/wsdl", className = "org.onvif.ver10.media.wsdl.GetCompatibleAudioEncoderConfigurationsResponse")
@WebResult(name = "Configurations", targetNamespace = "http://www.onvif.org/ver10/media/wsdl")
public java.util.List<org.onvif.ver10.schema.AudioEncoderConfiguration> getCompatibleAudioEncoderConfigurations(

    @WebParam(name = "ProfileToken", targetNamespace = "http://www.onvif.org/ver10/media/wsdl")
    java.lang.String profileToken
);
 
Example #9
Source File: HandlingReportServiceImpl.java    From dddsample-core with MIT License 5 votes vote down vote up
@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);
    }
  }

}
 
Example #10
Source File: RoomWebService.java    From openmeetings with Apache License 2.0 5 votes vote down vote up
/**
 * Delete a room by its room id
 *
 * @param sid - The SID of the User. This SID must be marked as Loggedin
 * @param id - The id of the room
 *
 * @return - id of the room deleted
 */
@WebMethod
@DELETE
@Path("/{id}")
public ServiceResult delete(@WebParam(name="sid") @QueryParam("sid") String sid, @WebParam(name="id") @PathParam("id") long id) {
	return performCall(sid, User.Right.SOAP, sd -> {
		Room r = roomDao.get(id);
		if (r == null) {
			return new ServiceResult("Not found", Type.SUCCESS);
		} else {
			roomDao.delete(r, sd.getUserId());
			return new ServiceResult("Deleted", Type.SUCCESS);
		}
	});
}
 
Example #11
Source File: InventoryServiceImpl.java    From Spring-MVC-Blueprints with MIT License 5 votes vote down vote up
/**
 * 
 * @param arg0
 * @return
 *     returns int
 */
@WebMethod
@WebResult(name = "result", partName = "result")
@Action(input = "http://impl.service.modules.erp.packt.org/InventoryServiceImpl/addProductRequest", output = "http://impl.service.modules.erp.packt.org/InventoryServiceImpl/addProductResponse")
public int addProduct(
    @WebParam(name = "arg0", partName = "arg0")
    InventoryForm arg0);
 
Example #12
Source File: DashboardService.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
@WebMethod
public DashboardDocumentResult[] getUserLockedDocuments(@WebParam(name = "token") String token) throws AccessDeniedException,
		RepositoryException, DatabaseException {
	log.debug("getUserLockedDocuments({})", new Object[]{token});
	DashboardModule dm = ModuleManager.getDashboardModule();
	List<DashboardDocumentResult> col = dm.getUserLockedDocuments(token);
	DashboardDocumentResult[] result = col.toArray(new DashboardDocumentResult[col.size()]);
	log.debug("getUserLockedDocuments: {}", result);
	return result;
}
 
Example #13
Source File: WrappedSink.java    From cxf with Apache License 2.0 5 votes vote down vote up
@Oneway
@Action(input = EventingConstants.ACTION_NOTIFY_EVENT_WRAPPED_DELIVERY)
@WebMethod(operationName = EventingConstants.OPERATION_NOTIFY_EVENT)
void notifyEvent(
    @WebParam(partName = EventingConstants.PARAMETER, name = EventingConstants.NOTIFY,
              targetNamespace = EventingConstants.EVENTING_2011_03_NAMESPACE)
    EventType parameter
);
 
Example #14
Source File: WorkflowService.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
@WebMethod
public void endToken(@WebParam(name = "token") String token, @WebParam(name = "tkId") long tkId)
		throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException {
	log.debug("endToken({}, {})", token, tkId);
	WorkflowModule wm = ModuleManager.getWorkflowModule();
	wm.endToken(token, tkId);
	log.debug("endToken: void");
}
 
Example #15
Source File: PTZ.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * Operation for continuous Pan/Tilt and Zoom movements. The operation is
 *         supported if the PTZNode supports at least one continuous Pan/Tilt or Zoom space. If the
 *         space argument is omitted, the default space set by the PTZConfiguration will be used.
 *       
 */
@WebMethod(operationName = "ContinuousMove", action = "http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove")
@RequestWrapper(localName = "ContinuousMove", targetNamespace = "http://www.onvif.org/ver20/ptz/wsdl", className = "org.onvif.ver20.ptz.wsdl.ContinuousMove")
@ResponseWrapper(localName = "ContinuousMoveResponse", targetNamespace = "http://www.onvif.org/ver20/ptz/wsdl", className = "org.onvif.ver20.ptz.wsdl.ContinuousMoveResponse")
public void continuousMove(

    @WebParam(name = "ProfileToken", targetNamespace = "http://www.onvif.org/ver20/ptz/wsdl")
    java.lang.String profileToken,
    @WebParam(name = "Velocity", targetNamespace = "http://www.onvif.org/ver20/ptz/wsdl")
    org.onvif.ver10.schema.PTZSpeed velocity,
    @WebParam(name = "Timeout", targetNamespace = "http://www.onvif.org/ver20/ptz/wsdl")
    javax.xml.datatype.Duration timeout
);
 
Example #16
Source File: AcquirerWebService.java    From genericconnector with Apache License 2.0 5 votes vote down vote up
public String reserveMoney(@WebParam(name="txid") String txid, @WebParam(name="referenceNumber") String referenceNumber) throws Exception {
	CALLS_EXECUTE.incrementAndGet();

    log.log(Level.INFO, "EXECUTE: reserving money " + referenceNumber + " for TXID " + txid);
    if("FAILWSAcquirer".equals(referenceNumber)){
        throw new Exception("failed for test purposes");
    }else{
        File f2 = File.createTempFile("exec.", ".txt", f);
        try(FileOutputStream fos = new FileOutputStream(f2)){
            fos.write(txid.getBytes(UTF_8));
        }
        return "reserved money " + referenceNumber;
    }
}
 
Example #17
Source File: RecipeExecutorPortType.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
@WebResult(
   name = "CreateFeedbackResponse",
   targetNamespace = "urn:be:fgov:ehealth:recipe:protocol:v2",
   partName = "body"
)
@WebMethod(
   action = "urn:be:fgov:ehealth:recipe:protocol:v1:CreateFeedback"
)
CreateFeedbackResponse createFeedback(@WebParam(partName = "body",name = "CreateFeedbackRequest",targetNamespace = "urn:be:fgov:ehealth:recipe:protocol:v2") CreateFeedbackRequest var1);
 
Example #18
Source File: ReportingServiceSecureBean.java    From development with Apache License 2.0 5 votes vote down vote up
@WebMethod(action = "\"\"")
public RDOSupplierRevenueShareReport getSupplierRevenueShareReport(
        @WebParam(name = "sessionId") String sessionId,
        @WebParam(name = "month") int month,
        @WebParam(name = "year") int year) {
    return delegate.getSupplierRevenueShareReport(sessionId, month, year);
}
 
Example #19
Source File: EPCISServicePortType.java    From fosstrak-epcis with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(name = "GetSubscriptionIDsResult", targetNamespace = "urn:epcglobal:epcis-query:xsd:1", partName = "getSubscriptionIDsReturn")
@WebMethod
public org.fosstrak.epcis.model.ArrayOfString getSubscriptionIDs(
        @WebParam(partName = "parms", name = "GetSubscriptionIDs", targetNamespace = "urn:epcglobal:epcis-query:xsd:1")
        org.fosstrak.epcis.model.GetSubscriptionIDs parms) throws ImplementationExceptionResponse,
        SecurityExceptionResponse, ValidationExceptionResponse, NoSuchNameExceptionResponse;
 
Example #20
Source File: UserPortType.java    From spring-boot-study with MIT License 5 votes vote down vote up
/**
 * 
 * @param user
 * @return
 *     returns int
 */
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "update", targetNamespace = "http://www.youdomain.com/webservice", className = "com.fishpro.webservicejaxws.user.Update")
@ResponseWrapper(localName = "updateResponse", targetNamespace = "http://www.youdomain.com/webservice", className = "com.fishpro.webservicejaxws.user.UpdateResponse")
public int update(
    @WebParam(name = "user", targetNamespace = "")
    UserDto user);
 
Example #21
Source File: TestsAndQuizzes.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
/** 
 * createAssessmentFromExportFile - WS Endpoint, exposing the SamLite createImportedAssessment()
 *
 * @param	String sessionid		the id of a valid admin session
 * @param	String siteid			the enterprise/sakai id of the site to be archived
 * @param	String siteproperty		the property that holds the enterprise site id
 * @param	String xmlfile			path to the IMS QTI document containing the assessment
 * @return	boolean	       		 	returns true if assessment created successfully, false if assessment is null
 * 
 * @throws	AxisFault			WS TestsAndQuizzes.createAssessmentFromXml(): XmlUtil.createDocument() returned a null QTI Document
 * 						WS TestsAndQuizzes.createAssessmentFromXml(): XmlUtil.createDocument() ParserConfigurationException: 
 *						WS TestsAndQuizzes.createAssessmentFromXml(): XmlUtil.createDocument() SaxException:
 *						WS TestsAndQuizzes.createAssessmentFromXml(): XmlUtil.createDocument() IOException: 
 *
 */

   @WebMethod
   @Path("/createAssessmentFromExportFile")
   @Produces("text/plain")
   @GET
   public boolean createAssessmentFromExportFile(
           @WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
           @WebParam(name = "siteid", partName = "siteid") @QueryParam("siteid") String siteid,
           @WebParam(name = "siteproperty", partName = "siteproperty") @QueryParam("siteproperty") String siteproperty,
           @WebParam(name = "xmlfile", partName = "xmlfile") @QueryParam("xmlfile") String xmlfile) {
       Session session = establishSession(sessionid);
	Document document = null;

	try {
		document = XmlUtil.readDocument(xmlfile, true);
	} catch (ParserConfigurationException pce) {
		log.error("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() ParserConfigurationException: " + pce.getMessage(), pce);
		throw new RuntimeException("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() ParserConfigurationException: " + pce.getMessage());
	} catch (SAXException saxe) {
		log.error("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() SaxException: " + saxe.getMessage(), saxe);
		throw new RuntimeException("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() SaxException: " + saxe.getMessage());
	} catch (IOException ioe) {
		log.error("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() IOException: " + ioe.getMessage(), ioe);
		throw new RuntimeException("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() IOException: " + ioe.getMessage());
	}
	if (document == null) {
		throw new RuntimeException("WS TestsAndQuizzes.createAssessmentFromExportFile(): XmlUtil.createDocument() returned a null QTI Document");
	}
	
	return createAssessment(siteid, siteproperty, null, null, null, document);
}
 
Example #22
Source File: PACSPort.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * This operation allows disabling an access point.
 * </p><p>
 * A device that signals support for DisableAccessPoint capability for a particular AccessPoint
 * instance shall implement this command.
 * </p><p>
 *       
 */
@WebMethod(operationName = "DisableAccessPoint", action = "http://www.onvif.org/ver10/accesscontrol/wsdl/DisableAccessPoint")
@RequestWrapper(localName = "DisableAccessPoint", targetNamespace = "http://www.onvif.org/ver10/accesscontrol/wsdl", className = "org.onvif.ver10.accesscontrol.wsdl.DisableAccessPoint")
@ResponseWrapper(localName = "DisableAccessPointResponse", targetNamespace = "http://www.onvif.org/ver10/accesscontrol/wsdl", className = "org.onvif.ver10.accesscontrol.wsdl.DisableAccessPointResponse")
public void disableAccessPoint(

    @WebParam(name = "Token", targetNamespace = "http://www.onvif.org/ver10/accesscontrol/wsdl")
    java.lang.String token
);
 
Example #23
Source File: DocumentService.java    From document-management-system with GNU General Public License v2.0 5 votes vote down vote up
@WebMethod
public void purgeVersionHistory(@WebParam(name = "token") String token, @WebParam(name = "docPath") String docPath)
		throws AccessDeniedException, PathNotFoundException, LockException, RepositoryException, DatabaseException {
	log.debug("purgeVersionHistory({}, {})", token, docPath);
	DocumentModule dm = ModuleManager.getDocumentModule();
	dm.purgeVersionHistory(token, docPath);
	log.debug("purgeVersionHistory: void");
}
 
Example #24
Source File: SecurityTokenService.java    From steady with Apache License 2.0 5 votes vote down vote up
@WebResult(name = "RequestSecurityTokenResponseCollection",
           targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512",
           partName = "responseCollection")
@Action(input = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue", 
        output = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal")
@WebMethod(operationName = "Issue")
RequestSecurityTokenResponseCollectionType issue(
    @WebParam(partName = "request",
              name = "RequestSecurityToken", 
              targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
    RequestSecurityTokenType request
);
 
Example #25
Source File: WebServiceVisitor.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) {
    boolean valid = true;
    if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) {
        // this is an error, cannot be OneWay and have a return type
        builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method);
        valid = false;
    }
    VariableElement outParam = getOutParameter(method);
    if (outParam != null) {
        builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam);
        valid = false;
    }
    if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
        int inCnt = getModeParameterCount(method, WebParam.Mode.IN);
        if (inCnt != 1) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method);
            valid = false;
        }
    }
    for (TypeMirror thrownType : method.getThrownTypes()) {
        TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement();
        if (builder.isServiceException(thrownType)) {
            builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(
                    typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method);
            valid = false;
        }
    }
    return valid;
}
 
Example #26
Source File: TIPPortType.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
@WebMethod(
   action = "urn:be:fgov:ehealth:gfddpp:protocol:v1:CheckAliveTIP"
)
@WebResult(
   name = "CheckAliveTIPResponse",
   targetNamespace = "urn:be:fgov:ehealth:gfddpp:protocol:v1",
   partName = "body"
)
RoutedCheckAliveResponseType checkAliveTIP(@WebParam(name = "CheckAliveTIPRequest", targetNamespace = "urn:be:fgov:ehealth:gfddpp:protocol:v1", partName = "body") CheckAliveRequestType var1) throws SystemError_Exception;
 
Example #27
Source File: EmployeeService.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * 
 * @param arg0
 * @return
 *     returns boolean
 * @throws EmployeeNotFound_Exception
 */
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "deleteEmployee", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.DeleteEmployee")
@ResponseWrapper(localName = "deleteEmployeeResponse", targetNamespace = "http://bottomup.server.jaxws.baeldung.com/", className = "com.baeldung.jaxws.client.DeleteEmployeeResponse")
@Action(input = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/deleteEmployeeRequest", output = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/deleteEmployeeResponse", fault = {
    @FaultAction(className = EmployeeNotFound_Exception.class, value = "http://bottomup.server.jaxws.baeldung.com/EmployeeService/deleteEmployee/Fault/EmployeeNotFound")
})
public boolean deleteEmployee(
    @WebParam(name = "arg0", targetNamespace = "")
    int arg0)
    throws EmployeeNotFound_Exception
;
 
Example #28
Source File: DeviceIOPort.java    From onvif with Apache License 2.0 5 votes vote down vote up
/**
 * This operation lists what configuration is available for digital inputs.
 *       
 */
@WebMethod(operationName = "GetDigitalInputConfigurationOptions", action = "http://www.onvif.org/ver10/deviceio/wsdl/GetDigitalInputConfigurationOptions")
@RequestWrapper(localName = "GetDigitalInputConfigurationOptions", targetNamespace = "http://www.onvif.org/ver10/deviceIO/wsdl", className = "org.onvif.ver10.deviceio.wsdl.GetDigitalInputConfigurationOptions")
@ResponseWrapper(localName = "GetDigitalInputConfigurationOptionsResponse", targetNamespace = "http://www.onvif.org/ver10/deviceIO/wsdl", className = "org.onvif.ver10.deviceio.wsdl.GetDigitalInputConfigurationOptionsResponse")
@WebResult(name = "DigitalInputOptions", targetNamespace = "http://www.onvif.org/ver10/deviceIO/wsdl")
public org.onvif.ver10.deviceio.wsdl.DigitalInputConfigurationInputOptions getDigitalInputConfigurationOptions(

    @WebParam(name = "Token", targetNamespace = "http://www.onvif.org/ver10/deviceIO/wsdl")
    java.lang.String token
);
 
Example #29
Source File: SampleResource.java    From jerseyoauth2 with MIT License 5 votes vote down vote up
@GET
@Path("/{id}")
@Produces({ MediaType.APPLICATION_JSON })
@OAuth20
@AllowedScopes(scopes={"test1", "test2"})
public SampleEntity getEntity(@WebParam(name="id") String id, @Context SecurityContext securityContext)
{
	IOAuthPrincipal principal = (IOAuthPrincipal)securityContext.getUserPrincipal();
	String username = principal.getUser().getName();
	String clientId = principal.getClientId();
	return new SampleEntity(id, username, clientId);
}
 
Example #30
Source File: Assignments.java    From sakai with Educational Community License v2.0 4 votes vote down vote up
@WebMethod
@Path("/addSubmissionAttachment")
@Produces("text/plain")
@GET
public String addSubmissionAttachment(
        @WebParam(name = "sessionId", partName = "sessionId") @QueryParam("sessionId") String sessionId,
        @WebParam(name = "context", partName = "context") @QueryParam("context") String context,
        @WebParam(name = "submissionId", partName = "submissionId") @QueryParam("submissionId") String submissionId,
        @WebParam(name = "attachmentName", partName = "attachmentName") @QueryParam("attachmentName") String attachmentName,
        @WebParam(name = "attachmentMimeType", partName = "attachmentMimeType") @QueryParam("attachmentMimeType") String attachmentMimeType,
        @WebParam(name = "attachmentData", partName = "attachmentData") @QueryParam("attachmentData") String attachmentData) {


    try {
		// establish the session
		Session s = establishSession(sessionId);
		AssignmentSubmission sub = assignmentService.getSubmission(submissionId);
		
		// create the attachmment
		Base64 decode = new Base64();
		// byte[] photoData = null;
		// photoData = decode.decodeToByteArray(attachmentData);
		byte[] photoData = decode.decode(attachmentData);
		log.info("File of size: " + photoData + " found");
		
		byte[] content = photoData;
				
		ResourcePropertiesEdit rpe = contentHostingService.newResourceProperties();
		rpe.addProperty(rpe.PROP_DISPLAY_NAME, attachmentName);
		
		ContentResource file = contentHostingService.addAttachmentResource(attachmentName,
				context, "Assignments", attachmentMimeType, content, rpe);
		log.info("attachment name is : " + attachmentName);
		log.info("file has lenght of: " + file.getContentLength());
		
		Reference ref = entityManager.newReference(file.getReference());
		sub.getAttachments().add(ref.getReference());
		assignmentService.updateSubmission(sub);
		return "Success!";
	} catch (Exception e) {
		log.error("WS addSubmissionAttachment(): " + e.getClass().getName() + " : " + e.getMessage()); 
        return e.getClass().getName() + " : " + e.getMessage();
	}
	
}