Re: using xmlbeans on client side (in conjunction with axis2); null returns although data is available
Tim Watts <[email protected]> Mon, 26 Nov 2012 06:09:21 -0500
| Newsgroups | gmane.text.xml.xmlbeans.user |
|---|---|
| Organization | Clifton Farm |
| Message-ID | <1353928161.3006.37.camel@dellberry> |
--=-tA0UI4QOMp2zDFwq5n0p
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Mon, 2012-11-26 at 08:37 +0100, moh.sushi wrote:
> Hello together,
>=20
> i have a problem with using xmlbeans.
> Following situation is given.
>=20
> - remote wsdl available (see http://pastebin.com/5qnFScMx)
> - code generation using axis2 and databinding xmlbeans
>=20
> i can do a request and i get a response, too.
>=20
> The problem is while iterating through given response.
> I just want to get part of the response with xmlbeans therefore i post
> the question on this mailing list.
>=20
> this is toString-ouput of the response:
>=20
> (1)
> <GetImageURLResponse xmlns=3D"https://recettage.ria.neopod.fm-ged.com/ws"
> xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
> xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance">
> <return>
> <CODE_ORDER>xyz</CODE_ORDER>
> <PICTURES>
> <item>
> <OCD>2011-10-20</OCD>
> <PICTURE_ID>1</PICTURE_ID>
> <URL>https://host.fr/images/1.jpg</URL>
> <SCAN_DATE>2011-11-18</SCAN_DATE>
> </item>
> <item>
> <OCD>2011-10-20</OCD>
> <PICTURE_ID>2</PICTURE_ID>
> <URL>https://host.fr/images/2.jpg</URL>
> <SCAN_DATE>2011-10-31</SCAN_DATE>
> </item>
> <item>
> <OCD>2011-10-20</OCD>
> <PICTURE_ID>3</PICTURE_ID>
> <URL>https://host.fr/images/3.jpg</URL>
> <SCAN_DATE>2011-11-18</SCAN_DATE>
> </item>
> </PICTURES>
> </return>
> </GetImageURLResponse>
>=20
> the toString output of the return fragement
> (2)
> <xml-fragment xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/=
"
> xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
> xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ws=3D"https://recettage.ria.neopod.fm-ged.com/ws">
> <ws:return>
> <ws:CODE_ORDER>yxz</ws:CODE_ORDER>
> <ws:PICTURES>
> <ws:item>
> <ws:OCD>2011-10-20</ws:OCD>
> <ws:PICTURE_ID>1</ws:PICTURE_ID>
> <ws:URL>https://host.fr/images/1.jpg</ws:URL>
> <ws:SCAN_DATE>2011-11-18</ws:SCAN_DATE>
> </ws:item>
> <ws:item>
> <ws:OCD>2011-10-20</ws:OCD>
> <ws:PICTURE_ID>2</ws:PICTURE_ID>
> <ws:URL>https://host.fr/images/2.jpg</ws:URL>
> <ws:SCAN_DATE>2011-10-31</ws:SCAN_DATE>
> </ws:item>
> <ws:item>
> <ws:OCD>2011-10-20</ws:OCD>
> <ws:PICTURE_ID>3</ws:PICTURE_ID>
> <ws:URL>https://host.fr/images/3.jpg</ws:URL>
> <ws:SCAN_DATE>2011-11-18</ws:SCAN_DATE>
> </ws:item>
> </ws:PICTURES>
> </ws:return>
> </xml-fragment>
>=20
>=20
> Following code snippet i use:
> fully object "GetImageURLResponseDocument response" is given (see 1)
> GetImageURLResponse imageResponse =3D response.getGetImageURLResponse(); =
(see 2)
> Order order =3D imageResponse.getReturn(); <=3D=3D null returns
>=20
> method body of "getReturn" is :
> public com.fm_ged.neopod.ria.recettage.ws.Order getReturn()
> {
> synchronized (monitor())
> {
> check_orphaned();
> com.fm_ged.neopod.ria.recettage.ws.Order target =3D null;
> target =3D
> (com.fm_ged.neopod.ria.recettage.ws.Order)get_store().find_element_user(R=
ETURN$0,
> 0); <=3D nothing is found therefore null
> if (target =3D=3D null)
> {
> return null;
> }
> return target;
> }
> }
>=20
> The variable "RETURN$0" is:
> private static final javax.xml.namespace.QName RETURN$0 =3D new
> javax.xml.namespace.QName("", "return");
>=20
I think you need to use "https://recettage.ria.neopod.fm-ged.com/ws" in
the first QName arg above.
> i use
> Axis 1.6.0
> xmlbeans-2.3.0.jar
>=20
> What is going wrong?
> Is the server response maybe wrong?
> Something wrong on my client side?
>=20
> Any help is appreciated!
>=20
> Thanks in advance!
>=20
>=20
> Regards,
> Sascha
>=20
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>=20
--=-tA0UI4QOMp2zDFwq5n0p
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAABAgAGBQJQs03hAAoJEAfDBXDHBQilPCIIAIOWqxCq1MpLUjLezw7Sbh7k
fwyGF1p5mbJCl/vCJzF9VhEewqlr61zbp3dYyMxCe7z6g++Tzd0IvCuvyqXatykb
jGtEZ0ak7ZofyXts5joF2hDH4f1BtXDIoCkKkPgGlKtaFQedbT5YQ9rFi8FnDSKj
eNeYSqb8KzVCsxyLOL1C1nNr4lNsNBOHbYxomP1t3a+GaIoopg/Z0MYVCLvm1+Uw
mEHNIAlvdTxV9k7xoSpfgW+JizvSBCE2P/W3A0b6BNDAE2vY0+tsqdhb3vQQOGV+
XvyDgda4vM0GaqC9vgudWkDl7av2IxC7sYN2AoBzieXJ0lrEJVOKfrmhOGv5eDk=
=Q1Vp
-----END PGP SIGNATURE-----
--=-tA0UI4QOMp2zDFwq5n0p--