目前我有:
<mx:HTTPService id="userLogin" url="https://api.localhost/api/user/login/" method="POST" resultFormat="e4x" result="doSomeThing(event)">
<mx:request>
<email>{loginUser}</email>
<password>{loginPassword}</password>
</mx:request>
</mx:HTTPService>
而不是这个我有像userCredentials.email和userCredentials.password这样的参数。 我试过这个,但是它的工作很有用。
<mx:HTTPService id="userLogin" url="https://api.localhost/api/user/login/" method="POST" resultFormat="e4x" result="doSomeThing(event)">
<mx:request>
<userCredentials.email>{loginUser}</userCredentials.email>
<userCredentials.password>{loginPassword}</userCredentials.password>
</mx:request>
</mx:HTTPService>
答案 0 :(得分:1)
告诉我们它是否适合您:
<mx:HTTPService id="userLogin" url="https://api.localhost/api/user/login/" method="POST" resultFormat="e4x" result="doSomeThing(event)">
<mx:request>
<userCredentials>
<email>{loginUser}</email>
<password>{loginPassword}</password>
</userCredentials>
</mx:request>
</mx:HTTPService>
你也从http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_5.html看到了这个:
<?xml version="1.0"?>
<!-- fds\rpc\WebServiceSOAPRequest.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="10">
<mx:WebService id="ws" wsdl="http://api.google.com/GoogleSearch.wsdl"
useProxy="true">
<mx:operation name="doGoogleSearch" resultFormat="xml">
<mx:request format="xml">
<ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<key xsi:type="xsd:string">XYZ123</key>
<q xsi:type="xsd:string">Balloons</q>
<start xsi:type="xsd:int">0</start>
<maxResults xsi:type="xsd:int">10</maxResults>
<filter xsi:type="xsd:boolean">true</filter>
<restrict xsi:type="xsd:string"/>
<safeSearch xsi:type="xsd:boolean">false</safeSearch>
<lr xsi:type="xsd:string" />
<ie xsi:type="xsd:string">latin1</ie>
<oe xsi:type="xsd:string">latin1</oe>
</ns1:doGoogleSearch>
</mx:request>
</mx:operation>
</mx:WebService>
</mx:Application>
我的意思是这个mx:请求结构?