1

現在私は持っています:

<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>
4

1 に答える 1

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:request 構造を意味しますか?

于 2010-09-10T09:47:15.853 に答える