Example: Setup and invoke flex_amf_call

In this example, the script sets up and then executes an amf_call.

web_url("amf",
	"URL=http://myServer/amf/",
	"Resource=0",
	"RecContentType=text/html",
	"Referer=",
	"Snapshot=t9.inf",
	"Mode=HTML",
	EXTRARES,
	"Url=MercuryAMF.mxml.swf", ENDITEM,
	LAST);

web_url("inputXML.xml",
	"URL=http://myServer/AMF/EchoAMF/pub/inputXML.xml",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=http://myServer/amf/echoamf/EchoAMF.mxml.swf",
	"Snapshot=t11.inf",
	"Mode=HTML",
	LAST);

web_url("GBOOK.XML",
	"URL=http://myServer/AMF/EchoAMF/pub/GBOOK.XML",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=http://myServer/amf/echoamf/EchoAMF.mxml.swf",
	"Snapshot=t12.inf",
	"Mode=HTML",
	LAST);

web_url("simple.xml",
	"URL=http://myServer/AMF/EchoAMF/pub/simple.xml",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=http://myServer/amf/echoamf/EchoAMF.mxml.swf",
	"Snapshot=t13.inf",
	"Mode=HTML",
	LAST);

web_url("encoding_attr.xml",
	"URL=http://myServer/AMF/EchoAMF/pub/encoding_attr.xml",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=http://myServer/amf/echoamf/EchoAMF.mxml.swf",
	"Snapshot=t14.inf",
	"Mode=HTML",
	LAST);

web_url("Calc.asmx.wsdl",
	"URL=http://myServer/AMF/EchoAMF/pub/Calc.asmx.wsdl",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=http://myServer/amf/echoamf/EchoAMF.mxml.swf",
	"Snapshot=t15.inf",
	"Mode=HTML",
	LAST);

web_url("crossdomain.xml",
	"URL=http://server2/crossdomain.xml",
	"Resource=0",
	"RecContentType=text/xml",
	"Referer=",
	"Snapshot=t16.inf",
	"Mode=HTML",
	LAST);

flex_amf_define_header_set("ID=amf_headers",
	HEADER,
	"Name=Credentials",
	"MustUnderstand=false",
	"Data=<object><string name=\"password\">indubitably</string><string name=\""
	"userid\">astra</string></object>",
	HEADER,
	"Name=SimpleHeader",
	"MustUnderstand=false",
	"Data=<object><string name=\"Number\">12345678987654321.555444333222111"
	"</string><string name=\"String\">qwerty</string></object>",
	HEADER,
	"Name=AMF custom Header1",
	"MustUnderstand=true",
	"Data=<object><string name=\"name\">QA Tester</string><number name=\""
	"age\">32</number><string name=\"phone\">123-1234</string><date name=\""
	"curr_date\" localOffset=\"-180\">09-Apr-1968 15:59:59.000</date></"
	"object>",
	LAST);

flex_amf_define_envelope_header_set("ID=env_headers",
	HEADER,
	"<strictArray length=\"3\"><string>EnvHead3</string><boolean>false</"
	"boolean><object><object name=\"qname\"><string name=\"localPart\""
	">Header3</string><string name=\"namespaceURI\">http://my_soap_interop.co.il/"
	"xsd</string></object><object name=\"content\"><string name=\"Number\""
	">789</string><string name=\"String\">Third Header</string></object></"
	"object></strictArray>",
	LAST);

flex_amf_call("EchoAny",
	"Gateway=http://server2/AMF/EchoAMF/gateway.aspx",
	"AMFHeaderSetId=amf_headers",
	"Snapshot=t17.inf",
	MESSAGE,
	"Method=EchoAMF.EchoAMF.EchoAny",
	"TargetObjectId=/1",
	"EnvelopeHeaderSetId=env_headers",
	BEGIN_ARGUMENTS,
		"<null></null>",
		"<boolean>true</boolean>",
		"<number>1.23456789876543e+016</number>",
		"<string>"
			"<![CDATA[yy & sss]]>"
		"</string>",
		"<date localOffset=\"-120\">09-Mar-1968 16:59:59.123</date>",
		"<xmlData>"
			"<![CDATA[<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>"
		"<catalog>"
			"<country id=\"UK\">England"
				"<text>Copyright 2002 MyCorp Inc. All rights reserved.</text>"
			"</country>"
			"<country id=\"Special Noel\">France"
				"<text>Special Nouvelle Annee 2003</text>"
			"</country>"
			"<country id=\"DE\">Germany"
				"<text>Sich für meine server! Grusskarten.</text>"
			"</country>"
			"<country id=\"NO\">Norway"
				"<text>Nettstedet ditt vurdert i lopet av 7 dager.</text>"
			"</country>"
			"<country id=\"SE\">Sweden"
				"<text>Vara frisk i år</text>"
			"</country>"
			"<country id=\"DK\">Denmark"
				"<text>Være sund i år</text>"
			"</country>"
		"</catalog>]]>"
		"</xmlData>",
				"<object>"
			"<string name=\"name\">Yaron</string>"
			"<number name=\"age\">33</number>"
			"<ECMAArray name=\"languages\" length=\"4\">"
				"<string name=\"1\">JAVA</string>"
				"<string name=\"2\">Assembler</string>"
				"<string name=\"prefers\">C++</string>"
			"</ECMAArray>"
		"</object>",
			"<typedObject className=\"EchoAMF.QATester\">"
			"<string name=\"name\">Leon</string>"
			"<number name=\"age\">37</number>"
			"<strictArray name=\"languages\" length=\"3\">"
				"<string>VB</string>"
				"<string>JAVA</string>"
				"<object>"
					"<string name=\"prefers\">VB.NET</string>"
				"</object>"
			"</strictArray>"
		"</typedObject>",
	END_ARGUMENTS,
	LAST);