以下のコードは、インターフェイスとリモートオブジェクトが同じファイルにコード化されていることを示しています。Flash Builderでリモートオブジェクトとインターフェイスを分離する方法Flex
現在のコード:やっての
<s:RemoteObject id="ro"
destination="customerService"
source="customerService"
endpoint="http://localhost/amfphp/gateway.php"
showBusyCursor="true">
<s:method name="getCustomer" result="getCustomer_resultHandler(event)">
<s:arguments>
<CusOpt>{''}</CusOpt>
<option>{''}</option>
<idcompany>{2}</idcompany>
</s:arguments>
</s:method>
<s:method name="genPKID" result="genPKID_resultHandler(event)">
<s:arguments>
<idcompany>{2}</idcompany>
</s:arguments>
</s:method>
</s:RemoteObject>
間違った方法:
import mx.rpc.remoting.RemoteObject;
public class CustomerRO extends RemoteObject
{
public function CustomerRO(destination:String=null)
{
super(destination);
this.destination = "customerService";
this.source = "customerService";
this.endpoint = "http://localhost/amfphp/gateway.php";
this.showBusyCursor = true;
}
}