[ 
https://issues.apache.org/jira/browse/TUSCANY-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524151
 ] 

Simon Nash commented on TUSCANY-1562:
-------------------------------------

This problem occurs when specifying an exception on the service interface with 
a full Java exception class name of the form java.lang.* or javax.*.

The axis2 java2wsdl generator (used for both static and dynamic generation of 
wsdl) has special code for these two package prefixes that does not work 
correctly.  It maps all classes in these packages to xs:anyType instead of a 
complex type.  The code that generates wsdl:message and wsdl:part elements is 
only called for complex types, so the wsdl:portType contains a wsdl:fault 
element that refers to a non-existent wsdl:message.

AXIS-2672 seems to be the same problem, though the description is sketchy.  
This is marked as targeted for the 1.4 release.

I don't know how a Tucsany user can work around this.  If the WSDL is generated 
statically, it could be fixed up by hand.  If it is generated dynamically, I 
don't see any solution.

> 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, 
> localhost.2007-08-24.log
>
>
> 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]

Reply via email to