WSO2 ESB代理服务示例不起作用

时间:2012-08-19 14:14:22

标签: wso2 wso2esb

我正在尝试运行WSO2网站上的'ESB代理服务示例': http://wso2.org/project/carbon-studio/1.0.11/docs/esb_proxy_service_sample.html#CreatingaProxyServiceUsingCarbonStudioIDE 我在Eclipse中使用WSO2 Developer Studio 2.0.1和ESB 4.0.3。我按照所有步骤进行了操作:

1 - 创建了Carbon Application Project,然后使用WSO2 Developer Studio IDE创建了代理服务。

2 - 将基于WSO2 ESB Carbon 3.2的服务器(使用jdk1.6.0_31作为JRE)添加到Developer Studio IDE并启动服务器

3 - 尝试在Eclipse的服务器实例中部署创建的代理服务

示例指示指向文件系统中的文件 - file:repository / samples / resources / proxy / sample_proxy_1.wsdl - 作为WSDL URL。 问题出现在上面的第3步 - 从Eclipse部署carbon应用程序时,Carbon应用程序已成功部署:

[2012-08-19 10:01:02,391]  INFO - ApplicationManager Successfully Deployed Carbon Application : StockQuoteCapp {super-tenant}
but then I can see the following error in Eclipse's console and the Proxy Service is not created:
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 15: file:repository\samples\resources\proxy\sample_proxy_1.wsdl

请告诉我如何解决这个问题以及为什么样本在我的情况下不能“开箱即用”。

以下是Eclipse控制台的整个消息堆栈:

