From: Joshua B. <JRB...@lb...> - 2004-04-26 23:12:17
|
On Apr 5, 2004, at 9:25 PM, Mayne, Peter wrote: > I'm attempting to receive a structure from a JAX-RPC server. The=20 > structure is an array of (long,string) beans (see WSDL below).=20 > Unfortunately, I'm getting an exception when ZSI attempts to parse the=20= > response. I've had a bit of a look, but it gets a bit complicated=20 > here, so I won't offer a possibly misleading guess as to what's going=20= > on. :-) (Needless to say, this works fine with a JAX-RPC client.) > > Any clues? > > What comes back from the JAX-RPC server is the following: > > =A0 <?xml version=3D"1.0" encoding=3D"UTF-8" ?> > =A0<env:Envelope xmlns:env=3D"http://schemas.xmlsoap.org/soap/envelope/"= =20 > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"=20 > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"=20 > xmlns:enc=3D"http://schemas.xmlsoap.org/soap/encoding/"=20 > xmlns:ns0=3D"http://com.test/types/MyHello"=20 > env:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/"> > > =A0<env:Body> > =A0<ans1:getBeansResponse xmlns:ans1=3D"http://com.test/wsdl/MyHello"> > =A0 <result href=3D"#ID1" /> > =A0 </ans1:getBeansResponse> > =A0<ns0:ArrayOfHelloBean id=3D"ID1" xsi:type=3D"enc:Array"=20 > enc:arrayType=3D"ns0:HelloBean[2]"> > =A0 <item href=3D"#ID2" /> > =A0 <item href=3D"#ID3" /> > =A0 </ns0:ArrayOfHelloBean> > =A0<ns0:HelloBean id=3D"ID2" xsi:type=3D"ns0:HelloBean"> > =A0 <number xsi:type=3D"xsd:long">1081219693728</number> > =A0 <text xsi:type=3D"xsd:string">number=3D107</text> > =A0 </ns0:HelloBean> > =A0<ns0:HelloBean id=3D"ID3" xsi:type=3D"ns0:HelloBean"> > =A0 <number xsi:type=3D"xsd:long">1081219693728</number> > =A0 <text xsi:type=3D"xsd:string">number=3D108</text> > =A0 </ns0:HelloBean> > =A0 </env:Body> > =A0 </env:Envelope> > > When ZSI attempts to parse this: > > Traceback (most recent call last): > =A0 File "./hellob.py", line 13, in ? > =A0=A0=A0 s =3D portType.getBeans(request) > =A0 File "/home/maynp/MyHello_services.py", line 83, in getBeans > =A0=A0=A0 response =3D = self.binding.Receive(Hello_getBeansResponseWrapper()) > =A0 File "/usr/local/lib/python2.3/site-packages/ZSI/client.py", line=20= > 324, in Receive > =A0=A0=A0 return self.ps.Parse(tc) > =A0 File "/usr/local/lib/python2.3/site-packages/ZSI/parse.py", line=20= > 313, in Parse > =A0=A0=A0 return how.parse(self.body_root, self) > =A0 File "/usr/local/lib/python2.3/site-packages/ZSI/TCcompound.py",=20= > line 107, in parse > =A0=A0=A0 raise e > ZSI.EvaluateException: getBeansResponse._result: Array expected > [Element trace: /env:Envelope/env:Body/ans1:getBeansResponse/result] Ya it appears that the TCcompound.Array parse method doesn't=20 look/resolve the HREF, it is just testing if the child is an array and since it is not=20 it raises an EvaluateException. I'll check in a bug fix for this real quick. -josh |