Re: Possible/feasible to hook into the wsdl2code code generation?
robertlazarski <[email protected]> Tue, 19 Dec 2023 10:35:25 -1000
| Newsgroups | gmane.text.xml.axis.user |
|---|---|
| Message-ID | <CABpPLBUrYiWEGXjoe0O1Vzyd=tZV5XkwSP6knZhXNqXHZ3dqzQ@mail.gmail.com> |
--0000000000001a94e7060ce2cf3c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 place I would try to tie into the "implements" part of the interface and class 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 the > generated classes. > > Now my question: can I get something like that by plugging into Axis' > 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] > For additional commands, e-mail: [email protected] > > --0000000000001a94e7060ce2cf3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>The two things I suggest looking into are the WSDCode= java class with ways such as Ant / Maven to tie into it...</div><div><br><= /div><div>And the xls code for each data binding - ADB, XMLBeans, JAXB amon= g others - that does the "<span style=3D"font-family:monospace"><span = style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255)">implements org= .apache.axis2.data</span></span></div><div><span style=3D"font-family:monos= pace"></span></div><div><span style=3D"font-family:monospace">binding.*</sp= an>" generation that is particular to the binding.=C2=A0</div><div><br= ></div><div>Since WSDL2Code supports quite a few line arguments, that'd= be the place I would try to tie into the "implements" part of th= e interface and class generation from the WSDL and XSD files. <br> </div></= div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On= Mon, Dec 18, 2023 at 6:31=E2=80=AFAM Steven De Herdt <steven.deherdt@ri= tacollege.be.invalid> wrote:<br></div><blockquote class=3D"gmail_quote" = style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa= dding-left:1ex">Hello<br> <br> The project I'm working on is a client implementing dozens of WSDL <br> operations/SOAP call types.=C2=A0 The SOAP bodies involved all follow a <br= > general structure, which is described in as many dozens of XSD's, <br> differing only in some types several levels deep into the SOAP body. <br> Error representation, bundling requests etc. are all exactly the same.<br> <br> When generating the service stubs, wsdl2code helpfully prepares all <br> classes and types involved.=C2=A0 These of course also follow the same <br> structure for each call type, but all those parallel classes are of <br> unrelated types.=C2=A0 I understand they can't just be the same, but it= would <br> be nice for code reuse if they each implemented an interface describing <br= > common methods.=C2=A0 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" or some-such in= the <br> generated classes.<br> <br> Now my question: can I get something like that by plugging into Axis' <= br> code generation?=C2=A0 Or is there perhaps another way to do code <br> transformation or patching from Maven?=C2=A0 If possible, I'd like to a= void <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:[email protected]= .org" target=3D"_blank">[email protected]</a><br> For additional commands, e-mail: <a href=3D"mailto:[email protected]= he.org" target=3D"_blank">[email protected]</a><br> <br> </blockquote></div> --0000000000001a94e7060ce2cf3c--