Skip to content

Commit

Permalink
Resolved major issue with unmarshalling AMF during proxy sampling.
Browse files Browse the repository at this point in the history
  • Loading branch information
steeltomato committed Oct 6, 2011
1 parent 19e3c30 commit 33be913
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
@@ -1,8 +1,9 @@
Changelog
---------------------

### Unreleased
### Version 1.2
* Build process cleanup
* Resolved issue with the AMF proxy being unable to sample command messages

### Version 1.1
* Store response as XML in a variable for assertion and post-processing.
Expand Down
Expand Up @@ -456,14 +456,13 @@ private void populateSampler(Map<String, String> pageEncodings, Map<String, Stri
sampler.parseArguments(postData.trim(), contentEncoding); //standard name=value postData
} else if (postData.length() > 0) {
if (amf) {
//sampler.setProperty(AmfSampler.RAWAMF, postData);
// If AMF, attempt to convert it to XML
//sampler.setProperty(AmfRequest.RAWAMF, postData);
// If AMF, try to process the request and store it
if (postData != null && postData.length() > 0) {
String xml = AmfXmlConverter.convertAmfMessageToXml(postData.getBytes());
sampler.setProperty(AmfRequest.AMFXML, xml);
String xml = AmfXmlConverter.convertAmfMessageToXml(postData.getBytes());
sampler.setProperty(AmfRequest.AMFXML, xml);
}

}
else if (isBinaryContent(contentType)) {
try {
Expand Down
Expand Up @@ -144,7 +144,7 @@ public static String convertAmfMessageToXml(byte[] amf) {
// Class aliases for deserialization, mimics registerClassAlias in Flex
// TODO: Allow user configuration
ClassAliasRegistry aliases = ClassAliasRegistry.getRegistry();
aliases.registerAlias("DSC", "flex.messaging.messages.CommandMessageExt");
//aliases.registerAlias("DSC", "flex.messaging.messages.CommandMessageExt"); // This causes errors in XStream during sampling (cannot cast byte to string)
aliases.registerAlias("DSK", "flex.messaging.messages.AcknowledgeMessageExt");

// TODO: Maybe allow user configuration
Expand Down

0 comments on commit 33be913

Please sign in to comment.