Thanks for your reply.
I'm currently doing some research and after perusing the
recommendations, I wanted to try out the abstract+concrete wsdl
approach.
Although, the advantages to following this approach is not significant,
I'd like to think that in future there will be few benefits.
I have a follow up question to this thread:
I create the wsdl, which i can validate properly. I generate the
skeleton code using wsdl2java by providing the binding file using
-Ebindingfile. I'm able to successfully deploy the service.
However, I have a problem with my client. I use ADB databinding for the
client, and when i run my client, I get the following exception:
org.apache.axis2.AxisFault: java.lang.RuntimeException: Unable to access
binding information for class com.comergent.bean.simple.UserContactBean
Make sure the binding has been compiled
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
at com.comergent.user.stub.UserServiceStub.getUser(Unknown
Source)
at
com.comergent.user.client.UserServiceAdbClient.getUser(Unknown Source)
at com.comergent.user.client.UserServiceAdbClient.main(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
What is surprising to me is that, it is trying to look for the binding
file for the Userbean. From what I understand, the binding file is
required only for JiBX databinding and that is the choice on the server
side. However, when the client uses a different databinding framework
and when there is no dependency on the UserContactBean class from the
client-side, why do i run into this problem?
Thanks in advance,
vedha
On Wed, 2007-01-17 at 11:46 +1300, Dennis Sosnoski wrote:
> Vedha Vijayan wrote:
> > I'm trying to expose an existing service as a Web service. I've got few
> > queries regarding the process involved in doing so and about custom
> > exception mapping with JiBX.
> >
> > 1. I generated the bindings (JiBX) and the schema for the classes
> > involved. The recommended procedure of creating a wsdl is to have an
> > abstract wsdl that defines the messages and then a concrete wsdl that
> > defines the bindings and the services. Is there a automated process to
> > go from the xsd and the Java class to generating the wsdl's? I had to
> > hand-code/edit the wsdl created using java2wsdl command. Is there any
> > tool that takes in the schema generated as a parameter and uses that to
> > automatically generate the wsdl? How do people go about devising means
> > to generate abstract and concrete wsdl's?
> >
> There currently is no automated process to go from the xsd and Java
> class to generating the WSDL(s), but I'm working on a tool of that type
> and will post to this list when something is available.
>
> I'm curious about your abstract+concrete WSDL process, though - who
> recommends this procedure, and what benefits do you see as a result?
> > 2. I'm trying to expose an operation that defines a custom exception.
> > The custom exception basically extends from java.lang.Exception and uses
> > exception chaining. I understand that I need to define a mapping for the
> > custom exception class. I try to create the binding and the schema using
> > the JiBX generator tools, but there is some problem or the other with
> > respect to java.lang.StackTraceElement. It does not have a no-argument
> > constructor or the schema definitions for java.lang.Throwable is not
> > properly created. This is something that people here must have
> > encountered. Can someone pin-point the right approach or if i'm going
> > wrong here. I'd like to know if people write their own
> > serializers/deserializers for mapping custom exceptions?
> >
> Exceptions are generally converted into SOAP Fault messages. I've posted
> an example of how this works when using Axis2 with JiBX data binding at
> http://www.sosnoski.com/jibx-wiki/space/axis2-jibx
>
> - Dennis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Vedha Vijayan
Senior Software Engineer
Comergent Technologies Inc.
Ph: 650 232 5833
Fax: 650 232 6010
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]