RE: Interop between PEAR-SOAP and Visual Studio - complex types

From: Date: Sat, 22 Oct 2005 12:57:43 +0000
Subject: RE: Interop between PEAR-SOAP and Visual Studio - complex types
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21593@lists.php.net to get a copy of this message
> > I have this problem with all other registered types as well > - Visual > > Studio simply uses string for anything except basic types > like "int", "float" etc. > > Is there a way to make Visual Studio understand complex types? I'd > > really appreciate any help. > > > You have an error in your WSDL: > <complexType name="dataObj"> > <complexContent> > <restriction base="SOAP-ENC:Array"> > <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:int[]" /> > </restriction> > </complexContent> > </complexType> > > <message name="retObjResponse"> > <part name="return" type="xsd:dataObj" /> > --> here is the error: Namespace xsd has no knowledge of the > type dataObj. > </message> > > Change it to this: > <message name="retObjResponse"> > <part name="return" type="tns:dataObj" /> </message> > > Reason: dataObj is declared in your own namespace which is > referenced in the namesspace xmlns:tns="urn:localhost" and > can be referenced via tns. It worked when I change it manually - but I use SOAP_DISCO_Server() class to generate WSDL - and it maps all my custom types to "xsd". I found that the type namespace is assigned inside addMethodsFromMap(), and is coming from $disco->_getTypeNs() method - and _getTypeNs() fails to determine custom defined types, returning XSD for any type, be it custom or not. Did I miss a certain way of defining a custom type, so that it maps to "tns" automatically? Thanks! Artyom

« previous php.pear.general (#21593) next »