We are working on DevTest 8.3 version. We need to create a virtual service which would download a file when hit on respective end point.
Can any one suggest me steps or document or link for creating such kind of virtual service.
From your description, it sounds like you have a service that will trigger a download of a file to a specific location, which may not be the computer that initiated the request. It sounds like that download won’t be part of the response but instead is a separate asynchronous action.
In that scenario, you can add a step into the virtual service model to do the file transfer. Note depending on the protocol (FTP, SCP, etc) used for the transfer, the step you’ll add will be different. Also depending on whether the file needs to change based on the request/response, you can also use filters and possibly a second service image to choose the correct file to transfer.
Hopefully this helps. Let me know if I misunderstood the scenario.
Sr. Principal Consultant
CA Service Virtualization – Application Delivery – CA Technologies Canada
Hi Avbaw, are you wanting to FTP the file from the service when the endpoint is hit or do you want the service to provide a response that has a file as an attachment?
For FTP, review the External FTP step which resides under the Subprocess Step menu. External - FTP Step - DevTest Solutions - 8.3 - CA Technologies Documentation
If your service needs to respond with an attachment, this Tech Tip might help: Tips #47: DevTest 8.2 - How To - Service Virtualization - SOAP With Attachments
Thanks a lot for inputs,
File should be downloaded in respective system/server when user access our virtual service end point through his programming language
There should not be any response message sent with attachment.
OK, so check out the link to External FTP Step description.
If the FTP must occur before the service responds to the client, the FTP step goes prior to (or in front of) the Responder step. If the files are large and you send the file prior to responding, you need to understand how long the HTTP connection is left open vs how long the FTP takes to determine if there is a potential for connection issues.
If you want the response to the client on the wire first and then FTP, you can place the step after the Responder step and have the FTP step loop back to the Listen step.
If the service has Live Invocation functionality, you need to address that behavior so a file is not sent from both your service and the Live System.
Thanks Joel, Will work towards this solution. If required will connect again.
I don't have currently FTP server host details where I want upload specific file in that syste.
Hence to validate the solution, I am trying to upload the file in Amazon Linux instance, I have no restrictions in accessing the Amazon instance, i am able to do it with FTP tools.
But when I try it with DevTest 8.3 FTP step, it is giving me error as
| Message: Error executing FTP: null
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Since you appears to be a using a test submitted from Workstation, take a look in your workstation.log file and see if a better error / exception was produced describing the failure. For Windows, this file is likely in your C:/users/<yourID>/lisatmp_8.3 directory.
Also, since this is a ZIP file, would you not want to use Binary instead of ASCII transfer?
Thanks Casey to provide more detailed information will work and let you know for any support.
Retrieving data ...