Siebel Adapter 6.0 SP3 | webMethods Siebel Adapter Documentation | webMethods Siebel Adapter Installation and User’s Documentation | webMethods-To-Siebel Communication | Configuring Attachment Services | Testing the Attachment Service
 
Testing the Attachment Service
To test an Attachment service, you can run it from either Digital Event Services or Designer before you run it in a flow or Java service. You can run any Attachment service to either create, update, or obtain an attachment file. To do this, at run time you specify that the Attachment service invokes one of the following Siebel methods:
Siebel Method
Description
CreateFile
Creates a file in the Siebel file system from an external source.
GetFile
Obtains a file from the Siebel file system and places that file on the local file system of the Siebel Server.
PutFile
Updates a file in the Siebel file system with the version of the file on the client machine.
The following procedure describes how to test an Attachment service by running it directly from Digital Event Services or Designer. The procedure provides example values for an Attachment service that invokes the CreateFile method for a business object named Contact and a business component named ContactAttachment.
*To test an Attachment service from Digital Event Services or Designer
1. If you are using Digital Event Services, set the view to the Test perspective.
2. In Digital Event Services or Designer, expand the package and folder that contain the service you want to test.
3. Double-click the service you want to test.
Digital Event Services or Designer displays the configured service in the service template's Adapter Service Editor.
4. Perform one of the following
*If you are using Digital Event Services, select Test > Run.
*If you are using Designer, select Run > Run As > Run Service.
5. To connect to the Siebel Server using credentials that are different than the credentials provided at design time, specify the username and password here.
Parameter
Description/Action
user
The user name used to connect to the Siebel Server.
password
The password used to connect to the Siebel Server.
Note:
If you do not provide the user credentials here, the user credentials specified when the connection was configured are used. For more information, see Configuring Adapter Connections and Passing Credentials at Run Time while Invoking an Adapter Service.
6. A pop-up dialog box appears, with input parameters for the service. Complete the dialog box appropriately for the Siebel method you want the Attachment service to invoke, as follows:
*To invoke the Siebel method CreateFile, complete the dialog box as follows:
CreateFile Input Parameter
Description/Action
Method_To_Invoke
Specify CreateFile.
Keep_Link
Applies to URLs. Specify Y (Yes) or N (No) depending on whether a link to the file is stored as an attachment instead of the actual file. The example specifies Y.
Path_To_Source_File
Specify the fully qualified path of the file. The file can be located on the Siebel Server or on another computer that the Siebel Server can access.
Key_Field_Name
Specify the name of the field in the business component that contains the file name. In the example, this is ContactFileName, which is a Siebel field in the ContactAttachment business component.
Name_Of_ID_Field
Specify the ID field of the attachment business component. In the example, this is the field Contact Id of the business component ContactAttachment.
ID
The Siebel Row-id value of the attachment you are creating. In the example, this is the Row # of the contact to which this attachment is assigned.
*To invoke the Siebel method GetFile, complete the dialog box as follows:
GetFile Input Parameter
Description/Action
Method_To_Invoke
Specify GetFile.
Keep_Link
Leave blank.
Path_To_Source_File
Leave blank.
Key_Field_Name
Specify the name of the field in the business component that contains the file name. In the example, you would specify ContactFileName, which is a Siebel field in the ContactAttachment business component.
Name_Of_ID_Field
Leave blank.
ID
The Siebel Row-id value of the attachment you are retrieving.
*To invoke the Siebel method PutFile, complete the dialog box as follows:
PutFile Input Parameter
Description/Action
Method_To_Invoke
Specify PutFile.
Keep_Link
Leave blank.
Path_To_Source_File
Specify the fully qualified path of the file on the Siebel Server.
Key_Field_Name
Specify the name of the field in the business component that contains the file name. In the example, you would specify ContactFileName, which is a Siebel field in the ContactAttachment business component.
Name_Of_ID_Field
Leave blank.
ID
The Siebel Row-id value of the attachment you are updating.
7. Click OK.
8. Click the Results tab to view the output from this service. The output is a string field named Status, which indicates Success or Failure. If the service invoked a GetFile method, the field also indicates the path of the attachment returned by the service.
Note:
To pass empty values for particular fields, leave those fields blank and select the option Include empty values for String Types.