[
https://issues.apache.org/jira/browse/TUSCANY-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551497
]
Simon Nash commented on TUSCANY-1562:
-------------------------------------
I tried the same scenario that you are describing. I took the
exceptions-simple-ws itest, changed it to use dynamically generated WSDL, and
split it into a service portion and client portion. I deployed the service
portion as a webapp on Tomcat 6, and ran the client portion in J2SE using mvn
and JUnit. Everything worked fine and I did not see the error that you are
seeing.
Please take a look at the code that I used. I'd be interested to know whether
this works for you in your environment. The service portion is at
http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/nash/scenarios/webapp-service-with-exception/exceptions-simple-ws-webapp/
and the client portion is at
http://svn.apache.org/repos/asf/incubator/tuscany/sandbox/nash/scenarios/webapp-service-with-exception/exceptions-simple-ws-client/
You can build these by unzipping the files into the Tuscany source tree under
the samples directory as samples/exceptions-simple-ws-webapp and
samples/exceptions-simple-ws-client. Running mvn in the
exceptions-simple-ws-webapp directory produces a war file that can be deployed
to Tomcat. Do this first, then run mvn in the exceptions-simple-ws-client
directory. This runs a test that throws and catches a business exception. I
get the following output:.
Running com.example.ExampleTestCase
13-Dec-2007 12:00:44 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl init
INFO: Domain will be started stand-alone as domain URL is not provided
13-Dec-2007 12:00:45 org.apache.tuscany.sca.domain.impl.SCADomainImpl
registerNode
INFO: Registered node: http://EUREKA:4224 at endpoint http://EUREKA:4224
13-Dec-2007 12:00:45 org.apache.tuscany.sca.node.impl.SCADomainProxyImpl
createRuntime
INFO: Domain management configured from
file:/C:/Documents%20and%20Settings/nash/.m2/repository/org/apache/tuscany/sca/tuscany-node-impl/1.1-incubating-SNAPSHOT/tuscany-node-impl-1.1-incubating-SNAPSHOT.jar
13-Dec-2007 12:00:49 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
13-Dec-2007 12:00:49 org.apache.catalina.startup.ContextConfig defaultWebConfig
INFO: No default web.xml
13-Dec-2007 12:00:49 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
13-Dec-2007 12:00:49 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
13-Dec-2007 12:00:49 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
13-Dec-2007 12:00:49 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
13-Dec-2007 12:00:49 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/resources/j2ee_web_services_1_1.xsd
13-Dec-2007 12:00:50 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-4224
13-Dec-2007 12:00:50 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-4224
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping:
http://EUREKA:4224/SCADomainEventServiceProxyComponent
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping:
http://EUREKA:4224/SCANodeManagerComponent/SCANodeManagerService
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping:
http://EUREKA:4224/SCANodeManagerComponent/ComponentManagerService/*
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping:
http://EUREKA:4224/SCANodeManagerComponent/ComponentManagerService
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://EUREKA:4224/SCADomain/scaDomain.js
13-Dec-2007 12:00:50 org.apache.tuscany.sca.http.tomcat.TomcatServer
addServletMapping
INFO: Added Servlet mapping: http://EUREKA:4224/node/*
13-Dec-2007 12:00:50 org.apache.tuscany.sca.node.impl.SCANodeImpl startComposite
INFO: Starting composite: {http://www.example.com}exclient
caught exception from hello(): bad news
13-Dec-2007 12:00:51 org.apache.tuscany.sca.node.impl.SCANodeImpl stopComposite
INFO: Stopping composite: {http://www.example.com}exclient
13-Dec-2007 12:00:51 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-4224
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.391 sec
> Service method's "throws Exception" clause create problem at time of on fly
> generation of wsdl
> ----------------------------------------------------------------------------------------------
>
> Key: TUSCANY-1562
> URL: https://issues.apache.org/jira/browse/TUSCANY-1562
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core Runtime
> Affects Versions: Java-SCA-0.99, Java-SCA-Next
> Environment: Windows XP, tuscany-sca-1.0-incubating-SNAPSHOT,
> Eclipse, Tomcat 6, maven
> Reporter: Nishant Joshi
> Fix For: Java-SCA-1.0
>
> Attachments: Example(Using axis2_1.3-RC2).wsdl, Example.zip,
> Exception_Sample.zip, jira1562.zip, localhost.2007-08-24.log,
> SOAP_Response_CustomException_extends_Exception.txt,
> SOAP_Response_CustomException_extends_Exception_2.txt
>
>
> Hi, I am creating a simple programme in which when i declared throws clause
> in my method, following error is occured, when i try to deploy my war file in
> to Tomcat. WAR is generated using maven.
> I have also tried using custom Exception but result is same.
> Now when i have catch the exception in service method then
> problem is solved and wsdl is generated.(so now there is no throws clause).
> So in sort problem is defining throws clause in service method create problem.
> Note: Following error is in localhost.log file of Tomcat 6.0 at time of
> starting of Tomcat.I am using Nightly build SNAPSHOT that i have mentioned in
> environment.
> SEVERE: exception initializing SCADomain
> org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.sca.core.runtime.ActivationException:
> java.lang.RuntimeException: org.apache.axis2.AxisFault: There are no parts
> for fault message : {http://example.com}Exception
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:82)
> at
> org.apache.tuscany.sca.webapp.SCADomainHelper.initSCADomain(SCADomainHelper.java:63)
> at
> org.apache.tuscany.sca.webapp.TuscanyContextListener.contextInitialized(TuscanyContextListener.java:37)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
> at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: org.osoa.sca.ServiceRuntimeException:
> org.apache.tuscany.sca.core.runtime.ActivationException:
> java.lang.RuntimeException: org.apache.axis2.AxisFault: There are no parts
> for fault message : {http://example.com}Exception
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:169)
> at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:230)
> ... 27 more
> Caused by: org.apache.tuscany.sca.core.runtime.ActivationException:
> java.lang.RuntimeException: org.apache.axis2.AxisFault: There are no parts
> for fault message : {http://example.com}Exception
> at
> org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:747)
> at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:167)
> ... 28 more
> Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: There are
> no parts for fault message : {http://example.com}Exception
> at
> org.apache.tuscany.sca.binding.axis2.Axis2ServiceClient.createServiceClient(Axis2ServiceClient.java:89)
> at
> org.apache.tuscany.sca.binding.axis2.Axis2ServiceClient.<init>(Axis2ServiceClient.java:66)
> at
> org.apache.tuscany.sca.binding.axis2.Axis2ReferenceBindingProvider.<init>(Axis2ReferenceBindingProvider.java:73)
> at
> org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:53)
> at
> org.apache.tuscany.sca.binding.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:40)
> at
> org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:190)
> at
> org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addReferenceBindingProviders(CompositeActivatorImpl.java:253)
> at
> org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.addRuntimeProviders(CompositeActivatorImpl.java:104)
> at
> org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:744)
> ... 29 more
> Caused by: org.apache.axis2.AxisFault: There are no parts for fault message :
> {http://example.com}Exception
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:298)
> at
> org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:1523)
> at
> org.apache.tuscany.sca.binding.axis2.Axis2ServiceClient.createServiceClient(Axis2ServiceClient.java:84)
> ... 37 more
> Caused by:
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException:
> There are no parts for fault message : {http://example.com}Exception
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WSDL11ToAxisServiceBuilder.java:920)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL11ToAxisServiceBuilder.java:533)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSDL11ToAxisServiceBuilder.java:374)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:334)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:288)
> ... 39 more
> Aug 21, 2007 11:47:36 AM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Aug 21, 2007 11:47:36 AM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Thanks in advance
> Nishant Joshi
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]