Designer 10.15 | webMethods Service Development Help | Building C/C++ Services | C/C++ Service Editor | Source Tab
 
Source Tab
 
Protected Sections of a C/C++ Service
Editable Sections of a C/C++ Service
You specify the code for the C/C++ service in the Source tab, which extends the standard Eclipse Java editor. Because the Eclipse Java editor requires source files to be in the local workspace, Designer also requires source files to be in the local workspace. To achieve this, Designer adds Java classes to a Service Development Project, which is a project with extensions to support Java services. For more information, see Service Development Projects in the Local Workspace.
The full capabilities of the Eclipse Java editor are available. These include source code formatting and code completion. However, unlike the Eclipse Java editor, the Designer C/C++ service editor protects the sections of a C/C++ service that contain required code to prevent structural damage to the service. The following illustrates the contents of the Source tab for a newly created service.
Package definition
package orders.orderStatus;
Add additional imports here
import com.wm.data.*;
import com.wm.util.Values;
import com.wm.app.b2b.server.Service;
import com.wm.app.b2b.server.ServiceException;
import com.wm.app.b2b.server.Session;
import com.wm.util.JournalLogger;
import com.wm.util.DebugMsg;
Class definition
public final class checkStatus_SVC
Add extends and implements here
Primary method definition
{
/**
* The primary method for the C service
*
* @param in
*
The input Values * @return The output Values
*/
public static final Values checkStatus(Values in)
{
// --- <<IS-GENERATED-CODE-1-START>> ---
Values out = in;
// --- <<IS-GENERATED-CODE-1-END>> ---
out = ccheckStatus(Service.getSession(), in);
Add source code for the primary method here
// --- <<IS-GENERATED-CODE-2-START>> ---
return out;
// --- <<IS-GENERATED-CODE-2-END>> ---
}
Add shared code here
// --- <<IS-BEGIN-SHARED-SOURCE-AREA>> ---0
static {
try {
System.loadLibrary("orders_orderStatus");
JournalLogger.log(DebugMsg.LOG_MSG,
JournalLogger.FAC_PACKAGE,
JournalLogger.INFO,
"Loading
native library: orders_orderStatus");
} catch (UnsatisfiedLinkError e)
{
JournalLogger.logError(DebugMsg.LOG_MSG,
JournalLogger.FAC_PACKAGE,
e.getMessage());
}
}
native static Values ccheckStatus(Session
session, Values in);
// --- <<IS-END-SHARED-SOURCE-AREA>> ---
Final “}”
}
Related Topics
Protected Sections of a C/C++ Service
Editable Sections of a C/C++ Service