大家好,现在接到一个任务要用flex做一个拓补图,双击节点与java通信实现动成的的拓补图。这个demo已经完成了,接下来的任务就是把这个功能放入到一个已经上线的j2ee项目里。按着我个人的理解做了如下操作(firstflex为demo项目,testjavaincludeflex为上线的j2ee项目)
1.将firstflex项目中flexbuilder生成的html,swf文件拷贝到testjavaincludeflex,在testjavaincludeflex根目录下建了一个flex文件夹
[img]http://dl.iteye.com/upload/attachment/600097/eee01add-1a86-3d42-8eeb-9e2f7d7f5b55.gif[/img]
2.将firstflex项目中的flex的配置及jar拷贝testjavaincludeflex
[img]http://dl.iteye.com/upload/attachment/600104/09702963-817d-3bb4-a08c-49ccdba6b91e.gif[/img]
3.更改testjavaincludeflex中web.xml
[code="java"]
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
BlazeDS
BlazeDS Application
<!-- Http Flex Session attribute and binding listener support -->
flex.messaging.HttpFlexSession
<!-- MessageBroker Servlet -->
MessageBrokerServlet
MessageBrokerServlet
flex.messaging.MessageBrokerServlet
services.configuration.file
/WEB-INF/flex/services-config.xml
1
MessageBrokerServlet
/messagebroker/*
index.jsp
[/code]
完成以上步骤,我觉得可以访问相应的swf或html
http://localhost:8080/testjavaincludeflex/flex/birdeyeTest.html
报错:faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/firstflex/messagebroker/amf''
很奇怪为什么会是去访问firstflex项目的是东西。。。。
就算我把testjavaincludeflex中services-config.xml配置文件里全改成以下方式还是不行
[code="java"]
<channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
<endpoint url="https://{server.name}:{server.port}/testjavaincludeflex/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
</properties>
</channel-definition>
<channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/testjavaincludeflex/messagebroker/amfpolling" class="flex.messaging.endpo
[/code]
现在的我的问题,有人可以帮我解决这个问题,为什么会这样。或是讲解一下怎么一个flex集成j2ee生成的后的swf(与java有交互)文件集成到另一个j2ee项目中,谢谢