You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Srinath Perera <he...@gmail.com> on 2006/08/08 01:41:26 UTC

[Axis2]Fwd: Question regarding wsdl level imports in Axis 2 ...

---------- Forwarded message ----------
From: Vishal Deshpande <vi...@gmail.com>
Date: Aug 7, 2006 3:27 PM
Subject: Question regarding wsdl level imports in Axis 2 ...
To: hemapani@apache.org



Hello Axis team,

I am a new user of Axis 2 and would like to ask you a few questions
about it as you seem to have great understanding on the subject.

We have a scenario where we have multiple services that are to be
exposed as web-services over Tomcat server. We are trying to use Axis
for our wsdl grunt-work, but would like to have a modular wsdl design
structure.

Ideally, I would like to have the schema elements separated into a say
ServiceType.wsdl and import these in the individual service wsdls like
ServiceA.wsdl, ServiceB.wsdl and so on where I have the service
bindings defined.

So far so good. I have the wsdls coded that way and I have Axis 2
generating the correct code. However, w.r.t creating jars, I was
trying to implement a similar logic, i.e have the schema elements and
its corresponding xsb bindings in a ServiceTypes.jar and have the
services in their own respective jars. This would have reduced the
need for having the schema elements in every single service jar, as I
could have the schema element jar in a shared location. That, for some
reason, when deployed, makes tomcat to go in an infinite loop on
import.

Now we do have the services deployed on the Tomcat as application
archive, instead of exploded jars. Can we use exploded jars with Axis2
as I feel that Tomcat would be better off importing things from a
flat-file architecture rather than through a jar. However, I may be
wrong. It may just be my wsdls are incorrectly formed. ANy help in
this matter is highly appreciated.

To summarise, I guess my questions are
   1. Are the attached wsdls incorrectly formed? Syntax error or design error?
   2. Can we split wsdls in a hierarchical fashion when using Axis 2
as in the attachments?
   3. Can we have a clean separation between reusable schema elements
and service bindings in seaprate jars or do we have to package things
together in a single jar?
   4. Does Axis 2 support having more than one wsdl in a single jar?

I have attached the shcema wsdl and service wsdl for you. I would be
glad if I can get some guidance on this matter.

Thanking you for your help,
-- Vishal Deshpande

This is what the tomcat shows in its log when trying to view the service.

org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java
:895) at org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java:895)
at org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java:895)
at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:217)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:192)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:261)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:604)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:207)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:91)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:142)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:42)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4197)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)



-- 
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Fwd: Question regarding wsdl level imports in Axis 2 ...

Posted by Anne Thomas Manes <at...@gmail.com>.
I believe your problem is caused by the <types> section and the
<s:import> in the service WSDL. A WSDL can have only one <types>
section.

Anne

On 8/7/06, Srinath Perera <he...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Vishal Deshpande <vi...@gmail.com>
> Date: Aug 7, 2006 3:27 PM
> Subject: Question regarding wsdl level imports in Axis 2 ...
> To: hemapani@apache.org
>
>
>
> Hello Axis team,
>
> I am a new user of Axis 2 and would like to ask you a few questions
> about it as you seem to have great understanding on the subject.
>
> We have a scenario where we have multiple services that are to be
> exposed as web-services over Tomcat server. We are trying to use Axis
> for our wsdl grunt-work, but would like to have a modular wsdl design
> structure.
>
> Ideally, I would like to have the schema elements separated into a say
> ServiceType.wsdl and import these in the individual service wsdls like
> ServiceA.wsdl, ServiceB.wsdl and so on where I have the service
> bindings defined.
>
> So far so good. I have the wsdls coded that way and I have Axis 2
> generating the correct code. However, w.r.t creating jars, I was
> trying to implement a similar logic, i.e have the schema elements and
> its corresponding xsb bindings in a ServiceTypes.jar and have the
> services in their own respective jars. This would have reduced the
> need for having the schema elements in every single service jar, as I
> could have the schema element jar in a shared location. That, for some
> reason, when deployed, makes tomcat to go in an infinite loop on
> import.
>
> Now we do have the services deployed on the Tomcat as application
> archive, instead of exploded jars. Can we use exploded jars with Axis2
> as I feel that Tomcat would be better off importing things from a
> flat-file architecture rather than through a jar. However, I may be
> wrong. It may just be my wsdls are incorrectly formed. ANy help in
> this matter is highly appreciated.
>
> To summarise, I guess my questions are
>    1. Are the attached wsdls incorrectly formed? Syntax error or design error?
>    2. Can we split wsdls in a hierarchical fashion when using Axis 2
> as in the attachments?
>    3. Can we have a clean separation between reusable schema elements
> and service bindings in seaprate jars or do we have to package things
> together in a single jar?
>    4. Does Axis 2 support having more than one wsdl in a single jar?
>
> I have attached the shcema wsdl and service wsdl for you. I would be
> glad if I can get some guidance on this matter.
>
> Thanking you for your help,
> -- Vishal Deshpande
>
> This is what the tomcat shows in its log when trying to view the service.
>
> org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java
> :895) at org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java:895)
> at org.apache.axis2.description.WSDL2AxisServiceBuilder.processImports(WSDL2AxisServiceBuilder.java:895)
> at org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:217)
> at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:192)
> at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:261)
> at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:604)
> at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195)
> at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:207)
> at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155)
> at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:91)
> at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:142)
> at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:42)
> at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
> at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:4197)
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
> at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
> at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at org.apache.catalina.core.StandardService.start(StandardService.java:450)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615) at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
>
>
> --
> ============================
> Srinath Perera:
>    http://www.cs.indiana.edu/~hperera/
>    http://www.bloglines.com/blog/hemapani
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org