For Flex+java use remoteobject communication error Channel.Connect.Failed error NetConnection.Call.Failed 404

Source: Internet
Author: User

When using RemoteObject for Java calls in flex today, the error

[RPC Fault faultstring= "Send failed" faultcode= "Client.Error.MessageSend" faultdetail= "Channel.Connect.Failed Error NetConnection.Call.Failed:HTTP:Status 404:url: ' HTTP://LOCALHOST:8080/UNITCITY/MESSAGEBROKER/AMF ', so Baidu, online saying a lot , up to the following two scenarios:

First case:

[RPC Fault faultstring= "Send failed" faultcode= "Client.Error.MessageSend" faultdetail= "Channel.Connect.Failed Error NetConnection.Call.Failed:HTTP:Status 404:url: ' HTTP://LOCALHOST:8889/WEBCONTENT/MESSAGEBROKER/AMF ' "]

When the URL is webcontent instead of the project name: This is mainly due to the setting of the context root problem, modify the project name can be;

Method: Right-click Project-Properties-flex Server-context Root (/project name)

Second case:

[RPC Fault faultstring= "Send failed" faultcode= "Client.Error.MessageSend" faultdetail= "Channel.Connect.Failed Error NetConnection.Call.Failed:HTTP:Status 404:url: ' HTTP://LOCALHOST:8080/UNITCITY/MESSAGEBROKER/AMF ' "]

In response to this situation, it is said that Tomcat is a problem, some say that the remoteobject call needs to add endpoint= "http://localhost:8080/project name/MESSAGEBROKER/AMF";

<mx:remoteobject id= "Tpublicuserservice" destination= "Tpublicuserservice" endpoint= "http://localhost:8080/Project name/ MESSAGEBROKER/AMF ">

</mx:RemoteObject>

And I have configured this at the time of invocation, but there is still a problem, and that is the third case,

The third case (my case):

So I went on to find the reason: Because I only configured the Flex listener in Web. XML, and forgot to configure the servlet, the workaround is as follows:

It is also said that adding the following can be, specifically no test:

<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

For Flex+java use remoteobject communication error Channel.Connect.Failed error NetConnection.Call.Failed 404

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.