For testing Flex/AMF3 applications based on the Adobe or BlazeDS implementation, Java Development Kit 1.5 or later is required.
For testing Flex/AMF3 applications based on the GraniteDS implementation, Java Development Kit 1.6 or later is required.
Transformation is enabled for HTTP requests and responses that have the HTTP header Content-Type set to "application/x-amf". If you need to transform data with a different HTTP Content-Type header, see Transformation of Custom Content-Types.
For testing Flex/AMF3 applications based on the Adobe or BlazeDS implementation, select the Flex/AMF3 (Adobe) application type on the Outline Project dialog.
For testing Flex/AMF3 applications based on the GraniteDS implementation, select the Flex/AMF3 (GraniteDS) application type on the Outline Project dialog.
WebPagePost(WebEngine: 82 - Content transformation error, RESPONSE: AMF3: Java based XML generation failed, using fallback, reason: org.granite.messaging.amf.io.AMF3SerializationException … Caused by: java.lang.RuntimeException: The ActionScript3 class bound to org.granite.example.addressbook.entity.Person (ie: [RemoteClass(alias="org.granite.example.addressbook.entity.Person")]) implements flash.utils.IExternalizable but this Java class neither implements java.io.Externalizable nor is in the scope of a configured externalizer (please fix your granite-config.xml) …
Using the JVM requires the configuration of Flex/AMF3 application-specific custom JAR files that contain the classes that are necessary for serialization into correct XML representation. For this reason, when modeling a Flex/AMF3 script, the Model Script dialog includes an Add Custom JAR File(s) button. Click this button to browse to and Add any custom JAR files that are specific to the application under test. Added JAR files are displayed within the Project tree Data Files node.
These required JAR files (or individual .class files) are located on the server to be tested. These files must be prepared manually and copied from the server to the Silk Performer controller machine. It may be that the only required task is to place individual .class files into an archive.
Clicking Settings on the Model Script dialog links you directly to the current user profile, Java Settings tab. Use this to change Java settings for the currently selected user profile.
The Apache Flex 2, 3, 4 and BlazeDS 3.2.0 base JAR files are installed in the directory C:\Program Files(x86)\Silk\Silk Performer <version>\ClassFiles\Adobe-Flex. These JAR files are automatically added to the classpath. These files may be manually updated by copying new versions of flex-messaging-common.jar and flex-messaging-core.jar into the directory.
Make sure that you have the GraniteDS base JAR files on your machine and then add these JAR files to the classpath.
While recording a user transaction, the Silk Performer recorder creates a so-called Silk Performer capture file, which contains the entire traffic of the recorded session. After saving, the capture file is opened in the Workbench for further analysis and processing. Before generating a script from the captured traffic, you can configure recording rules and other settings, which are applied during the script generation process.
If any errors occur, click the buttons in the Resolve Problems area to resolve them. Then, click Generate Script to generate a script from the capture file.
If your Java configurations are incorrect (for example, if JAR files are missing), XML responses (only visible in TrueLog Explorer) will not be generated in an easily readable format. Also warnings or errors will be written to the Virtual User Output pane. Typically, errors and warnings indicate whether or not they were caused by requests (client to server) or responses (server to client).
Do not change the overall structure of XML objects within AMF3 scripts. It is okay to parse values or insert verification functions, but deleting or rearranging AMF3 XML elements will destroy a call. Also do not change the order of elements within arrays.
Command message example:
<AmfXml version="3"> <Msg length="203" operation="null" responseURI="/1"> <StrictArray nrElems="1"> <Amf3> <JavaObject> <flex.messaging.messages.CommandMessage> <destination></destination> <messageId>3EE7E87A-96E6-3272-30F7-FFEF6B9EFE9E</messageId> <timestamp>0</timestamp> <timeToLive>0</timeToLive> <headers> <entry> <string>DSId</string> <string>nil</string> </entry> </headers> <body class="flex.messaging.io.amf.ASObject" serialization="custom"> <unserializable-parents></unserializable-parents> <map> <default> <loadFactor>0.75</loadFactor> <threshold>12</threshold> </default> <int>16</int> <int>0</int> </map> <flex.messaging.io.amf.ASObject> <default> <inHashCode>false</inHashCode> <inToString>false</inToString> </default> </flex.messaging.io.amf.ASObject> </body> <correlationId></correlationId> <operation>5</operation> </flex.messaging.messages.CommandMessage> </JavaObject> </Amf3> </StrictArray> </Msg> </AmfXml>
Remoting message example:
<?xml version='1.0' encoding='UTF-8'?> <AmfXml version="3"> <Msg length="394" operation="null" responseURI="/4"> <StrictArray nrElems="1"> <Amf3> <JavaObject> <flex.messaging.messages.RemotingMessage> <clientId class="string">208F18FC-6F0D-9964-3746-76438D73A6A3</clientId> <destination>myextservice</destination> <messageId>A98651D4-690D-E530-B744-FFEF866937C7</messageId> <timestamp>0</timestamp> <timeToLive>0</timeToLive> <headers> <entry> <string>DSId</string> <string>208F0A62-A409-8994-08AF-223CD381602C</string> </entry> <entry> <string>DSEndpoint</string> <string>my-amf</string> </entry> </headers> <operation>setMyExtClass</operation> <parameters> <com.borland.silkperformer.flex.samples.MyExt> <string>string1</string> <string>string2</string> <string>string3</string> <boolean>true</boolean> <date>2009-03-13 14:05:01.545 CET</date> </com.borland.silkperformer.flex.samples.MyExt> </parameters> </flex.messaging.messages.RemotingMessage> </JavaObject> </Amf3> </StrictArray> </Msg> </AmfXml>
Acknowledge message example:
<?xml version='1.0' encoding='UTF-8'?> <AmfXml version="3"> <Msg operation="/5/onResult" responseURI=""> <Amf3> <JavaObject> <flex.messaging.messages.AcknowledgeMessage> <clientId class="string">208F18FC-6F0D-9964-3746-76438D73A6A3</clientId> <messageId>20903C27-020C-F5E6-68E7-C8175449798D</messageId> <timestamp>1236954453026</timestamp> <timeToLive>0</timeToLive> <body class="com.borland.silkperformer.flex.samples.MyExt"> <string>some string</string> <com.borland.silkperformer.flex.samples.MyExt> <string>string1</string> <string>string2</string> <string>string3</string> <boolean>true</boolean> <date>2009-03-13 14:04:58.14 CET</date> </com.borland.silkperformer.flex.samples.MyExt> <string>GET</string> <string>string</string> <boolean>true</boolean> <date>2009-03-13 14:05:01.545 CET</date> </body> <correlationId>C4BD7297-67CB-84AB-0C1A-FFEF8DEB3A97</correlationId> </flex.messaging.messages.AcknowledgeMessage> </JavaObject> </Amf3> </Msg> </AmfXml>