Service Development

  • Prefetch Option in properties
 You use the Prefetch property to specify whether you want the server to automatically refresh the cache for this service when it expires.
If you set Prefetch to True, the server automatically re-executes the service (using the same set of inputs as before) to update its results in cache.

Avoid prefetch property for Java/C++ services that invoke access-controlled services. Such services will fail during prefetch because the embedded service will be

invoked without the proper access privileges.

Prefetch activation property, specify the minimum number of hits needed to activate the use of prefetch.

 

  • URL Aliases for Services
If you enter “test” in the HTTP URL alias property and save the service

Then http://IS_server:5555/invoke/folder.subFolder/serviceName =http://IS_server:5555/test

or

http://IS_server:5555/rest/folder/Resource= http://IS_server:5555/test

 

  • Service Auditing
  •  

Error Auditing

  1. Enable auditing When top-level service only Note: If you want to be able to audit all failed invocations of this service, select Always.

  2. Include pipeline On errors only

  3. Log on Error only

Service Auditing

  1. Enable auditing When top-level service only

  2. Log on Error and success

  3. Include pipeline Never Note: Configure a service to save a copy of the input pipeline only if you intend to re-invoke the service using the resubmission capabilities of the webMethods Monitor

Auditing for Recovery

  1. Enable auditing When top-level service only
  2. Log on Error and success
  3. Include pipeline Always

 

  • Java service editor.

The Java service editor has four tabs:

                Source Tab

                Input/Output

                Logged tab

                Comments

A Java service is a public static method in a Java class file on Integration Server
    • Naming formation in Java service

Ans : For example, a service named recording.accounts:createAccount is made up of a Java method called
createAccount in a Java class called accounts within the recording package.
    • Using an IData Object for the Java Service Input and Output
Ans: An IData object is the universal container that Java services use for service input and output.

When the Java service is invoked, Integration Server passes the IData object to it.
The service needs to get the input values it needs from the key/value pairs within the IData object.
The following sample code uses methods of the IDataCursor class to position the cursor and uses the getValue method to get the input value of the myVariable input variable from the IData object




: public final static void myservice (IData pipeline)




       throws ServiceException  {     IDataCursor myCursor = pipeline.getCursor();  

  if (myCursor.first( "inputValue1" ))

{         String myVariable = (String) myCursor.getValue();          .          .     }     myCursor.destroy();           .           .     return;     }


Leave A Comment?