Re: Possible/feasible to hook into the wsdl2code code generation?

robertlazarski <[email protected]> Tue, 6 Feb 2024 06:57:40 -1000
Newsgroups gmane.text.xml.axis.user
Message-ID <CABpPLBU=ndTJd-37a-BVRnyCorMXxzzhJfZq7zDPHTTYaeFENw@mail.gmail.com>
--0000000000008c0cb80610b97ae9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

See AXIS2-6051 for the discussion. We cannot give accurate dates because we
are all volunteers but I can say we are all impacted by the jakarta
transition so the motivation is high.

At the moment I am on the last parts of OSGI.

Being open source, anyone is free to submit pull requests to make it go
faster.

On Tue, Feb 6, 2024 at 6:30=E2=80=AFAM Amir Razi <[email protected]>=
 wrote:

> Hi Robert,
>
> 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
> jettison, woodstox-core, and comms-fileupload. Will all there old version
> be updated to most recent versions that have addressed the security
> vulnerabilities?
>
> Thanks, Amir Razi
>
> On Tuesday, February 6, 2024 at 10:44:26 AM EST, robertlazarski <
> [email protected]> wrote:
>
>
> I finally found some time to look more at your question.
>
> Also keep in mind that Axis2 uses an older version 3.x of XMLBeans, as th=
e
> project was retired then a few years later brought back to life because
> Apache POI uses it. 5.2.0 was released recently.
>
> 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 XMLBeans
> 5.x series that feature had problems but seems to be fixed now.
>
> If you could suggest how we could improve the docs here please send a pul=
l
> request to our apache axis2 github repo.
>
> I am trying hard at the moment to wrap up the next Axis2 release soon and
> can only say right now that I can get any changes you supply via pull
> requests merged into our repo. Anything beyond that which requires help,
> please create a Jira.
>
>
>
> On Sun, Jan 28, 2024 at 6:56=E2=80=AFAM Steven De Herdt <
> [email protected]> wrote:
>
> Hi Robert
>
> Thanks for your answer.  It took me a while to examine my options here,
> it's a lot more complicated than the acronym "SOAP" suggests...
>
> At first I was looking through the code that does code generation.  It
> seemed rather involved to fork it and make it do exactly what I wanted.
> Then, following your hint about WSDL2Code's command line arguments, I
> discovered '-xsdconfig'.  I am already using the XMLBeans bindings, and
> it turns out there's a feature in there that's exactly what I'm looking
> for:
>
> https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionInterfacesF=
eature
> .  Nice, and I could get it to work with XMLBeans' scomp utility.  I
> managed to pass the location of the xsdconfig file through my pom.xml --
> not clearly documented, see here:
> https://marc.info/?l=3Daxis-user&m=3D120177766308116.  Apparently though,
> the code in axis2-xmlbeans to parse the xsdconfig does not support this
> Extension Interfaces Feature.  (I also noticed that changing a generated
> class name (qname element) fails with the xsdconfig through Maven, while
> the same xsdconfig through scomp works.)
>
> So back to square one I guess.  Would it be easiest to just fork a
> 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
> > ways such as Ant / Maven to tie into it...
> >
> > And the xls code for each data binding - ADB, XMLBeans, JAXB among
> > others - that does the "implements org.apache.axis2.data
> > binding.*" generation that is particular to the binding.
> >
> > Since WSDL2Code supports quite a few line arguments, that'd be the plac=
e
> > I would try to tie into the "implements" part of the interface and clas=
s
> > generation from the WSDL and XSD files.
> >
> > On Mon, Dec 18, 2023 at 6:31=E2=80=AFAM Steven De Herdt
> > <[email protected]> wrote:
> >
> >     Hello
> >
> >     The project I'm working on is a client implementing dozens of WSDL
> >     operations/SOAP call types.  The SOAP bodies involved all follow a
> >     general structure, which is described in as many dozens of XSD's,
> >     differing only in some types several levels deep into the SOAP body=
.
> >     Error representation, bundling requests etc. are all exactly the
> same.
> >
> >     When generating the service stubs, wsdl2code helpfully prepares all
> >     classes and types involved.  These of course also follow the same
> >     structure for each call type, but all those parallel classes are of
> >     unrelated types.  I understand they can't just be the same, but it
> >     would
> >     be nice for code reuse if they each implemented an interface
> describing
> >     common methods.  The names of the methods are already the same,
> return
> >     types declared in the interfaces could be these new interfaces, so =
I
> >     would just need an "implements GenericAnswerType" or some-such in t=
he
> >     generated classes.
> >
> >     Now my question: can I get something like that by plugging into Axi=
s'
> >     code generation?  Or is there perhaps another way to do code
> >     transformation or patching from Maven?  If possible, I'd like to
> avoid
> >     'tampering' manually with the generated sources.
> >
> >     Thanks for any pointers you might give me.
> >     -Steven
> >
> >     -------------------------------------------------------------------=
--
> >     To unsubscribe, e-mail: [email protected]
> >     <mailto:[email protected]>
> >     For additional commands, e-mail: [email protected]
> >     <mailto:[email protected]>
> >
>
>

