Re: Possible/feasible to hook into the wsdl2code code generation?
Amir Razi <[email protected]> Tue, 6 Feb 2024 16:29:57 +0000 (UTC)
| Newsgroups | gmane.text.xml.axis.user |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_4849434_37264401.1707236997296
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi Robert,
Thank you for the update. Any idea when the next release of Axis2 will be r=
eleased? Also, Axis 2 is using few old versions of the dependencies like je=
ttison, woodstox-core, and comms-fileupload. Will all there old version be =
updated to most recent versions that have addressed the security vulnerabil=
ities?
Thanks, Amir Razi
On Tuesday, February 6, 2024 at 10:44:26 AM EST, robertlazarski <robert=
[email protected]> wrote: =20
=20
I finally found some time to look more at your question.=20
Also keep in mind that Axis2 uses an older version 3.x of XMLBeans, as the =
project was retired then a few years later brought back to life because Apa=
che POI uses it. 5.2.0 was released recently.=20
Anyways, I am not familiar with the Extension Interfaces Feature yet I sugg=
est just adding it then to Axis2 as a new feature if you are so inclined as=
I doubt it is hard to do. At a glance, early in the XMLBeans 5.x series th=
at feature had problems but seems to be fixed now.=20
If you could suggest how we could improve the docs here please send a pull =
request to our apache axis2 github repo.=20
I am trying hard at the moment to wrap up the next Axis2 release soon and c=
an only say right now that I can get any changes you supply via pull reques=
ts merged into our repo. Anything beyond that which requires help, please c=
reate a Jira.=20
On Sun, Jan 28, 2024 at 6:56=E2=80=AFAM Steven De Herdt <steven.deherdt@rit=
acollege.be> wrote:
Hi Robert
Thanks for your answer.=C2=A0 It took me a while to examine my options here=
,=20
it's a lot more complicated than the acronym "SOAP" suggests...
At first I was looking through the code that does code generation.=C2=A0 It=
=20
seemed rather involved to fork it and make it do exactly what I wanted.=20
Then, following your hint about WSDL2Code's command line arguments, I=20
discovered '-xsdconfig'.=C2=A0 I am already using the XMLBeans bindings, an=
d=20
it turns out there's a feature in there that's exactly what I'm looking=20
for:=20
https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionInterfacesFea=
ture=20
.=C2=A0 Nice, and I could get it to work with XMLBeans' scomp utility.=C2=
=A0 I=20
managed to pass the location of the xsdconfig file through my pom.xml --=20
not clearly documented, see here:=20
https://marc.info/?l=3Daxis-user&m=3D120177766308116.=C2=A0 Apparently thou=
gh,=20
the code in axis2-xmlbeans to parse the xsdconfig does not support this=20
Extension Interfaces Feature.=C2=A0 (I also noticed that changing a generat=
ed=20
class name (qname element) fails with the xsdconfig through Maven, while=20
the same xsdconfig through scomp works.)
So back to square one I guess.=C2=A0 Would it be easiest to just fork a=20
codegen package and make a quick and dirty hack in the code or a stylesheet=
?
Greetings
-Steven
Op 19/12/2023 om 21:35 schreef robertlazarski:
> The two things I suggest looking into are the WSDCode java class with=20
> ways such as Ant / Maven to tie into it...
>=20
> And the xls code for each data binding - ADB, XMLBeans, JAXB among=20
> others - that does the "implements org.apache.axis2.data
> binding.*" generation that is particular to the binding.
>=20
> Since WSDL2Code supports quite a few line arguments, that'd be the place=
=20
> I would try to tie into the "implements" part of the interface and class=
=20
> generation from the WSDL and XSD files.
>=20
> On Mon, Dec 18, 2023 at 6:31=E2=80=AFAM Steven De Herdt=20
> <[email protected]> wrote:
>=20
>=C2=A0 =C2=A0 =C2=A0Hello
>=20
>=C2=A0 =C2=A0 =C2=A0The project I'm working on is a client implementing do=
zens of WSDL
>=C2=A0 =C2=A0 =C2=A0operations/SOAP call types.=C2=A0 The SOAP bodies invo=
lved all follow a
>=C2=A0 =C2=A0 =C2=A0general structure, which is described in as many dozen=
s of XSD's,
>=C2=A0 =C2=A0 =C2=A0differing only in some types several levels deep into =
the SOAP body.
>=C2=A0 =C2=A0 =C2=A0Error representation, bundling requests etc. are all e=
xactly the same.
>=20
>=C2=A0 =C2=A0 =C2=A0When generating the service stubs, wsdl2code helpfully=
prepares all
>=C2=A0 =C2=A0 =C2=A0classes and types involved.=C2=A0 These of course also=
follow the same
>=C2=A0 =C2=A0 =C2=A0structure for each call type, but all those parallel c=
lasses are of
>=C2=A0 =C2=A0 =C2=A0unrelated types.=C2=A0 I understand they can't just be=
the same, but it
>=C2=A0 =C2=A0 =C2=A0would
>=C2=A0 =C2=A0 =C2=A0be nice for code reuse if they each implemented an int=
erface describing
>=C2=A0 =C2=A0 =C2=A0common methods.=C2=A0 The names of the methods are alr=
eady the same, return
>=C2=A0 =C2=A0 =C2=A0types declared in the interfaces could be these new in=
terfaces, so I
>=C2=A0 =C2=A0 =C2=A0would just need an "implements GenericAnswerType" or s=
ome-such in the
>=C2=A0 =C2=A0 =C2=A0generated classes.
>=20
>=C2=A0 =C2=A0 =C2=A0Now my question: can I get something like that by plug=
ging into Axis'
>=C2=A0 =C2=A0 =C2=A0code generation?=C2=A0 Or is there perhaps another way=
to do code
>=C2=A0 =C2=A0 =C2=A0transformation or patching from Maven?=C2=A0 If possib=
le, I'd like to avoid
>=C2=A0 =C2=A0 =C2=A0'tampering' manually with the generated sources.
>=20
>=C2=A0 =C2=A0 =C2=A0Thanks for any pointers you might give me.
>=C2=A0 =C2=A0 =C2=A0-Steven
>=20
>=C2=A0 =C2=A0 =C2=A0------------------------------------------------------=
---------------
>=C2=A0 =C2=A0 =C2=A0To unsubscribe, e-mail: [email protected]=
che.org
>=C2=A0 =C2=A0 =C2=A0<mailto:[email protected]>
>=C2=A0 =C2=A0 =C2=A0For additional commands, e-mail: [email protected]=
pache.org
>=C2=A0 =C2=A0 =C2=A0<mailto:[email protected]>
>=20
=20
------=_Part_4849434_37264401.1707236997296
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div class=3D"ydp77087570yahoo-style-wrap" style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px=
;"><div></div>
<div dir=3D"ltr" data-setdir=3D"false">Hi Robert,</div><div dir=3D"=
ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false"=
>Thank you for the update. Any idea when the next release of Axis2 will be =
released? Also, Axis 2 is using few old versions of the dependencies like j=
ettison, woodstox-core, and comms-fileupload. Will all there old version be=
updated to most recent versions that have addressed the security vulnerabi=
lities?</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"l=
tr" data-setdir=3D"false">Thanks, Amir Razi</div><div><br></div>
=20
</div><div id=3D"ydp43d4d96fyahoo_quoted_7934083939" class=3D"ydp43=
d4d96fyahoo_quoted">
<div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
=20
<div>
On Tuesday, February 6, 2024 at 10:44:26 AM EST, robert=
lazarski <[email protected]> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id=3D"ydp43d4d96fyiv9561199309"><div dir=3D"ltr">=
<div>I finally found some time to look more at your question. <br></div><di=
v><br></div><div>Also keep in mind that Axis2 uses an older version 3.x of =
XMLBeans, as the project was retired then a few years later brought back to=
life because Apache POI uses it. 5.2.0 was released recently. <br></div><d=
iv><br></div><div>Anyways, I am not familiar with the Extension Interfaces =
Feature yet I suggest just adding it then to Axis2 as a new feature if you =
are so inclined as I doubt it is hard to do. At a glance, early in the XMLB=
eans 5.x series that feature had problems but seems to be fixed now. <br></=
div><div><br></div><div>If you could suggest how we could improve the docs =
here please send a pull request to our apache axis2 github repo. <br></div>=
<div><br></div><div>I am trying hard at the moment to wrap up the next Axis=
2 release soon and can only say right now that I can get any changes you su=
pply via pull requests merged into our repo. Anything beyond that which req=
uires help, please create a Jira. <br></div><div><br></div><div><br></div><=
/div><br><div class=3D"ydp43d4d96fyiv9561199309gmail_quote"><div dir=3D"ltr=
" class=3D"ydp43d4d96fyiv9561199309gmail_attr">On Sun, Jan 28, 2024 at 6:56=
=E2=80=AFAM Steven De Herdt <<a href=3D"mailto:steven.deherdt@ritacolleg=
e.be" rel=3D"nofollow" target=3D"_blank">[email protected]</a>&=
gt; wrote:<br></div><blockquote style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex;" class=3D"ydp43d4d96fyiv956=
1199309gmail_quote">Hi Robert<br>
<br>
Thanks for your answer. It took me a while to examine my options here=
, <br>
it's a lot more complicated than the acronym "SOAP" suggests...<br>
<br>
At first I was looking through the code that does code generation. It=
<br>
seemed rather involved to fork it and make it do exactly what I wanted. <br=
>
Then, following your hint about WSDL2Code's command line arguments, I <br>
discovered '-xsdconfig'. I am already using the XMLBeans bindings, an=
d <br>
it turns out there's a feature in there that's exactly what I'm looking <br=
>
for: <br>
<a href=3D"https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionIn=
terfacesFeature" rel=3D"nofollow" target=3D"_blank">https://cwiki.apache.or=
g/confluence/display/XMLBEANS/ExtensionInterfacesFeature</a> <br>
. Nice, and I could get it to work with XMLBeans' scomp utility. =
; I <br>
managed to pass the location of the xsdconfig file through my pom.xml -- <b=
r>
not clearly documented, see here: <br>
<a href=3D"https://marc.info/?l=3Daxis-user&m=3D120177766308116" rel=3D=
"nofollow" target=3D"_blank">https://marc.info/?l=3Daxis-user&m=3D12017=
7766308116</a>. Apparently though, <br>
the code in axis2-xmlbeans to parse the xsdconfig does not support this <br=
>
Extension Interfaces Feature. (I also noticed that changing a generat=
ed <br>
class name (qname element) fails with the xsdconfig through Maven, while <b=
r>
the same xsdconfig through scomp works.)<br>
<br>
So back to square one I guess. Would it be easiest to just fork a <br=
>
codegen package and make a quick and dirty hack in the code or a stylesheet=
?<br>
<br>
Greetings<br>
-Steven<br>
<br>
<br>
Op 19/12/2023 om 21:35 schreef robertlazarski:<br>
> The two things I suggest looking into are the WSDCode java class with =
<br>
> ways such as Ant / Maven to tie into it...<br>
> <br>
> And the xls code for each data binding - ADB, XMLBeans, JAXB among <br=
>
> others - that does the "implements org.apache.axis2.data<br>
> binding.*" generation that is particular to the binding.<br>
> <br>
> Since WSDL2Code supports quite a few line arguments, that'd be the pla=
ce <br>
> I would try to tie into the "implements" part of the interface and cla=
ss <br>
> generation from the WSDL and XSD files.<br>
> <br>
> On Mon, Dec 18, 2023 at 6:31=E2=80=AFAM Steven De Herdt <br>
> <[email protected]> wrote:<br>
> <br>
> Hello<br>
> <br>
> The project I'm working on is a client implementing=
dozens of WSDL<br>
> operations/SOAP call types. The SOAP bodies i=
nvolved all follow a<br>
> general structure, which is described in as many do=
zens of XSD's,<br>
> differing only in some types several levels deep in=
to the SOAP body.<br>
> Error representation, bundling requests etc. are al=
l exactly the same.<br>
> <br>
> When generating the service stubs, wsdl2code helpfu=
lly prepares all<br>
> classes and types involved. These of course a=
lso follow the same<br>
> structure for each call type, but all those paralle=
l classes are of<br>
> unrelated types. I understand they can't just=
be the same, but it<br>
> would<br>
> be nice for code reuse if they each implemented an =
interface describing<br>
> common methods. The names of the methods are =
already the same, return<br>
> types declared in the interfaces could be these new=
interfaces, so I<br>
> would just need an "implements GenericAnswerType" o=
r some-such in the<br>
> generated classes.<br>
> <br>
> Now my question: can I get something like that by p=
lugging into Axis'<br>
> code generation? Or is there perhaps another =
way to do code<br>
> transformation or patching from Maven? If pos=
sible, I'd like to avoid<br>
> 'tampering' manually with the generated sources.<br=
>
> <br>
> Thanks for any pointers you might give me.<br>
> -Steven<br>
> <br>
> ---------------------------------------------------=
------------------<br>
> To unsubscribe, e-mail: <a href=3D"mailto:java-user=
[email protected]" rel=3D"nofollow" target=3D"_blank">java-user-=
[email protected]</a><br>
> <mailto:<a href=3D"mailto:java-user-unsubscribe@=
axis.apache.org" rel=3D"nofollow" target=3D"_blank">java-user-unsubscribe@a=
xis.apache.org</a>><br>
> For additional commands, e-mail: <a href=3D"mailto:=
[email protected]" rel=3D"nofollow" target=3D"_blank">java-use=
[email protected]</a><br>
> <mailto:<a href=3D"mailto:[email protected]=
ache.org" rel=3D"nofollow" target=3D"_blank">[email protected]=
</a>><br>
> <br>
</blockquote></div>
</div></div>
</div>
</div></body></html>
------=_Part_4849434_37264401.1707236997296--