Re: Help with old service that uses soap encoding

robertlazarski <[email protected]> Wed, 7 Dec 2022 06:57:30 -1000
Newsgroups gmane.text.xml.axis.user
Message-ID <CABpPLBUKBCkjewfBYwKfhh0Ho_FTsep5fu59FUv5CdUSsWhH=Q@mail.gmail.com>
--0000000000009ae72105ef3fd114
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

While Axis 1.4 was the last official release in 2006, we have a github repo
with hundreds of commits since then related to security and build purposes.

See below:

git clone https://github.com/apache/axis-axis1-java.git

The downside is that no active Axis committers are using 1.x in their own
projects and therefore not much is happening in that repo right now. And it
will only build on JDK 8, not later due to JDK source level compiling at
1.4.

For an official release to happen, It would require community
participation.

Even so, we will respond to Axis 1.x security issues and there are no known
issues currently.


On Wed, Dec 7, 2022 at 2:43 AM Thiago Milczarek Say=C3=A3o <
[email protected]> wrote:

> Hi Robert,
>
> Thanks for the reply. I still didn't have success. I'm thinking about
> using axis 1.4.
>
> Cheers.
>
> Em ter., 6 de dez. de 2022 =C3=A0s 11:13, robertlazarski <
> [email protected]> escreveu:
>
>> I mean to include this link, which at the end of a page there is a bette=
r
>> 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-=
xmlbeans.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 eleme=
nt 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-h=
andle-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
>>>>>> you run wsdl2code.
>>>>>>
>>>>>> See the bottom of this link for an example.
>>>>>>
>>>>>>
>>>>>> https://stackoverflow.com/questions/74577973/how-to-use-array-soap-e=
ncoding-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-=
encoding-type-with-axis2-xmlbeans
>>>>>>>
>>>>>>> I want to use this service:
>>>>>>>
>>>>>>> https://farmaciapopular-autorizador.saude.gov.br/farmaciapopular-au=
torizador/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, bu=
t
>>>>>>> there's no way to add items to it.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>

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

<div dir=3D"ltr"><div>While Axis 1.4 was the last official release in 2006,=
 we have a github repo with hundreds of commits since then related to secur=
ity and build purposes. <br></div><div><br></div><div>See below: <br></div>=
<div><br></div><div><span style=3D"font-family:monospace"><span style=3D"co=
lor:rgb(0,0,0);background-color:rgb(255,255,255)">git </span><span style=3D=
"font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">c=
lone</span><span style=3D"color:rgb(0,0,0);background-color:rgb(255,255,255=
)"> <a href=3D"https://github.com/apache/axis-axis1-java.git">https://githu=
b.com/apache/axis-axis1-java.git</a></span></span></div><div><span style=3D=
"font-family:monospace"><span style=3D"color:rgb(0,0,0);background-color:rg=
b(255,255,255)"><br></span></span></div><div>The downside is that no active=
 Axis committers are using 1.x in their own projects and therefore not much=
 is happening in that repo right now. And it will only build on JDK 8, not =
later due to JDK source level compiling at 1.4. <br></div><div><br></div><d=
iv>For an official release to happen, It would require community participat=
ion.=C2=A0 <br></div><div><br></div><div>Even so, we will respond to Axis 1=
.x security issues and there are no known issues currently. <br></div><br><=
/div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">O=
n Wed, Dec 7, 2022 at 2:43 AM Thiago Milczarek Say=C3=A3o &lt;<a href=3D"ma=
ilto:[email protected]">[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">Hi Robe=
rt,<div><br></div><div>Thanks for the reply. I still didn&#39;t have succes=
s. I&#39;m thinking about using axis 1.4.</div><div><br></div><div>Cheers.<=
/div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">Em ter., 6 de dez. de 2022 =C3=A0s 11:13, robertlazarski &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">robertlazarski@gmail=
.com</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-lef=
t:1ex"><div dir=3D"ltr"><div>I mean to include this link, which at the end =
of a page there is a better xmlbeans example. <br></div><div><br></div><div=
><a href=3D"https://axis.apache.org/axis2/java/core/tools/CodegenToolRefere=
nce.html" target=3D"_blank">https://axis.apache.org/axis2/java/core/tools/C=
odegenToolReference.html</a></div></div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 6, 2022 at 4:04 AM robertlaza=
rski &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">robe=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex"><div dir=3D"ltr"><div>Did you ever figure this out? <br=
></div><div><br></div><div>I got busy this past week, however I am interest=
ed in seeing how this could work. <br></div><div><br></div><div>I&#39;d sta=
rt here, by running this xmlbeans example with wsdl2java. Then compare your=
 wsdl with soap encoding to see what is missing. <br></div><div><br></div><=
div><a href=3D"https://axis.apache.org/axis2/java/core/docs/userguide-creat=
ingclients-xmlbeans.html" target=3D"_blank">https://axis.apache.org/axis2/j=
ava/core/docs/userguide-creatingclients-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 Milczarek Say=C3=A3o &lt;<a href=3D"mailto:=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wr=
ote:<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>Robert,</div><div><br></div>Thanks for the reply.<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 style=3D"margin-top:=
0px;border:0px none;font-variant-numeric:inherit;font-variant-east-asian:in=
herit;font-stretch:inherit;vertical-align:baseline;box-sizing:inherit;width=
:auto;max-height:600px;overflow:auto"><code style=3D"margin:0px;padding:0px=
;border:0px none;font-style:inherit;font-variant:inherit;font-weight:inheri=
t;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-ali=
gn:baseline;box-sizing:inherit;background-color:transparent;white-space:inh=
erit">    cur.insertElementWithText(&quot;processSyncReturn&quot;,&quot;thi=
s 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>
</blockquote></div>
</blockquote></div>
</blockquote></div>

--0000000000009ae72105ef3fd114--