Some back-end datasources require complex types to be passed in as input parameters. The input parameters can be any of the allowed attribute types, including primitive lists, objects, and object lists. The MBO examples have attributes that are primitive types (such as int, long, or string), and make use of the basic database operations (create, update, and delete).
An SAP Mobile WorkSpace project includes an example MBO that is bound to a Web service datasource that includes a create operation that takes a structure as an operation parameter. MBOs differ depending on the datasource, configuration, and so on, but the principles are similar.
AuthenticationInfo userName: String password: String authentication: String locale: String timeZone: String
public void create(complex.AuthenticationInfo _HEADER_,java.lang.String escalated,java.lang.String hotlist,java.lang.String orig_Submitter,java.lang.String pending,java.lang.String workLog)
This example demonstrates how to initialize the AuthenticationInfo class instance and pass it, along with the other operation parameters, to the create operation:
AuthenticationInfo authen = new AuthenticationInfo(); authen.setUserName("Demo"); authen.setPassword(""); authen.setAuthentication(""); authen.setLocale("EN_US"); authen.setTimeZone("GMT"); SimpleCaseList newCase = new SimpleCaseList(); newCase.setCase_Type("Incident"); newCase.setCategory("Networking"); newCase.setDepartment("Marketing"); newCase.setDescription("A new help desk case."); newCase.setItem("Configuration"); newCase.setOffice("#3 Sybase Drive"); newCase.setSubmitted_By("Demo"); newCase.setPhone_Number("#0861023242526"); newCase.setPriority("High"); newCase.setRegion("USA"); newCase.setRequest_Urgency("High"); newCase.setRequester_Login_Name("Demo"); newCase.setRequester_Name("Demo"); newCase.setSite("25 Bay St, Mountain View, CA"); newCase.setSource("Requester"); newCase.setStatus("Assigned"); newCase.setSummary("MarkHellous was here Fix it."); newCase.setType("Access to Files/Drives"); newCase.setCreate_Time(new java.sql.Timestamp(System.currentTimeMillis())); newCase.create(authen, "Other", "Other", "Demo", "false", "worklog"); newCase.submitPending();