[2012-08-19 09:58:39,381]  INFO - Main Initializing system...
[2012-08-19 09:58:39,506]  INFO - HttpTransport Created Connector [HTTP_11_NIO://*:9763]
[2012-08-19 09:58:39,506]  INFO - HttpTransport Created Connector [HTTPS_11_NIO://*:9443]
[2012-08-19 09:58:39,584]  INFO - TomcatCarbonWebappDeployer Deployed Carbon webapp: StandardEngine[Tomcat].StandardHost[defaulthost].StandardContext[/]
[2012-08-19 09:58:39,757]  INFO - TransactionFactory Starting Atomikos Transaction Manager 3.7.0
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Starting WSO2 Carbon...
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Operating System : Windows 7 6.1, x86
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Java Home        : G:\WORK\VFA\jdk1.6.0_31\jdk1.6.0_31\jre
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Java Version     : 1.6.0_31
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Java VM          : Java HotSpot(TM) Client VM 20.6-b01,Sun Microsystems Inc.
[2012-08-19 09:58:48,087]  INFO - CarbonCoreActivator Carbon Home      : G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3
[2012-08-19 09:58:48,103]  INFO - CarbonCoreActivator Java Temp Dir    : G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/tmp
[2012-08-19 09:58:48,103]  INFO - CarbonCoreActivator User             : Dan, en-US, America/New_York
[2012-08-19 09:58:49,102]  INFO - LDAPConfigurationBuilder KDC server is disabled.
[2012-08-19 09:58:49,102]  INFO - DirectoryActivator Initializing Directory Server with working directory G:\WORK\VFA\wso2esb-4.0.3\wso2esb-4.0.3\repository\data\org.wso2.carbon.directory and port 10389
[2012-08-19 09:58:52,114]  INFO - ApacheLDAPServer LDAP server started.
[2012-08-19 09:58:52,676]  INFO - InputOutputAdaptersComponent There is no adapters-component.conf.. Using the default configuration
[2012-08-19 09:58:58,499]  INFO - RegistryCoreServiceComponent Registry Mode    : READ-WRITE
[2012-08-19 09:59:01,137]  INFO - CarbonServerManager Starting Carbon initialization...
[2012-08-19 09:59:01,184]  INFO - CarbonServerManager Creating super-tenant Axis2 ConfigurationContext
[2012-08-19 09:59:01,278]  INFO - ClusterBuilder Clustering has been disabled
[2012-08-19 09:59:01,387]  INFO - DeploymentInterceptor Deploying Axis2 module: wso2xfer-3.20 {super-tenant}
[2012-08-19 09:59:01,418]  INFO - DeploymentInterceptor Deploying Axis2 module: rampart-1.61-wso2v3 {super-tenant}
[2012-08-19 09:59:01,465]  INFO - DeploymentInterceptor Deploying Axis2 module: sandesha2-3.20 {super-tenant}
[2012-08-19 09:59:01,481]  INFO - DeploymentInterceptor Deploying Axis2 module: rahas-1.61-wso2v3 {super-tenant}
[2012-08-19 09:59:01,512]  INFO - DeploymentInterceptor Deploying Axis2 module: wso2caching-3.20 {super-tenant}
[2012-08-19 09:59:01,528]  INFO - DeploymentInterceptor Deploying Axis2 module: wso2mex-3.20 {super-tenant}
[2012-08-19 09:59:01,543]  INFO - DeploymentInterceptor Deploying Axis2 module: wso2throttle-3.21 {super-tenant}
[2012-08-19 09:59:01,559]  INFO - DeploymentInterceptor Deploying Axis2 module: relay-3.20 {super-tenant}
[2012-08-19 09:59:01,590]  INFO - DeploymentInterceptor Deploying Axis2 module: addressing-3.21 {super-tenant}
[2012-08-19 09:59:01,699]  INFO - HttpCoreNIOSSLSender Loading Identity Keystore from : repository/resources/security/wso2carbon.jks
[2012-08-19 09:59:01,715]  INFO - HttpCoreNIOSSLSender Loading Trust Keystore from : repository/resources/security/client-truststore.jks
[2012-08-19 09:59:01,746]  INFO - HttpCoreNIOSender HTTPS Sender starting
[2012-08-19 09:59:01,762]  INFO - HttpCoreNIOSender HTTP Sender starting
[2012-08-19 09:59:01,855]  INFO - DeploymentInterceptor Deploying Axis2 service: echo {super-tenant}
[2012-08-19 09:59:01,918]  INFO - DeploymentEngine Deploying Web service: Echo.aar - file:/G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/repository/deployment/server/axis2services/Echo.aar
[2012-08-19 09:59:02,042]  INFO - DeploymentInterceptor Deploying Axis2 service: Version {super-tenant}
[2012-08-19 09:59:02,074]  INFO - DeploymentEngine Deploying Web service: Version.aar - file:/G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/repository/deployment/server/axis2services/Version.aar
[2012-08-19 09:59:02,074]  INFO - ApplicationManager Deploying Carbon Application : ServiceChainingCapp_1.0.0.car...
[2012-08-19 09:59:02,074]  WARN - ApplicationManager No artifacts found to be deployed in this server. Ignoring Carbon Application : ServiceChainingCapp_1.0.0.car
[2012-08-19 09:59:02,370]  INFO - CarbonServerManager Completed super-tenant Axis2 ConfigurationContext creation in 1.186 sec
[2012-08-19 09:59:02,370]  INFO - HttpCoreNIOSSLListener Loading Identity Keystore from : repository/resources/security/wso2carbon.jks
[2012-08-19 09:59:02,370]  INFO - HttpCoreNIOSSLListener Loading Trust Keystore from : repository/resources/security/client-truststore.jks
[2012-08-19 09:59:02,933]  INFO - JMXServerManager JMX Service URL  : service:jmx:rmi://[myIP]:11111/jndi/rmi://[myIP]:9999/jmxrmi
[2012-08-19 09:59:02,995]  INFO - ModuleDeployer Deploying module: addressing-1.6.1-wso2v1 - file:/G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/repository/deployment/client/modules/addressing-1.6.1-wso2v1.mar
[2012-08-19 09:59:03,042]  INFO - ModuleDeployer Deploying module: rampart-1.6.1-wso2v1 - file:/G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/repository/deployment/client/modules/rampart-1.6.1-wso2v1.mar
[2012-08-19 09:59:03,042]  INFO - TCPTransportSender TCP Sender started
[2012-08-19 09:59:04,992]  WARN - DefaultSchemaGenerator We don't support method overloading. Ignoring [saveEndpointTemplate]
[2012-08-19 09:59:04,992]  WARN - DefaultSchemaGenerator We don't support method overloading. Ignoring [saveDynamicEndpointTemplate]
[2012-08-19 09:59:04,992]  WARN - DefaultSchemaGenerator We don't support method overloading. Ignoring [addDynamicEndpointTemplate]
[2012-08-19 09:59:05,040]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.message.processor - 
[2012-08-19 09:59:05,055]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.message.store - 
[2012-08-19 09:59:06,568]  INFO - DeploymentInterceptor Deploying Axis2 service: wso2carbon-sts {super-tenant}
[2012-08-19 09:59:06,867]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.sts - 
[2012-08-19 09:59:07,179]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.tryit - 
[2012-08-19 09:59:07,350]  INFO - DeploymentInterceptor Deploying Axis2 service: XKMS {super-tenant}
[2012-08-19 09:59:07,413]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.xkms - 
[2012-08-19 09:59:07,428]  INFO - DeploymentEngine Deploying Web service: org.wso2.carbon.xkms.mgt - 
[2012-08-19 09:59:07,631]  INFO - CarbonServerManager Repository       : G:/WORK/VFA/wso2esb-4.0.3/wso2esb-4.0.3/repository/deployment/server/
[2012-08-19 09:59:08,038]  INFO - PermissionUpdater Permission cache updated for tenant 0
[2012-08-19 09:59:08,038]  INFO - CarbonServerManager ConfigurationContextService registered in 407ms
[2012-08-19 09:59:10,690]  INFO - Main Qpid broker TCP port : 5672
[2012-08-19 09:59:10,690]  INFO - Main Qpid broker TLS port : 8672
[2012-08-19 09:59:10,690]  INFO - QpidServiceComponent Successfully connected to the server on port 5672
[2012-08-19 09:59:10,738]  INFO - ServiceBusInitializer Starting ESB...
[2012-08-19 09:59:12,032]  INFO - CarbonUIServiceComponent Mgt Console URL  : https://[myIP]:9443/carbon/
[2012-08-19 09:59:12,048]  INFO - ServiceBusInitializer Initializing Apache Synapse...
[2012-08-19 09:59:12,048]  INFO - SynapseControllerFactory Using Synapse home : G:\WORK\VFA\wso2esb-4.0.3\wso2esb-4.0.3\.
[2012-08-19 09:59:12,048]  INFO - SynapseControllerFactory Using synapse.xml location : G:\WORK\VFA\wso2esb-4.0.3\wso2esb-4.0.3\.\.\repository\deployment\server\synapse-configs\default
[2012-08-19 09:59:12,048]  INFO - SynapseControllerFactory Using server name : [myIP]
[2012-08-19 09:59:12,065]  INFO - SynapseControllerFactory The timeout handler will run every : 15s
[2012-08-19 09:59:12,127]  INFO - Axis2SynapseController Initializing Synapse at : Sun Aug 19 09:59:12 EDT 2012
[2012-08-19 09:59:12,127]  INFO - Axis2SynapseController Loading mediator extensions...
[2012-08-19 09:59:12,127]  INFO - CarbonSynapseController Loading the mediation configuration from the file system
[2012-08-19 09:59:12,127]  INFO - MultiXMLConfigurationBuilder Building synapse configuration from the synapse artifact repository at : .\.\repository/deployment/server/synapse-configs\default
[2012-08-19 09:59:12,143]  INFO - XMLConfigurationBuilder Generating the Synapse configuration model by parsing the XML configuration
[2012-08-19 09:59:12,423]  INFO - SynapseConfigurationBuilder Loaded Synapse configuration from the artifact repository at : .\.\repository/deployment/server/synapse-configs\default
[2012-08-19 09:59:12,423]  INFO - RegistryBasedSynapseConfigSerializer Persisting the SynapseConfiguration to the registry...
[2012-08-19 09:59:12,548]  INFO - Axis2SynapseController Deploying the Synapse service...
[2012-08-19 09:59:12,548]  INFO - Axis2SynapseController Deploying Proxy services...
[2012-08-19 09:59:12,548]  INFO - Axis2SynapseController Deploying EventSources...
[2012-08-19 09:59:12,548]  INFO - ServerManager Server ready for processing...
[2012-08-19 09:59:12,642]  INFO - HttpCoreNIOListener HTTPS Listener started on port : 8243
[2012-08-19 09:59:12,657]  INFO - HttpCoreNIOListener HTTP Listener started on port : 8280
[2012-08-19 09:59:13,094]  INFO - RegistryEventingServiceComponent Successfully Initialized Eventing on Registry
[2012-08-19 09:59:13,110]  INFO - StartupFinalizerServiceComponent Started Transport Listener Manager
[2012-08-19 09:59:13,110]  INFO - StartupFinalizerServiceComponent Server           :  WSO2 ESB-4.0.3
[2012-08-19 09:59:13,110]  INFO - StartupFinalizerServiceComponent WSO2 Carbon started in 31 sec
[2012-08-19 09:59:13,579]  INFO - EventBrokerBuilderDS Successfully registered the event broker
[2012-08-19 10:00:04,901]  INFO - CarbonAuthenticationUtil 'admin' logged in at [2012-08-19 10:00:04,0901] from IP address [myIP]
[2012-08-19 10:01:02,171]  INFO - ApplicationManager Deploying Carbon Application : StockQuoteCapp_1.0.0.car...
[2012-08-19 10:01:02,391]  INFO - ApplicationManager Successfully Deployed Carbon Application : StockQuoteCapp {super-tenant}
[2012-08-19 10:01:17,460] ERROR - ProxyServiceFactory Error creating uri for proxy service wsdl
[2012-08-19 10:01:17,460] ERROR - ProxyServiceFactory Error creating uri for proxy service wsdl
java.net.URISyntaxException: Illegal character in opaque part at index 15: file:repository\samples\resources\proxy\sample_proxy_1.wsdl
    at java.net.URI$Parser.fail(URI.java:2810)
    at java.net.URI$Parser.checkChars(URI.java:2983)
    at java.net.URI$Parser.parse(URI.java:3020)
    at java.net.URI.<init>(URI.java:577)
    at org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:236)
    at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:58)
    at org.wso2.carbon.proxyadmin.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:53)
    at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:172)
    at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:810)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:371)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
    at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:365)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
    at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:66)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
