From: Trivedi, A. <Apa...@ny...> - 2009-02-06 20:33:44
|
Very interesting... I updated to the trunk (also got wstools), updated my bindings, etc, and I am getting the same problem still. But I tried to run the example you showed below and was also able to successfully parse the response with both the alpha release I was using and the new zsi from trunk. Do you have any idea what else could be the problem here? I am going to dig a bit more. Thanks for all your quick responses so far. Par ________________________________ From: Joshua Boverhof [mailto:jrb...@lb...] Sent: Friday, February 06, 2009 2:58 PM To: Trivedi, Apaar Cc: pyw...@li... Subject: Re: [Pywebsvcs-talk] circular type in zsi So I took the response out of the soap trace, and can parse it w/o problem using the generated code. Now I get this warning about missing types, but it doesn't appear to matter for this situation. I recommend you change to using the SVN trunk and see if that fixes your problem -josh boverhof@greece:~/Apaar Trivedi$ wsdl2py -b --lazy mp_mdex.wsdl IMPORT: http://www.endeca.com/MDEX/data/IR600 no schemaLocation attribute in import boverhof@greece:~/Apaar Trivedi$ boverhof@greece:~/Apaar Trivedi$ grep Root * boverhof@greece:~/Apaar Trivedi$ boverhof@greece:~/Apaar Trivedi$ cat run.py #!/usr/bin/env python import sys import MenuPagesMDEX_client as client from ZSI.parse import ParsedSoap def main(): ps = ParsedSoap( open("response.xml").read() ) print ps.body pyobj = ps.Parse(client.NavQueryResponseMessage.typecode) print pyobj print pyobj.Dimensions print pyobj.Dimensions.Dimension return pyobj if __name__ == '__main__': main() boverhof@greece:~/Apaar Trivedi$ ./run.py <DOM Element: soapenv:Body at 0x838a64c> <MenuPagesMDEX_types.NavigationResults_Dec_Holder object at 0x84ba8ac> <MenuPagesMDEX_types.DimensionList_Holder object at 0x84baa8c> [<MenuPagesMDEX_types.Dimension_Holder object at 0x84bf04c>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84bfbcc>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84bf4ec>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84bffcc>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84c51ac>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84c522c>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84c52ac>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84c532c>, <MenuPagesMDEX_types.Dimension_Holder object at 0x84c54ac>] On Feb 6, 2009, at 11:40 AM, Trivedi, Apaar wrote: I seem to be able to generate the bindings without seeing that error. Can you take the import out? I took the import out and was still able to generate the bindings successfully. I have attached the types file as well. I should add that I use -b for the bindings to even be able to successfully send a request and receive the response. Additionally, when I try the -l (--lazy), my request is not build with fully qualified names, i.e. myNs:myElement, rather it is just myElement, and the web service I am trying to connect to requires fully qualified names. Thank you! Par ________________________________ From: Joshua Boverhof [mailto:jrb...@lb...] Sent: Friday, February 06, 2009 2:25 PM To: Trivedi, Apaar Cc: pyw...@li... Subject: Re: [Pywebsvcs-talk] circular type in zsi This schema is missing: $ wsdl2py mp_mdex.wsdl IMPORT: http://www.endeca.com/MDEX/data/IR600 no schemaLocation attribute in import It doesn't appear to be available at the URL above. -josh On Feb 6, 2009, at 10:52 AM, Trivedi, Apaar wrote: Thank you, I have attached the soap trace and the wsdl. The reason I am getting so confused about this is because neither my wsdl nor my response contains any 'root' element. Any help would be appreciated. Thanks! Par ________________________________ From: Joshua Boverhof [mailto:jrb...@lb...] Sent: Friday, February 06, 2009 1:44 PM To: Trivedi, Apaar Cc: pyw...@li... Subject: Re: [Pywebsvcs-talk] circular type in zsi You can use the "--lazy" flag to deal with "circular" references. But the element trace is looking for an element "Dimensions", containing an element "Dimension" not "DimensionValue"... So I think you're looking at the wrong schema items. Most likely there is an element called "Dimension" that contains a "Root" element that is required to be present but the web service is not providing it. If you need more help provide the soap trace and the WSDL. -josh On Feb 5, 2009, at 4:58 PM, Trivedi, Apaar wrote: I should add that Root is not even an element my wsdl. I can provide that and the soap response if it will help. thx ________________________________ From: Trivedi, Apaar [mailto:Apa...@ny...] Sent: Thursday, February 05, 2009 6:45 PM To: pyw...@li... Subject: [Pywebsvcs-talk] circular type in zsi Hello, I am using ZSI 2.1 and am having this issue when trying to parse the response: EvaluateException at /test Element "_Root" missing from complexType [Element trace: /soapenv:Envelope/soapenv:Body/NavigationResults/Dimensions/Dimension[1] ] The wsdl I have generated my bindings against has this sort of type schema in it: <complexType name="DimensionValue"> <sequence> <element name="DimensionValues" type="mdata:DimensionValueList" minOccurs="0" maxOccurs="1" /> </sequence> <attribute name="Name" type="mdata:NonEmptyString" use="required" /> <attribute name="Id" type="mdata:DimensionValueId" use="required" /> </complexType> <complexType name="DimensionValueList"> <sequence> <element name="DimensionValue" type="mdata:DimensionValue" minOccurs="1" maxOccurs="unbounded" /> </sequence> </complexType> Can ZSI handle this sort of circular reference? I ask because the parser seems to be failing once it hit's the first DimensionValueList node stored in DimensionValue. Thanks Apaar Trivedi ------------------------------------------------------------------------ ------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_____________________________________ __________ Pywebsvcs-talk mailing list Pyw...@li... https://lists.sourceforge.net/lists/listinfo/pywebsvcs-talk Also archived at http://groups.google.com/group/pywebsvcs <soap_trace.txt><mp_mdex.wsdl> ------------------------------------------------------------------------ ------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_____________________________________ __________ Pywebsvcs-talk mailing list Pyw...@li... https://lists.sourceforge.net/lists/listinfo/pywebsvcs-talk Also archived at http://groups.google.com/group/pywebsvcs <MenuPagesMDEX_types.py> |