2013-11-15 150 views
0

我试图让花岗岩数据服务和REST服务的单一Web服务器内部工作GraniteDS的+ REST(新泽西州)。目标是拥有支持GraniteDS类映射和Rest请求的服务器应用程序。故障在Web服务器

这些项目separetedly工作,但是当我合并的web.xml文件一起,通过复制和粘贴类和CONFIGS一切包装成一个项目在相同的路径我得到一个Flex的要求了以下问题:

[RPC Fault faultString="[MessagingError message='Destination 'userService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']" faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to 'userService'"] 
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:333] 
    at mx.rpc.remoting::Operation/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\remoting\Operation.as:247] 
    at mx.rpc.remoting::Operation/send()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\remoting\Operation.as:219] 
    at Function/http://adobe.com/AS3/2006/builtin::apply() 
    at mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()[C:\autobuild\3.x\frameworks\projects\rpc\src\mx\rpc\AbstractService.as:353] 
    at test/___test_Button1_click()[/Users/mkahler/Documents/Adobe Flash Builder 4.6/Comp3.6/src/test.mxml:11] 

我的web.xml看起来像:

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> 
    <display-name>NeoHermes</display-name> 

    <context-param> 
    <param-name>contextConfigLocation</param-name> 
    <param-value>/WEB-INF/spring/app-config.xml</param-value> 
    </context-param> 

    <listener> 
    <listener-class>de.neo7even.neohermes.utils.AppServletContextListener</listener-class> 
    </listener> 

    <listener> 
    <listener-class>org.granite.config.GraniteConfigListener</listener-class> 
    </listener> 

    <filter> 
    <filter-name>AMFMessageFilter</filter-name> 
    <filter-class>org.granite.messaging.webapp.AMFMessageFilter</filter-class> 
    </filter> 

    <filter-mapping> 
    <filter-name>AMFMessageFilter</filter-name> 
    <url-pattern>/graniteamf/*</url-pattern> 
    </filter-mapping> 

    <servlet> 
    <servlet-name>AMFMessageServlet</servlet-name> 
    <servlet-class>org.granite.messaging.webapp.AMFMessageServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
    </servlet> 

    <servlet-mapping> 
    <servlet-name>AMFMessageServlet</servlet-name> 
    <url-pattern>/graniteamf/*</url-pattern> 
    </servlet-mapping> 

    <servlet> 
    <servlet-name>jersey-serlvet</servlet-name> 
    <servlet-class> 
      com.sun.jersey.spi.container.servlet.ServletContainer 
     </servlet-class> 
    <init-param> 
     <param-name>com.sun.jersey.config.property.packages</param-name> 
     <param-value>de.neo7even.neohermes.endpoint.rest.services</param-value> 
    </init-param> 
    <load-on-startup>1</load-on-startup> 
    </servlet> 

    <servlet-mapping> 
    <servlet-name>jersey-serlvet</servlet-name> 
    <url-pattern>/rest/*</url-pattern> 
    </servlet-mapping> 

</web-app> 
+0

我与Eclipse和独立工作Flash Builder和即将推出的Web开发软件,所以请小心。 –

回答

0

尝试时加载的启动时AMFMessageServlet的值设置为2

+0

你说的很对,非常感谢 –