[2012-08-19 10:01:17,491]  WARN - ProxyServiceDeployer Proxy service hot deployment from file: G:\WORK\VFA\wso2esb-4.0.3\wso2esb-4.0.3\repository\deployment\server\synapse-configs\default\proxy-services\StockQuoteSvc-1.0.0.xml failed - Continue in fail-safe mode
org.apache.synapse.SynapseException: Error creating uri for proxy service wsdl
    at org.apache.synapse.config.xml.ProxyServiceFactory.handleException(ProxyServiceFactory.java:374)
    at org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:240)
    at org.apache.synapse.deployers.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:58)
    at org.wso2.carbon.proxyadmin.ProxyServiceDeployer.deploySynapseArtifact(ProxyServiceDeployer.java:53)
    at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:172)
    at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:810)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:371)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
    at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:365)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
    at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:66)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 15: file:repository\samples\resources\proxy\sample_proxy_1.wsdl
    at java.net.URI$Parser.fail(URI.java:2810)
    at java.net.URI$Parser.checkChars(URI.java:2983)
    at java.net.URI$Parser.parse(URI.java:3020)
    at java.net.URI.<init>(URI.java:577)
    at org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:236)
    ... 21 more
[2012-08-19 10:01:17,804]  WARN - ProxyServiceStore Name of the configuration item is not given

1 个答案:

答案 0 :(得分:0)

您收到此错误是因为您已经提到了具有Windows文件分隔符格式的wsdl文件URL,例如“file:repository \ samples \ resources \ proxy \ sample_proxy_1.wsdl”。您可能已经知道“\”字符是一个转义字符。

因此,您需要将文件URL提供为“file:repository / samples / resources / proxy / sample_proxy_1.wsdl”,这是本文中指示的方式。