--0000000000008c0cb80610b97ae9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>See AXIS2-6051 for the discussion. We cannot give acc=
urate dates because we are all volunteers but I can say we are all impacted=
 by the jakarta transition so the motivation is high. <br></div><div><br></=
div><div>At the moment I am on the last parts of OSGI.=C2=A0</div><div><br>=
</div><div>Being open source, anyone is free to submit pull requests to mak=
e it go faster. <br></div></div><br><div class=3D"gmail_quote"><div dir=3D"=
ltr" class=3D"gmail_attr">On Tue, Feb 6, 2024 at 6:30=E2=80=AFAM Amir Razi =
&lt;[email protected]&gt; wrote:<br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex"><div><div style=3D"font-family:Helvetica Neue,Helve=
tica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir=3D"ltr">Hi Robert,</div><div dir=3D"ltr"><br></div><div di=
r=3D"ltr">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 dependenci=
es like jettison, woodstox-core, and comms-fileupload. Will all there old v=
ersion be updated to most recent versions that have addressed the security =
vulnerabilities?</div><div dir=3D"ltr"><br></div><div dir=3D"ltr">Thanks, A=
mir Razi</div><div><br></div>
       =20
        </div><div id=3D"m_-4137453049478947477ydp43d4d96fyahoo_quoted_7934=
083939">
            <div style=3D"font-family:&quot;Helvetica Neue&quot;,Helvetica,=
Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
               =20
                <div>
                    On Tuesday, February 6, 2024 at 10:44:26 AM EST, robert=
lazarski &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a>&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id=3D"m_-4137453049478947477ydp43d4d96fyiv9561199=
309"><div dir=3D"ltr"><div>I finally found some time to look more at your q=
uestion. <br></div><div><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><div><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 gla=
nce, early in the XMLBeans 5.x series that feature had problems but seems t=
o be fixed now. <br></div><div><br></div><div>If you could suggest how we c=
ould improve the docs here please send a pull request to our apache axis2 g=
ithub repo. <br></div><div><br></div><div>I am trying hard at the moment to=
 wrap up the next Axis2 release soon and can only say right now that I can =
get any changes you supply via pull requests merged into our repo. Anything=
 beyond that which requires help, please create a Jira. <br></div><div><br>=
</div><div><br></div></div><br><div><div dir=3D"ltr">On Sun, Jan 28, 2024 a=
t 6:56=E2=80=AFAM Steven De Herdt &lt;<a href=3D"mailto:steven.deherdt@rita=
college.be" rel=3D"nofollow" target=3D"_blank">[email protected]=
e</a>&gt; wrote:<br></div><blockquote style=3D"margin:0px 0px 0px 0.8ex;bor=
der-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Robert<br>
<br>
Thanks for your answer.=C2=A0 It took me a while to examine my options here=
, <br>
it&#39;s a lot more complicated than the acronym &quot;SOAP&quot; suggests.=
..<br>
<br>
At first I was looking through the code that does code generation.=C2=A0 It=
 <br>
