WSO2 WS-Discovery Integration
We're trying to integrate WS-Discovery with the Carbon products WSO2 Governance Registry and WSO2 ESB having Apache CXF Web Service stack configured via Spring running on a Tomcat sending hello messages to the Discovery Proxy (localhost:9443/services/DiscoveryProxy) on WSO2 Greg.
Therefore we added cxf-services-ws-discovery-service.jar and cxf-services-ws-discovery-api.jar to the classpath in Tomcat. Further we set the spring bus property org.apache.cxf.service.ws-discovery.address to the URL address of the WS-Discovery Proxy on WSO2 Greg to run WS-Discovery in managed mode. By running Tomcat and WSO2 Greg following error messages is logged in 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
We tried to solve this issue for several hours by reading WSO2 product documentation and searching through several forums, blogs etc. . Unfortunely we couldn't find a solution.
Remark: WS-Discovery integration with WSO2 Application Server instead of Tomcat just worked fine. But when using WSO2 ESB as an discovery client to discover services from WSO2 Greg the wizard to create proxy services out of the discoverd services on WSO2 ESB is missing the publishWSDL xml tag after creating the proxy. This tag must be added manually. Is there a way to get this done without editing this additionally??
We would be grateful for any help.
Thanks in advance