从 Flex 应用程序发送服务请求(PHP 服务)时,它正在向服务器执行多个服务请求。我们怎样才能避免第一次打电话?
While sending a service request (PHP Service) from Flex application, it is executing multiple service request to server. How can we avoid first call?
从 Adobe Flex 应用程序发送服务请求(PHP 服务)时,它正在向服务器调用多个服务请求。我们怎样才能避免先打电话呢?
请帮我解决一下。
第一个是操作 => 5 的空白服务。
我们可以通过 firebug(浏览器 -> 开发人员工具)
显示空白服务调用
示例 Flex 代码:
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:RemoteObject id="CustomerRo" destination="customerService" endpoint="<SERVER URL>"
showBusyCursor="false" source="customerService" concurrency="single" >
<s:method name="customerLogin" fault=""
result="method1_resultHandler(event)" />
</s:RemoteObject>
</fx:Declarations>
<s:Button click="button1_clickHandler(event)" label="Send" />
我相信 5 是 AMF 协议的一部分,表示命令操作是服务器应该期望的下一个操作。
我们需要在 flex 应用程序中进行以下更改,以避免每个请求重复调用
- 将“services-config.xml”添加到应用程序文件夹。(参考:https://gist.github.com/hui/268372)
- 将配置文件路径添加到 Flex 编译器,(项目->属性->Flex 编译器)
示例:-locale en_US -services "C:\Location/services-config.xml"
- 在每个模块的代码库中更改此属性
发件人:< s:RemoteObject id="CustomerRo" 目的地="customerService" endpoint="< SERVER URL >" showBusyCursor="false" source="customerService" 并发="single" >
收件人:< s:RemoteObject id="CustomerRo" destination="amfora" showBusyCursor="false" source="customerService" concurrency="single" >
[注意:目的地应等于 <目的地 id="amfora" > 在“服务-config.xml”]
从 Adobe Flex 应用程序发送服务请求(PHP 服务)时,它正在向服务器调用多个服务请求。我们怎样才能避免先打电话呢?
请帮我解决一下。
第一个是操作 => 5 的空白服务。 我们可以通过 firebug(浏览器 -> 开发人员工具)
显示空白服务调用示例 Flex 代码:
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:RemoteObject id="CustomerRo" destination="customerService" endpoint="<SERVER URL>"
showBusyCursor="false" source="customerService" concurrency="single" >
<s:method name="customerLogin" fault=""
result="method1_resultHandler(event)" />
</s:RemoteObject>
</fx:Declarations>
<s:Button click="button1_clickHandler(event)" label="Send" />
我相信 5 是 AMF 协议的一部分,表示命令操作是服务器应该期望的下一个操作。
我们需要在 flex 应用程序中进行以下更改,以避免每个请求重复调用
- 将“services-config.xml”添加到应用程序文件夹。(参考:https://gist.github.com/hui/268372)
- 将配置文件路径添加到 Flex 编译器,(项目->属性->Flex 编译器) 示例:-locale en_US -services "C:\Location/services-config.xml"
- 在每个模块的代码库中更改此属性
发件人:< s:RemoteObject id="CustomerRo" 目的地="customerService" endpoint="< SERVER URL >" showBusyCursor="false" source="customerService" 并发="single" >
收件人:< s:RemoteObject id="CustomerRo" destination="amfora" showBusyCursor="false" source="customerService" concurrency="single" >
[注意:目的地应等于 <目的地 id="amfora" > 在“服务-config.xml”]