RE: [SOAP] Help with .NET client

From: Date: Wed, 16 Jul 2003 20:53:03 +0000
Subject: RE: [SOAP] Help with .NET client
Groups: php.soap 
Request: Send a blank email to php-soap+get-830@lists.php.net to get a copy of this message
I have successfully consumed a PHP SOAP webservice from a .NET client using 0.7.5 after changing the SCHEMA_SOAP_HTTP (removing the trailing /) in Base.php. The only difference I can find in the provided WSDL and the one that I am using is that my schema targetNamespace is "http://granicus.com/xsd" rather than "urn:CSM_Student_API". Can you past your __typedef declaration? -Javier -----Original Message----- From: Alok K. Dhir [mailto:adhir@symplicity.com] Sent: Wednesday, July 16, 2003 12:42 PM To: 'SOAP' Subject: RE: [SOAP] Help with .NET client It should be noted that the methods that return simple types work fine from the .NET client using the same PHP SOAP server. > -----Original Message----- > From: Alok K. Dhir [mailto:adhir@symplicity.com] > Sent: Wednesday, July 16, 2003 3:13 PM > To: 'SOAP' > Subject: [SOAP] Help with .NET client > > > > Hey all - I need help with a .NET SOAP client consuming my > PHP SOAP web > service. > > My SOAP server returns a "StudentObject" based on an ID > passed to one of > it's methods. The WSDL can be seen at > http://csm-demo.symplicity.com/ws/student_api.php?wsdl. > > I am having no issue with a simple PHP script I wrote to > "getStudentBySchoolID", but when my client's .NET application tries to > get it, he gets an error from his XML parser (the error message > is provided > below, under the getwire output). > > I ran the PHP SOAP client with trace on and I have attached > the output of > __getwire() (presumably exactly the same as what the .NET > client gets and > chokes on. > > Any pointers would be greatly appreciated. > > Al > > > Output from __getwire() in PHP SOAP client > ------------------------------------------ > HTTP/1.1 200 OK > Date: Wed, 16 Jul 2003 19:03:03 GMT > Server: Apache > X-Powered-By: PHP/4.3.2 > X-Accelerated-By: PHPA/1.3.3r2 > Set-Cookie: PHPSESSID=38c4b2794a592f879038ac2aa6337b39; 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: 2385 > 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:string">0</account_disabled_flag> > <account_blocked_flag xsi:type="xsd:string">0</account_blocked_flag> > <major> > <item xsi:type="xsd:string">Arts &amp; Sciences</item> > <item xsi:type="xsd:string">Addition</item> > </major> > <minor/> > <graduation_date xsi:type="xsd:string">2003-03-01</graduation_date> > <year xsi:type="xsd:string">4</year> > <gpa xsi:type="xsd:string">3.95</gpa> > <program_type xsi:type="xsd:string">Career</program_type> > <work_authorization xsi:type="xsd:string">1</work_authorization> > <degree_level xsi:type="xsd:string">2</degree_level> > <receive_email_flag xsi:type="xsd:string">1</receive_email_flag> > <resume_book_flag xsi:type="xsd:string">1</resume_book_flag> > <logins/> > <lastlogin/> > <password/> > </StudentObject> > </ns4:getAsObjectBySchoolIDResponse> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > > > Error from .NET XML parser > --------------------------- > System.InvalidOperationException: There is an error in XML > document (36, > 2). ---> System.Xml.XmlException: 'Element' is an invalid node type. > Line 36, position 2. at System.Xml.XmlReader.ReadEndElement() at > System.Xml.Serialization.XmlSerializationReader.ReadEndElement() at > System.Xml.Serialization.XmlSerializationReader.ReadStringValue() at > System.Xml.Serialization.XmlSerializationReader.ReadTypedPrimi > tive(XmlQu > alifiedName type, Boolean elementCanBeType) at > System.Xml.Serialization.XmlSerializationReader.ReadReferencin > gElement(S > tring name, String ns, Boolean elementCanBeType, String& > fixupReference) > at > System.Xml.Serialization.XmlSerializationReader.ReadReferencin > gElement(S > tring name, String ns, String& fixupReference) at > Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerialization > Reader1.Re > ad1_StudentObject() at > System.Xml.Serialization.XmlSerializationReader.ReadReferencin > gElement(S > tring name, String ns, Boolean elementCanBeType, String& > fixupReference) > at > System.Xml.Serialization.XmlSerializationReader.ReadReferencin > gElement(S > tring name, String ns, String& fixupReference) at > Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerialization > Reader1.Re > ad8_getAsObjectBySchoolIDResponse() --- End of inner exception stack > trace --- at > System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader > xmlReader) > at > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadRespo > nse(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.getAsObjectBySc > hoolID(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 > > Alok K. Dhir > adhir@symplicity.com > Symplicity Corporation > http://solutions.symplicity.com/ > 703-351-6987 > > > -- > PHP Soap Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.soap (#830) next »