WSO2 WS-发现集成
我们正在尝试将 WS-Discovery 与 Carbon 产品 WSO2 Governance Registry 和 WSO2 ESB 集成,通过 Spring 在 Tomcat 上运行配置 Apache CXF Web 服务堆栈,向 WSO2 上的 Discovery Proxy (localhost:9443/services/DiscoveryProxy) 发送问候消息格雷格。
因此,我们将 cxf-services-ws-discovery-service.jar 和 cxf-services-ws-discovery-api.jar 添加到 Tomcat 的类路径中。此外,我们将 spring bus 属性 org.apache.cxf.service.ws-discovery.address 设置为 WSO2 Greg 上的 WS-Discovery 代理的 URL 地址,以在托管模式下运行 WS-Discovery。通过运行 Tomcat 和 WSO2 Greg,wso2Carbon.log (WSO2 Greg) 中记录了以下错误消息...
TID: [0] [Greg] [2013-07-15 11:45:03,411] INFO {org.wso2.carbon.discovery.proxy.DiscoveryProxy} - Service Discovery Failed. Retrying after 10s. {org.wso2.carbon.discovery.proxy.DiscoveryProxy}
TID: [0] [Greg] [2013-07-15 11:45:03,458] ERROR {org.wso2.carbon.governance.api.common.GovernanceArtifactManager} - Failed to add artifact: artifact id: urn:uuid:003aa9d9-2c9f-4e0b-8415-c99632226ee3, path: /trunk/services/org/oasis_open/docs/ws_dd/ns/discovery/_2009/_01/DiscoveredService_1373881503442. An exception occurred while executing handler chain. String index out of range: -1 {org.wso2.carbon.governance.api.common.GovernanceArtifactManager}
org.wso2.carbon.registry.core.exceptions.RegistryException: An exception occurred while executing handler chain. String index out of range: -1
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put(HandlerManager.java:2525)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.put(HandlerLifecycleManager.java:1005)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:697)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:465)
at org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:658)
at org.wso2.carbon.governance.api.common.GovernanceArtifactManager.addGovernanceArtifact(GovernanceArtifactManager.java:155)
at org.wso2.carbon.governance.api.services.ServiceManager.addService(ServiceManager.java:116)
at org.wso2.carbon.discovery.util.DiscoveryServiceUtils.addService(DiscoveryServiceUtils.java:152)
at org.wso2.carbon.discovery.proxy.DiscoveryProxy$1.run(DiscoveryProxy.java:89)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.deriveEndpointFromUrl(EndpointUtils.java:674)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.saveEndpoint(EndpointUtils.java:483)
at org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils.saveEndpointsFromServices(EndpointUtils.java:280)
at org.wso2.carbon.registry.extensions.handlers.ServiceMediaTypeHandler.put(ServiceMediaTypeHandler.java:353)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put(HandlerManager.java:2503)
... 14 more
我们通过阅读 WSO2 产品文档和搜索多个论坛、博客等尝试了几个小时来解决这个问题。不幸的是,我们找不到解决方案。
备注:WS-Discovery 与 WSO2 应用程序服务器而不是 Tomcat 的集成工作得很好。但是,当使用 WSO2 ESB 作为发现客户端从 WSO2 Greg 发现服务时,从 WSO2 ESB 上发现的服务创建代理服务的向导在创建代理后缺少 publishWSDL xml 标记。此标签必须手动添加。有没有办法在不另外编辑的情况下完成这项工作?
我们将不胜感激。
提前致谢