UFT APIはパラメータをXML構造として扱います。パラメータ値もXML構造であるため、XMLとしてではなくテキスト(エスケープされた)として渡す必要があります。だから、これに代えて:
<?xml version="1.0" encoding="UTF-8"?><shiporder orderid="889923" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="shiporder.xsd"><orderperson>John Smith</orderperson><shipto><name>Ola Nordmann</name><address>Langgt 23</address><city>4000 Stavanger</city><country>Norway</country></shipto><item><title>Empire Burlesque</title><note>Special Edition</note><quantity>1</quantity><price>10.90</price></item><item><title>Hide your heart</title><quantity>1</quantity><price>9.90</price></item></shiporder>
あなたはこれを渡す必要があります。http://www.freeformatter.com/xml-escape.html
EDIT:
ここ
<?xml version="1.0" encoding="UTF-8"?><shiporder orderid="889923" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="shiporder.xsd"><orderperson>John Smith</orderperson><shipto><name>Ola Nordmann</name><address>Langgt 23</address><city>4000 Stavanger</city><country>Norway</country></shipto><item><title>Empire Burlesque</title><note>Special Edition</note><quantity>1</quantity><price>10.90</price></item><item><title>Hide your heart</title><quantity>1</quantity><price>9.90</price></item></shiporder>
あなたはあなたのXMLを脱出を助けることができるオンラインツールを見つけることができます
これを回避する動的な方法は、自動的にXML値をパラメータにエスケープするコードを含めることですAPIテストを呼び出すステップを実行する前に例:
public void CallSTTest4_OnBeforeExecuteStepEvent(object sender, STActivityBaseEventArgs args)
{
CallSTTest4.InputProperties.GetElementsByTagName("XMLString").Item(0).InnerXml = System.Security.SecurityElement.Escape(CallSTTest4.InputProperties.GetElementsByTagName("XMLString").Item(0).InnerXml);
}
注:私の場合はは、XML構造を含む入力パラメータである "XMLString"