Re: Help with old service that uses soap encoding

robertlazarski <[email protected]> Tue, 6 Dec 2022 04:04:19 -1000
Newsgroups gmane.text.xml.axis.user
Message-ID <CABpPLBVfy9-ZMBbtEezJpg24gtf2KTNUpb4zF_ejw+W5RxG1_A@mail.gmail.com>
--0000000000005f92e805ef29487b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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-xmlb=
eans.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-hand=
le-an-array
>>
>> On Tue, Nov 29, 2022 at 10:56 AM robertlazarski <[email protected]=
m>
>> 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 you
>>> run wsdl2code.
>>>
>>> See the bottom of this link for an example.
>>>
>>>
>>> https://stackoverflow.com/questions/74577973/how-to-use-array-soap-enco=
ding-type-with-axis2-xmlbeans
>>>
>>> If you get that to work, I'd document it if you could provide a working
>>> 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-enc=
oding-type-with-axis2-xmlbeans
>>>>
>>>> I want to use this service:
>>>>
>>>> https://farmaciapopular-autorizador.saude.gov.br/farmaciapopular-autor=
izador/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.
>>>>
>>>

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

<div dir=3D"ltr"><div>Did you ever figure this out? <br></div><div><br></di=
v><div>I got busy this past week, however I am interested in seeing how thi=
s could work. <br></div><div><br></div><div>I&#39;d start here, by running =
this xmlbeans example with wsdl2java. Then compare your wsdl with soap enco=
ding to see what is missing. <br></div><div><br></div><div><a href=3D"https=
://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xmlbeans.=
html">https://axis.apache.org/axis2/java/core/docs/userguide-creatingclient=
s-xmlbeans.html</a> <br></div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Wed, Nov 30, 2022 at 3:25 AM Thiago Milcza=
rek Say=C3=A3o &lt;<a href=3D"mailto:[email protected]">thiago.sayao@g=
mail.com</a>&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-le=
ft:1ex"><div dir=3D"ltr"><div>Robert,</div><div><br></div>Thanks for the re=
ply.<div><br></div><div>I will try with xmlbeans as databinding.</div><div>=
<br></div><div>One question:</div><div><br></div><div><br></div><div><pre s=
tyle=3D"margin-top:0px;border:0px none;font-variant-numeric:inherit;font-va=
riant-east-asian:inherit;font-stretch:inherit;vertical-align:baseline;box-s=
izing:inherit;width:auto;max-height:600px;overflow:auto"><code style=3D"mar=
gin:0px;padding:0px;border:0px none;font-style:inherit;font-variant:inherit=
;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:i=
nherit;vertical-align:baseline;box-sizing:inherit;background-color:transpar=
ent;white-space:inherit">    cur.insertElementWithText(&quot;processSyncRet=
urn&quot;,&quot;this is array element 2&quot;);
</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 &lt;<a href=3D"mailto:robertlazarski=
@gmail.com" target=3D"_blank">[email protected]</a>&gt; 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 &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">r=
[email protected]</a>&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 dir=3D"ltr"><div>Axis2 doesn&#39;t support soap=
enc. <br></div><div><br></div><div>Axis 1.x does, but you likely don&#39;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&#39;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=
 &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">thiago.say=
[email protected]</a>&gt; 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&#39;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>&lt;complexType name=3D&quot;ArrayOfMedicamentoDTO&quot;&gt;=
<br>&lt;complexContent&gt;<br>&lt;restriction base=3D&quot;soapenc:Array&qu=
ot;&gt;<br>&lt;attribute ref=3D&quot;soapenc:arrayType&quot; wsdl:arrayType=
=3D&quot;impl:MedicamentoDTO[]&quot;/&gt;<br>&lt;/restriction&gt;<br>&lt;/c=
omplexContent&gt;<br>&lt;/complexType&gt;<br></div><div><br></div><div>It g=
enerates=C2=A0a class=C2=A0

ArrayOfMedicamentoDTO that extentds Array, but there&#39;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>

--0000000000005f92e805ef29487b--