Re: [SOAP] .NET interoperability continued... [2nd try]

From: Date: Wed, 26 Feb 2003 12:34:00 +0000
Subject: Re: [SOAP] .NET interoperability continued... [2nd try]
Groups: php.soap 
Request: Send a blank email to php-soap+get-441@lists.php.net to get a copy of this message
> Come on people, I know you're bussy, but please help me... The client is in C#, and it doesn't give me any error message, when it calls the php server methods, it doesn't return anything. I tried to debug the client, but I didn't find anything useful (I'm not sure how to do it right...) This is a trace with the server in php and the client in php: OUTGOING: POST /soap/categs_service.php HTTP/1.0 User-Agent: PEAR-SOAP 0.7.1 Host: demo.dev.ro Content-Type: text/xml; charset=UTF-8 Content-Length: 479 SOAPAction: "http://demo.dev.ro/soap/categs_service/getCategs" <?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="http://demo.dev.ro/soap/categs_service" > <SOAP-ENV:Body> <ns4:getCategs> <ns4:id>1</ns4:id> <ns4:lang>ro</ns4:lang></ns4:getCategs> </SOAP-ENV:Body> </SOAP-ENV:Envelope> INCOMING HTTP/1.1 200 OK Date: Mon, 24 Feb 2003 10:18:56 GMT Server: Apache/1.3.26 (Unix) PHP/4.3.1-dev X-Powered-By: PHP/4.3.1-dev Content-Length: 991 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="http://demo.dev.ro/soap/categs_service" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4:getCategsResponse> <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[3]" SOAP-ENC:offset="[0]"> <item/> <item> <id xsi:type="xsd:int">1</id> <pid/> <name xsi:type="xsd:string">categ 1 ro</name> <def/> <page_count xsi:type="xsd:int">0</page_count> <lang/> <description/> </item> <item> <id xsi:type="xsd:int">2</id> <pid/> <name xsi:type="xsd:string">categ 2 ro</name> <def/> <page_count xsi:type="xsd:int">0</page_count> <lang/> <description/> </item> </return> </ns4:getCategsResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -------------------------------------------------------------------- This is a trace with the server in php and the client in C# (client request formated by hand): OUTGOING: POST /soap/categs_service.php HTTP/1.1 VsDebuggerCausalityData: some stuff here User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.0.3705.0) Content-Type: text/xml; charset=utf-8 SOAPAction: "http://demo.dev.ro/soap/categs_service/getCategs" Content-Length: 341 Expect: 100-continue Connection: Keep-Alive Host: demo.dev.ro <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <getCategs xmlns="http://demo.dev.ro/soap/categs_service"> <id>1</id> <lang>ro</lang> </getCategs> </soap:Body> </soap:Envelope> INCOMING: HTTP/1.1 200 OK Date: Mon, 24 Feb 2003 10:27:23 GMT Server: Apache/1.3.26 (Unix) PHP/4.3.1-dev X-Powered-By: PHP/4.3.1-dev Content-Length: 991 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive 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="http://demo.dev.ro/soap/categs_service" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4:getCategsResponse> <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[3]" SOAP-ENC:offset="[0]"> <item/> <item> <id xsi:type="xsd:int">1</id> <pid/> <name xsi:type="xsd:string">categ 1 ro</name> <def/> <page_count xsi:type="xsd:int">0</page_count> <lang/> <description/></item> <item> <id xsi:type="xsd:int">2</id> <pid/> <name xsi:type="xsd:string">categ 2 ro</name> <def/> <page_count xsi:type="xsd:int">0</page_count> <lang/> <description/></item></return></ns4:getCategsResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> My array should looks like this: Array ( [1] => categ Object ( [id] => 1 [pid] => [name] => categ 1 ro [def] => [page_count] => 0 [lang] => [description] => ) [2] => categ Object ( [id] => 2 [pid] => [name] => categ 2 ro [def] => [page_count] => 0 [lang] => [description] => ) [3] => categ Object ( [id] => 3 [pid] => [name] => categ 3 ro [def] => [page_count] => 0 [lang] => [description] => ) ) but php doesn't quite get it right in xml... :( -------------------------------------------------------------------- This is a trace with the server in C# and the client in php (client output formated by hand): OUTGOING: POST /ws/categs_service.asmx HTTP/1.0 User-Agent: PEAR-SOAP 0.7.1 Host: hate.dev.ro Content-Type: text/xml; charset=UTF-8 Content-Length: 479 SOAPAction: "http://demo.dev.ro/soap/categs_service/getCategs" <?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="http://demo.dev.ro/soap/categs_service" > <SOAP-ENV:Body> <ns4:getCategs> <ns4:id>1</ns4:id> <ns4:lang>ro</ns4:lang></ns4:getCategs> </SOAP-ENV:Body> </SOAP-ENV:Envelope> INCOMING HTTP/1.1 200 OK Connection: close Date: Mon, 24 Feb 2003 11:02:42 GMT Server: Microsoft-IIS/6.0 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 652 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <getCategsResponse xmlns="http://demo.dev.ro/soap/categs_service"> <getCategsResult> <Categ> <id>1</id> <pid>0</pid> <name>Categ 1</name> <def>0</def> <page_count>0</page_count> </Categ> <Categ> <id>2</id> <pid>0</pid> <name>Categ 2</name> <def>0</def> <page_count>0</page_count> </Categ> <Categ> <id>3</id> <pid>0</pid> <name>Categ 3</name> <def>0</def> <page_count>0</page_count> </Categ> </getCategsResult> </getCategsResponse> </soap:Body> </soap:Envelope> On Fri, 21 Feb 2003, David Busby wrote: > Andrei, > First of I would like to say you are very brave to try SOAP interop with > .NET and PEAR with a beginner understanding of PHP,C#,XML and SOAP. Each of > these topics is a volume of information in and of itself. One thing that > would be helpful to the list (more so than a WSDL file) is the error > messages that are being reported by either the PEAR::SOAP_Server or the C# > Server. What is the Client doing? Is it in PHP or PERL or C# or ...? Can > you use the PEAR::SOAP_Client and then get a wire trace from messages to the > C# or PEAR server? Can you do a trace on another client sending messages to > the servers? Can you make the Servers write debug information to a file so > you can watch the transaction steps? > > Another interesting thing to mention is the two XML files that are not > exactly the same in size/text/layout/coding can still represent the same > data/object and could still be interpreted by SOAP nodes correctly, although > they would package the message differently. > > /B >

« previous php.soap (#441) next »