On Sat, 29 Nov 2008, Hari Krishna.N wrote: > Hi, > > This is Hari. I am PHP programmer. I am writing PHP SOAP server > programme. > > In WSDL file I mentioned the tags like > <xs:complexType name="Body"> > <xs:choice> > <xs:element ref="NewMedicine"/> > <xs:element ref="RequestForMedicine"/> > ................ > > I am using PHP 5.0.1. > > I am getting error like > Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing > Schema: unresolved element 'ref' attribute > > Here when I use name instead ref no error. but this is not correct. > I hope PHP is not considering the ref attribute while creating the object. > > Please help me to solve this problem. > > Thanks in advance > > Hari. >
The 'name' attribute information item has the following 'infoset' properties: . a [local name] of 'name' . a [namespace name] which has no value The 'type' of 'name' attribute information item is xs:NCName Hence there is no error. Whereas, if you look at the 'ref' attribute information, you are required to specify an xs:NCName. You haven't specified, which namespace does RequestForMedicine belongs to ? Typically this done by specifying the 'targetNamespace' or if you are using multiple namespaces (watch for bugs), you need to have element level namespace qualifiers. As an example, please see the WSDL file for Google search, here. http://api.google.com/GoogleSearch.wsdl PHP has one of the finest support for high performance SOAP, both as an extension and also as a pure PHP library. Please review your own code ! thanks Saifi.

