Revision: 1487
http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1487&view=rev
Author: lclement
Date: 2009-04-07 00:02:42 +0000 (Tue, 07 Apr 2009)
Log Message:
-----------
Bug fix in the file attachment...
Modified Paths:
--------------
trunk/zsi/ZSI/TCapache.py
trunk/zsi/ZSI/generate/containers.py
trunk/zsi/ZSI/typeinterpreter.py
Modified: trunk/zsi/ZSI/TCapache.py
===================================================================
--- trunk/zsi/ZSI/TCapache.py 2009-04-07 00:02:02 UTC (rev 1486)
+++ trunk/zsi/ZSI/TCapache.py 2009-04-07 00:02:42 UTC (rev 1487)
@@ -6,10 +6,11 @@
from ZSI import _copyright, _child_elements, _get_idstr
from ZSI.TC import SimpleType, TypeCode, Struct as _Struct, Any as _Any
from ZSI.wstools.logging import getLogger as _GetLogger
+from ZSI.wstools.Namespaces import APACHE
#import types
class Apache:
- NS = "http://xml.apache.org/xml-soap"
+ NS = APACHE.AXIS_NS
class _Map(TypeCode):
'''Apache's "Map" type.
Modified: trunk/zsi/ZSI/generate/containers.py
===================================================================
--- trunk/zsi/ZSI/generate/containers.py 2009-04-07 00:02:02 UTC (rev 1486)
+++ trunk/zsi/ZSI/generate/containers.py 2009-04-07 00:02:42 UTC (rev 1487)
@@ -14,7 +14,7 @@
import ZSI
from ZSI.TC import _is_xsd_or_soap_ns
from ZSI.wstools import XMLSchema, WSDLTools
-from ZSI.wstools.Namespaces import SCHEMA, SOAP, WSDL
+from ZSI.wstools.Namespaces import SCHEMA, SOAP, WSDL, APACHE
from ZSI.wstools.logging import getLogger as _GetLogger
from ZSI.typeinterpreter import BaseTypeInterpreter
from ZSI.generate import WSISpec, WSInteropError, Wsdl2PythonError,\
@@ -1627,7 +1627,8 @@
elif global_type is not None:
tc.name = c.getAttribute('name')
ns = global_type[0]
- if ns in SCHEMA.XSD_LIST:
+ #APACHE.AXIS_NS is for DataHandler type
+ if ns in SCHEMA.XSD_LIST + [APACHE.AXIS_NS]:
tpc = BTI.get_typeclass(global_type[1],global_type[0])
tc.klass = tpc
# elif (self.ns,self.name) == global_type:
@@ -1775,7 +1776,7 @@
tc = RPCMessageTcListComponentContainer(qualified=False)
tc.setOccurs(min, max, nil)
tc.name = p.name
- if nsuri in [SOAP.ENC] + SCHEMA.XSD_LIST:
+ if nsuri in XMLSchema.BUILT_IN_NAMESPACES:
tpc = BTI.get_typeclass(name, nsuri)
tc.klass = tpc
else:
Modified: trunk/zsi/ZSI/typeinterpreter.py
===================================================================
--- trunk/zsi/ZSI/typeinterpreter.py 2009-04-07 00:02:02 UTC (rev 1486)
+++ trunk/zsi/ZSI/typeinterpreter.py 2009-04-07 00:02:42 UTC (rev 1487)
@@ -87,7 +87,7 @@
if untaged_xsd_types.has_key(msg_type):
return untaged_xsd_types[msg_type]
for tc in self._type_list:
- if tc.type == (SCHEMA.XSD3,msg_type) or tc.type == (SCHEMA.AXIS,msg_type):
+ if tc.type == (SCHEMA.XSD3,msg_type):
break
else:
tc = TC.AnyType
@@ -107,6 +107,14 @@
return self._get_xsd_typecode(name)
elif targetNamespace in [SOAP.ENC]:
return self._get_soapenc_typecode(name)
+ elif targetNamespace in [ZSI.TCapache.Apache.NS]:
+ #maybe we have an AXIS attachment
+ if name == ZSI.TCapache.AttachmentRef.type[1]:
+ #we have an AXIS attachment
+ return ZSI.TCapache.AttachmentRef
+ else:
+ #AXIS Map type
+ return TC.AnyType
return None
def get_pythontype(self, msg_type, targetNamespace, typeclass=None):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|