Continued probs with .NET client consuming PHP SOAP service

From: Date: Thu, 17 Jul 2003 15:25:19 +0000
Subject: Continued probs with .NET client consuming PHP SOAP service
Groups: php.soap 
Request: Send a blank email to php-soap+get-842@lists.php.net to get a copy of this message
Hey all - we're still having errors when a .NET client attempts to consume my web service at http://csm-demo.symplicity.com/ws/student_api.php?wsdl. I've made several changes to the structure based on the advice of some list members - most notably the addition of the ArrayOfStrings schema type and associated changes to the typedef. The typedef, soap server xml stream, and error message are attached below. Thank you very much for any guidance. Al TYPEDEF ------- $this->__typedef = array( 'student_id' => 'string', 'school_student_id' => 'string', 'fullname' => 'string', 'fname' => 'string', 'mi' => 'string', 'lname' => 'string', 'email' => 'string', 'ss_number' => 'string', 'gender' => 'string', 'birthdate' => 'string', 'permanent_street' => 'string', 'permanent_city' => 'string', 'permanent_state' => 'string', 'permanent_zip' => 'string', 'permanent_country' => 'string', 'street' => 'string', 'city' => 'string', 'state' => 'string', 'zip' => 'string', 'country' => 'string', 'account_disabled_flag' => 'Boolean', 'account_blocked_flag' => 'Boolean', 'major' => '{urn:'.$this->getNameSpace().'}ArrayOfStrings', 'minor' => '{urn:'.$this->getNameSpace().'}ArrayOfStrings', 'graduation_date' => 'string', 'year' => 'string', 'gpa' => 'decimal', 'program_type' => 'string', 'work_authorization' => 'string', 'degree_level' => 'string', 'receive_email_flag' => 'Boolean', 'resume_book_flag' => 'Boolean', 'logins' => 'decimal', 'lastlogin' => 'string' ); SERVER OUTPUT FROM __GETWIRE ---------------------------- HTTP/1.1 200 OK Date: Thu, 17 Jul 2003 14:57:30 GMT Server: Apache X-Powered-By: PHP/4.3.2 X-Accelerated-By: PHPA/1.3.3r2 Set-Cookie: PHPSESSID=f564d4c6dca619f0ffbc0c71e9153e75; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Status: 200 OK Content-Length: 2181 Connection: close Content-Type: text/xml; charset=UTF-8 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:CSM_Student_API" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4:getAsObjectBySchoolIDResponse> <StudentObject xsi:type="ns4:StudentObject"> <student_id xsi:type="xsd:string">5eb58d1c4a183e1dec8e6cc3096939eb</student_id> <fullname xsi:type="xsd:string">Paul Andrews</fullname> <fname xsi:type="xsd:string">Paul</fname> <mi xsi:type="xsd:string">T</mi> <lname xsi:type="xsd:string">Andrews</lname> <email xsi:type="xsd:string">paul_andrews@bsu.edu</email> <ss_number xsi:type="xsd:string"> </ss_number> <gender xsi:type="xsd:string"> </gender> <birthdate xsi:type="xsd:string"> </birthdate> <permanent_street xsi:type="xsd:string">1723 N Picolo Avenue</permanent_street> <permanent_city xsi:type="xsd:string">Salt Lake City</permanent_city> <permanent_state xsi:type="xsd:string">UT</permanent_state> <permanent_zip xsi:type="xsd:string">89104</permanent_zip> <permanent_country xsi:type="xsd:string">US</permanent_country> <street xsi:type="xsd:string">785 Wayne Street Apt. 541</street> <city xsi:type="xsd:string">College Mountain</city> <state xsi:type="xsd:string">CO</state> <zip xsi:type="xsd:string">54789</zip> <country xsi:type="xsd:string">US</country> <account_disabled_flag xsi:type="xsd:boolean">false</account_disabled_flag> <account_blocked_flag xsi:type="xsd:boolean">false</account_blocked_flag> <major xsi:type="ns4:ArrayOfStrings"> <item xsi:type="xsd:string">Arts &amp; Sciences</item> <item xsi:type="xsd:string">Addition</item> </major> <minor/> <graduation_date/> <year/> <gpa/> <program_type/> <work_authorization/> <degree_level/> <receive_email_flag/> <resume_book_flag/> <logins xsi:type="xsd:string">11</logins> <lastlogin xsi:type="xsd:string">2003-07-17 10:40:21</lastlogin> </StudentObject> </ns4:getAsObjectBySchoolIDResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ERROR MESSAGE FROM .NET CLIENT ------------------------------- System.InvalidOperationException: There is an error in XML document (33, 76). ---> System.InvalidCastException: Cannot assign object of type System.Boolean to an object of type System.String. at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Re ad1_StudentObject() at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(S tring name, String ns, Boolean elementCanBeType, String& fixupReference) at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(S tring name, String ns, String& fixupReference) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Re ad8_getAsObjectBySchoolIDResponse() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapCl ientMessage message, WebResponse response, Stream responseStream) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at com.symplicity.csm_demo.CSM_Student_APIService.getAsObjectBySchoolID(Str ing id) in c:\inetpub\wwwroot\career\Web References\com.symplicity.csm-demo\Reference.vb:line 60 at webServiceTest.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\career\student\webServiceTest.aspx.vb:line 76

« previous php.soap (#842) next »