You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Qureshi, Affan" <AQ...@epsilon.com> on 2008/04/14 18:49:38 UTC
[Axis2] WSDL2Java generate code for only one method in the service
Hi All,
I have a WSDL file with around 15 different methods but I want to use only one of those in my application. I tried the WSDL2Java tool which worked great except that the generated code is thousands of lines. Is there a way I can limit the tool to generate only a subset or do I just have to open the generated file and delete the unwanted code? It is fairly easy to do that but it is just not automate-able.
Thanks a lot.
Affan
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Where did you configure the loading files in an aar file for the axis2
service? There is no web.xml file, do we?
-Henry
robert lazarski wrote:
> I've never used ibatis, but presumably you'd load its config files via
> the classpath like you do with hibernate. Hint: load the resources in
> an exploded AAR as its easier. There's some tips on loading hibernate
> files in the spring tutorial and a good place to start would be trying
> the same thing with ibatis.
>
> HTH,
> Robert
>
> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>
>> Are there anyones who are using axis2 with spring and ibatis to access a
>> database? Could some one show me how to do this in the service (not client)
>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>
>> -Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Thank you Mr. Bull. Could you send me your sql-map-config.xml? My
sql-map-config.xml is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="misc.xml"/>
</sqlMapConfig>
And I got the errors:
[java] [ERROR] The ChkUniqnameService.aar service, which is not
valid, caus
ed Error creating bean with name 'sqlMapClient' defined in class path
resource [
applicationContext.xml]: Invocation of init method failed; nested
exception is j
ava.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.Nodelet
Exception: Error parsing XML. Cause: java.lang.RuntimeException: Error
parsing
XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not
find resour
ce misc.xml
-Henry
Anthony Bull wrote:
> I'm doing iBatis, Spring in an AAR in production released Axis 2 web
> services. In our case it is even harder than the equivalent hibernate
> setup, especially if you have multiple web services doing it and don't
> want them treading on each other's SQL maps.
>
> If the Spring with Hibernate tutorial doesn't work in your case, I've
> done a tutorial on how I got my iBatis/Spring/Axis2 setup working that
> you can try out:
>
> http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html
>
> cheers,
> Ants.
>
> robert lazarski wrote:
>> I've never used ibatis, but presumably you'd load its config files via
>> the classpath like you do with hibernate. Hint: load the resources in
>> an exploded AAR as its easier. There's some tips on loading hibernate
>> files in the spring tutorial and a good place to start would be trying
>> the same thing with ibatis.
>>
>> HTH,
>> Robert
>>
>> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>>
>>> Are there anyones who are using axis2 with spring and ibatis to access a
>>> database? Could some one show me how to do this in the service (not client)
>>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>>
>>> -Henry
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>>
>
>
> --
>
> Anthony
> -------------------------------------
> Anthony Bull
> Senior Developer
> Black Coffee Software Ltd
> PO Box 10-192 The Terrace
> Wellington, New Zealand
>
> anthony.bull@bcsoft.co.nz
> Ph +64 4 472 8818
> Fax +64 4 472 8811
> -------------------------------------
> www.bcsoft.co.nz
> ---------------------------------------------------------------
> This email may contain confidential or privileged information,
> and is intended for use only by the addressee, or addressees.
> If you are not the intended recipient please advise the sender
> immediately and do not copy, use or disclose the contents to
> any other person or organisation.
> Black Coffee Software Ltd accepts no responsibility for viruses
> received with this email, or to any changes made to the original
> content. Any views or opinions expressed in this email may be
> personal to the sender and are not necessarily those of Black
> Coffee Software Ltd.
> ---------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: axis2 with spring, ibatis
Posted by Anthony Bull <an...@bcsoft.co.nz>.
I'm doing iBatis, Spring in an AAR in production released Axis 2 web
services. In our case it is even harder than the equivalent hibernate
setup, especially if you have multiple web services doing it and don't
want them treading on each other's SQL maps.
If the Spring with Hibernate tutorial doesn't work in your case, I've
done a tutorial on how I got my iBatis/Spring/Axis2 setup working that
you can try out:
http://thejavamonkey.blogspot.com/2008/04/axis-2-web-services-with-spring-and.html
cheers,
Ants.
robert lazarski wrote:
> I've never used ibatis, but presumably you'd load its config files via
> the classpath like you do with hibernate. Hint: load the resources in
> an exploded AAR as its easier. There's some tips on loading hibernate
> files in the spring tutorial and a good place to start would be trying
> the same thing with ibatis.
>
> HTH,
> Robert
>
> On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
>
>> Are there anyones who are using axis2 with spring and ibatis to access a
>> database? Could some one show me how to do this in the service (not client)
>> with an aar file? I don't know how to initialize/load the ibatis map file.
>>
>> -Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
--
Anthony
-------------------------------------
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand
anthony.bull@bcsoft.co.nz
Ph +64 4 472 8818
Fax +64 4 472 8811
-------------------------------------
www.bcsoft.co.nz
---------------------------------------------------------------
This email may contain confidential or privileged information,
and is intended for use only by the addressee, or addressees.
If you are not the intended recipient please advise the sender
immediately and do not copy, use or disclose the contents to
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses
received with this email, or to any changes made to the original
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black
Coffee Software Ltd.
---------------------------------------------------------------
Re: axis2 with spring, ibatis
Posted by robert lazarski <ro...@gmail.com>.
I've never used ibatis, but presumably you'd load its config files via
the classpath like you do with hibernate. Hint: load the resources in
an exploded AAR as its easier. There's some tips on loading hibernate
files in the spring tutorial and a good place to start would be trying
the same thing with ibatis.
HTH,
Robert
On Tue, Apr 15, 2008 at 2:39 PM, Henry Lu <zh...@umich.edu> wrote:
> Are there anyones who are using axis2 with spring and ibatis to access a
> database? Could some one show me how to do this in the service (not client)
> with an aar file? I don't know how to initialize/load the ibatis map file.
>
> -Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
axis2 with spring, ibatis
Posted by Henry Lu <zh...@umich.edu>.
Are there anyones who are using axis2 with spring and ibatis to access a
database? Could some one show me how to do this in the service (not
client) with an aar file? I don't know how to initialize/load the ibatis
map file.
-Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: [Axis2] WSDL2Java generate code for only one method in the service
Posted by "Karr, David" <da...@wamu.net>.
Note that you might be able to use WSDL4J to automatically construct a
WSDL with only the pieces you need. You could do this in your build
script.
> -----Original Message-----
> From: Qureshi, Affan [mailto:AQureshi@epsilon.com]
> Sent: Monday, April 14, 2008 11:57 AM
> To: 'axis-user@ws.apache.org'
> Subject: RE: [Axis2] WSDL2Java generate code for only one
> method in the service
>
> Thanks for the quick response. The problem is that I don't
> have control over the WSDL file since it belongs to a partner company.
>
> I will try to generate individual small files and delete
> unwanted ones.
>
> Thanks,
>
> Affan
>
> -----Original Message-----
> From: Jacques46 [mailto:jacques.poulin@gmail.com]
> Sent: Monday, April 14, 2008 1:32 PM
> To: axis-user@ws.apache.org
> Subject: Re: [Axis2] WSDL2Java generate code for only one
> method in the service
>
>
> This is only a guess, but I'm pretty sure that you could
> delete all the methods you don't want from the WSDL file
> itself, and then use WSDL2Java on the resulting file... Of
> course, I'm again guessing that you couldn't remove methods
> or types that are referred by other parts of the WSDL file...
>
> My understanding is that the WSDL file is simply a descriptor
> of the methods (and objects used by those methods) of an
> application. Remove method descriptors from the file, and
> WSDL2Java should generate an application without those methods.
>
> But I'm new to this whole WSDL thing, so don't take my answer
> too seriously...
>
> Oh, also note that there are 2 ways to generate the result :
> very few BIG files, of a lot of small files... I think the
> param to use is '-u' to get the smaller files...
>
>
> AQureshi wrote:
> >
> > Hi All,
> >
> > I have a WSDL file with around 15 different methods but I
> want to use
> > only one of those in my application. I tried the WSDL2Java
> tool which
> > worked great except that the generated code is thousands of
> lines. Is
> > there a way I can limit the tool to generate only a subset or do I
> > just have to open the generated file and delete the
> unwanted code? It
> > is fairly easy to do that but it is just not automate-able.
> >
> > Thanks a lot.
> >
> > Affan
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Just-a-small-client-sample-would-really-
> be-great-%21-tp16532618p16685278.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: [Axis2] WSDL2Java generate code for only one method in the
service
Posted by "Qureshi, Affan" <AQ...@epsilon.com>.
Thanks for the quick response. The problem is that I don't have control over the WSDL file since it belongs to a partner company.
I will try to generate individual small files and delete unwanted ones.
Thanks,
Affan
-----Original Message-----
From: Jacques46 [mailto:jacques.poulin@gmail.com]
Sent: Monday, April 14, 2008 1:32 PM
To: axis-user@ws.apache.org
Subject: Re: [Axis2] WSDL2Java generate code for only one method in the service
This is only a guess, but I'm pretty sure that you could delete all the
methods you don't want from the WSDL file itself, and then use WSDL2Java on
the resulting file... Of course, I'm again guessing that you couldn't
remove methods or types that are referred by other parts of the WSDL file...
My understanding is that the WSDL file is simply a descriptor of the methods
(and objects used by those methods) of an application. Remove method
descriptors from the file, and WSDL2Java should generate an application
without those methods.
But I'm new to this whole WSDL thing, so don't take my answer too
seriously...
Oh, also note that there are 2 ways to generate the result : very few BIG
files, of a lot of small files... I think the param to use is '-u' to get
the smaller files...
AQureshi wrote:
>
> Hi All,
>
> I have a WSDL file with around 15 different methods but I want to use only
> one of those in my application. I tried the WSDL2Java tool which worked
> great except that the generated code is thousands of lines. Is there a way
> I can limit the tool to generate only a subset or do I just have to open
> the generated file and delete the unwanted code? It is fairly easy to do
> that but it is just not automate-able.
>
> Thanks a lot.
>
> Affan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16685278.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] WSDL2Java generate code for only one method in the
service
Posted by Jacques46 <ja...@gmail.com>.
This is only a guess, but I'm pretty sure that you could delete all the
methods you don't want from the WSDL file itself, and then use WSDL2Java on
the resulting file... Of course, I'm again guessing that you couldn't
remove methods or types that are referred by other parts of the WSDL file...
My understanding is that the WSDL file is simply a descriptor of the methods
(and objects used by those methods) of an application. Remove method
descriptors from the file, and WSDL2Java should generate an application
without those methods.
But I'm new to this whole WSDL thing, so don't take my answer too
seriously...
Oh, also note that there are 2 ways to generate the result : very few BIG
files, of a lot of small files... I think the param to use is '-u' to get
the smaller files...
AQureshi wrote:
>
> Hi All,
>
> I have a WSDL file with around 15 different methods but I want to use only
> one of those in my application. I tried the WSDL2Java tool which worked
> great except that the generated code is thousands of lines. Is there a way
> I can limit the tool to generate only a subset or do I just have to open
> the generated file and delete the unwanted code? It is fairly easy to do
> that but it is just not automate-able.
>
> Thanks a lot.
>
> Affan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Just-a-small-client-sample-would-really-be-great-%21-tp16532618p16685278.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org