seemed rather involved to fork it and make it do exactly what I wanted. <br=
>
Then, following your hint about WSDL2Code&#39;s command line arguments, I <=
br>
discovered &#39;-xsdconfig&#39;.=C2=A0 I am already using the XMLBeans bind=
ings, and <br>
it turns out there&#39;s a feature in there that&#39;s exactly what I&#39;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>
.=C2=A0 Nice, and I could get it to work with XMLBeans&#39; scomp utility.=
=C2=A0 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&amp;m=3D120177766308116" rel=3D=
"nofollow" target=3D"_blank">https://marc.info/?l=3Daxis-user&amp;m=3D12017=
7766308116</a>.=C2=A0 Apparently though, <br>
the code in axis2-xmlbeans to parse the xsdconfig does not support this <br=
>
Extension Interfaces Feature.=C2=A0 (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.=C2=A0 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>
&gt; The two things I suggest looking into are the WSDCode java class with =
<br>
&gt; ways such as Ant / Maven to tie into it...<br>
&gt; <br>
&gt; And the xls code for each data binding - ADB, XMLBeans, JAXB among <br=
>
&gt; others - that does the &quot;implements org.apache.axis2.data<br>
&gt; binding.*&quot; generation that is particular to the binding.<br>
&gt; <br>
&gt; Since WSDL2Code supports quite a few line arguments, that&#39;d be the=
 place <br>
&gt; I would try to tie into the &quot;implements&quot; part of the interfa=
ce and class <br>
&gt; generation from the WSDL and XSD files.<br>
&gt; <br>
&gt; On Mon, Dec 18, 2023 at 6:31=E2=80=AFAM Steven De Herdt <br>
&gt; &lt;[email protected]&gt; wrote:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0Hello<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0The project I&#39;m working on is a client implemen=
ting dozens of WSDL<br>
&gt;=C2=A0 =C2=A0 =C2=A0operations/SOAP call types.=C2=A0 The SOAP bodies i=
nvolved all follow a<br>
&gt;=C2=A0 =C2=A0 =C2=A0general structure, which is described in as many do=
zens of XSD&#39;s,<br>
&gt;=C2=A0 =C2=A0 =C2=A0differing only in some types several levels deep in=
to the SOAP body.<br>
&gt;=C2=A0 =C2=A0 =C2=A0Error representation, bundling requests etc. are al=
l exactly the same.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0When generating the service stubs, wsdl2code helpfu=
lly prepares all<br>
&gt;=C2=A0 =C2=A0 =C2=A0classes and types involved.=C2=A0 These of course a=
lso follow the same<br>
&gt;=C2=A0 =C2=A0 =C2=A0structure for each call type, but all those paralle=
l classes are of<br>
&gt;=C2=A0 =C2=A0 =C2=A0unrelated types.=C2=A0 I understand they can&#39;t =
just be the same, but it<br>
&gt;=C2=A0 =C2=A0 =C2=A0would<br>
&gt;=C2=A0 =C2=A0 =C2=A0be nice for code reuse if they each implemented an =
interface describing<br>
&gt;=C2=A0 =C2=A0 =C2=A0common methods.=C2=A0 The names of the methods are =
already the same, return<br>
&gt;=C2=A0 =C2=A0 =C2=A0types declared in the interfaces could be these new=
 interfaces, so I<br>
&gt;=C2=A0 =C2=A0 =C2=A0would just need an &quot;implements GenericAnswerTy=
pe&quot; or some-such in the<br>
&gt;=C2=A0 =C2=A0 =C2=A0generated classes.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0Now my question: can I get something like that by p=
lugging into Axis&#39;<br>
&gt;=C2=A0 =C2=A0 =C2=A0code generation?=C2=A0 Or is there perhaps another =
way to do code<br>
&gt;=C2=A0 =C2=A0 =C2=A0transformation or patching from Maven?=C2=A0 If pos=
sible, I&#39;d like to avoid<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;tampering&#39; manually with the generated sou=
rces.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0Thanks for any pointers you might give me.<br>
&gt;=C2=A0 =C2=A0 =C2=A0-Steven<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0---------------------------------------------------=
------------------<br>
&gt;=C2=A0 =C2=A0 =C2=A0To unsubscribe, e-mail: <a href=3D"mailto:java-user=
[email protected]" rel=3D"nofollow" target=3D"_blank">java-user-=
[email protected]</a><br>
&gt;=C2=A0 =C2=A0 =C2=A0&lt;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>&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0For additional commands, e-mail: <a href=3D"mailto:=
[email protected]" rel=3D"nofollow" target=3D"_blank">java-use=
[email protected]</a><br>
&gt;=C2=A0 =C2=A0 =C2=A0&lt;mailto:<a href=3D"mailto:[email protected]=
ache.org" rel=3D"nofollow" target=3D"_blank">[email protected]=
</a>&gt;<br>
&gt; <br>
</blockquote></div>
</div></div>
            </div>
        </div></div></blockquote></div>

--0000000000008c0cb80610b97ae9--