Re: Help with old service that uses soap encoding
robertlazarski <[email protected]> Tue, 6 Dec 2022 04:13:10 -1000
| Newsgroups | gmane.text.xml.axis.user |
|---|---|
| Message-ID | <CABpPLBU1-NaE36QEsn0QxjBKOhQt1ityFSL6gfpUUdag6_vPEA@mail.gmail.com> |
--00000000000005052605ef29683c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I mean to include this link, which at the end of a page there is a better xmlbeans example. https://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html On Tue, Dec 6, 2022 at 4:04 AM robertlazarski <[email protected]> wrote: > Did you ever figure this out? > > I got busy this past week, however I am interested in seeing how this > could work. > > I'd start here, by running this xmlbeans example with wsdl2java. Then > compare your wsdl with soap encoding to see what is missing. > > > https://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xm= lbeans.html > > On Wed, Nov 30, 2022 at 3:25 AM Thiago Milczarek Say=C3=A3o < > [email protected]> wrote: > >> Robert, >> >> Thanks for the reply. >> >> I will try with xmlbeans as databinding. >> >> One question: >> >> >> cur.insertElementWithText("processSyncReturn","this is array element= 2"); >> >> >> This is the example on stackoverflow. >> >> How would I insert a complex type, instead of a string? My guess it to >> serialize de XmlObject and insert as string. How would I do that? >> >> Thanks. >> >> >> Em ter., 29 de nov. de 2022 =C3=A0s 17:59, robertlazarski < >> [email protected]> escreveu: >> >>> Sorry, wrong link: >>> >>> >>> https://stackoverflow.com/questions/11561194/how-can-i-get-axis2-to-han= dle-an-array >>> >>> On Tue, Nov 29, 2022 at 10:56 AM robertlazarski < >>> [email protected]> wrote: >>> >>>> Axis2 doesn't support soapenc. >>>> >>>> Axis 1.x does, but you likely don't want to use that. >>>> >>>> Some have claimed that you can use the XMLBeans API directly, after yo= u >>>> run wsdl2code. >>>> >>>> See the bottom of this link for an example. >>>> >>>> >>>> https://stackoverflow.com/questions/74577973/how-to-use-array-soap-enc= oding-type-with-axis2-xmlbeans >>>> >>>> If you get that to work, I'd document it if you could provide a workin= g >>>> example. >>>> >>>> >>>> On Tue, Nov 29, 2022 at 8:27 AM Thiago Milczarek Say=C3=A3o < >>>> [email protected]> wrote: >>>> >>>>> Hello, >>>>> >>>>> I've posted the question here: >>>>> >>>>> https://stackoverflow.com/questions/74577973/how-to-use-array-soap-en= coding-type-with-axis2-xmlbeans >>>>> >>>>> I want to use this service: >>>>> >>>>> https://farmaciapopular-autorizador.saude.gov.br/farmaciapopular-auto= rizador/services/ServicoSolicitacaoWS?wsdl >>>>> >>>>> <complexType name=3D"ArrayOfMedicamentoDTO"> >>>>> <complexContent> >>>>> <restriction base=3D"soapenc:Array"> >>>>> <attribute ref=3D"soapenc:arrayType" >>>>> wsdl:arrayType=3D"impl:MedicamentoDTO[]"/> >>>>> </restriction> >>>>> </complexContent> >>>>> </complexType> >>>>> >>>>> It generates a class ArrayOfMedicamentoDTO that extentds Array, but >>>>> there's no way to add items to it. >>>>> >>>>> Thanks. >>>>> >>>> --00000000000005052605ef29683c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I mean to include this link, which at the end of a pa= ge there is a better xmlbeans example. <br></div><div><br></div><div><a hre= f=3D"https://axis.apache.org/axis2/java/core/tools/CodegenToolReference.htm= l">https://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html<= /a></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gma= il_attr">On Tue, Dec 6, 2022 at 4:04 AM robertlazarski <<a href=3D"mailt= o:[email protected]">[email protected]</a>> wrote:<br></di= v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde= r-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>D= id you ever figure this out? <br></div><div><br></div><div>I got busy this = past week, however I am interested in seeing how this could work. <br></div= ><div><br></div><div>I'd start here, by running this xmlbeans example w= ith wsdl2java. Then compare your wsdl with soap encoding to see what is mis= sing. <br></div><div><br></div><div><a href=3D"https://axis.apache.org/axis= 2/java/core/docs/userguide-creatingclients-xmlbeans.html" target=3D"_blank"= >https://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xml= beans.html</a> <br></div></div><br><div class=3D"gmail_quote"><div dir=3D"l= tr" class=3D"gmail_attr">On Wed, Nov 30, 2022 at 3:25 AM Thiago Milczarek S= ay=C3=A3o <<a href=3D"mailto:[email protected]" target=3D"_blank">t= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_qu= ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20= 4);padding-left:1ex"><div dir=3D"ltr"><div>Robert,</div><div><br></div>Than= ks for the reply.<div><br></div><div>I will try with xmlbeans as databindin= g.</div><div><br></div><div>One question:</div><div><br></div><div><br></di= v><div><pre style=3D"margin-top:0px;border:0px none;font-variant-numeric:in= herit;font-variant-east-asian:inherit;font-stretch:inherit;vertical-align:b= aseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code= style=3D"margin:0px;padding:0px;border:0px none;font-style:inherit;font-va= riant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;= font-family:inherit;vertical-align:baseline;box-sizing:inherit;background-c= olor:transparent;white-space:inherit"> cur.insertElementWithText("p= rocessSyncReturn","this is array element 2"); </code></pre><br></div><div>This is the example on stackoverflow.</div><div= ><br></div><div>How would I insert a complex type, instead of a string? My = guess it to serialize de XmlObject and insert as string. How would I do tha= t?</div><div><br></div><div>Thanks.</div><div><br></div></div><br><div clas= s=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Em ter., 29 de nov.= de 2022 =C3=A0s 17:59, robertlazarski <<a href=3D"mailto:robertlazarski= @gmail.com" target=3D"_blank">[email protected]</a>> escreveu:<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 dir=3D"ltr"><= div>Sorry, wrong link: <br></div><div><br></div><div><a href=3D"https://sta= ckoverflow.com/questions/11561194/how-can-i-get-axis2-to-handle-an-array" t= arget=3D"_blank">https://stackoverflow.com/questions/11561194/how-can-i-get= -axis2-to-handle-an-array</a></div></div><br><div class=3D"gmail_quote"><di= v dir=3D"ltr" class=3D"gmail_attr">On Tue, Nov 29, 2022 at 10:56 AM robertl= azarski <<a href=3D"mailto:[email protected]" target=3D"_blank">r= [email protected]</a>> 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 dir=3D"ltr"><div>Axis2 doesn't support soap= enc. <br></div><div><br></div><div>Axis 1.x does, but you likely don't = want to use that. <br></div><div><br></div><div>Some have claimed that you = can use the XMLBeans API directly, after you run wsdl2code. <br></div><div>= <br></div><div>See the bottom of this link for an example. <br></div><div><= br></div><div><a href=3D"https://stackoverflow.com/questions/74577973/how-t= o-use-array-soap-encoding-type-with-axis2-xmlbeans" target=3D"_blank">https= ://stackoverflow.com/questions/74577973/how-to-use-array-soap-encoding-type= -with-axis2-xmlbeans</a></div><div><br></div><div>If you get that to work, = I'd document it if you could provide a working example.=C2=A0 <br></div= ><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Tue, Nov 29, 2022 at 8:27 AM Thiago Milczarek Say=C3=A3o= <<a href=3D"mailto:[email protected]" target=3D"_blank">thiago.say= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote" styl= e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin= g-left:1ex"><div dir=3D"ltr">Hello,<div><br></div><div>I've posted the = question here:</div><div><a href=3D"https://stackoverflow.com/questions/745= 77973/how-to-use-array-soap-encoding-type-with-axis2-xmlbeans" target=3D"_b= lank">https://stackoverflow.com/questions/74577973/how-to-use-array-soap-en= coding-type-with-axis2-xmlbeans</a><br></div><div><br></div><div>I want to = use this service:</div><div><a href=3D"https://farmaciapopular-autorizador.= saude.gov.br/farmaciapopular-autorizador/services/ServicoSolicitacaoWS?wsdl= " target=3D"_blank">https://farmaciapopular-autorizador.saude.gov.br/farmac= iapopular-autorizador/services/ServicoSolicitacaoWS?wsdl</a><br></div><div>= <br></div><div><complexType name=3D"ArrayOfMedicamentoDTO">= <br><complexContent><br><restriction base=3D"soapenc:Array&qu= ot;><br><attribute ref=3D"soapenc:arrayType" wsdl:arrayType= =3D"impl:MedicamentoDTO[]"/><br></restriction><br></c= omplexContent><br></complexType><br></div><div><br></div><div>It g= enerates=C2=A0a class=C2=A0 ArrayOfMedicamentoDTO that extentds Array, but there's no way to add it= ems to it.</div><div><br></div><div>Thanks.</div></div> </blockquote></div> </blockquote></div> </blockquote></div> </blockquote></div> </blockquote></div> --00000000000005052605ef29683c--