Re: XML schema problems
| From: | Rob Booth | Date: | Wed, 11 Jun 2003 23:51:25 +0000 |
| Subject: | Re: XML schema problems | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-705@lists.php.net to get a copy of this message | ||
I have the same setup you have and I haven't run into any problems with C#
sending an array to my PEAR::SOAP server. Are you generating the proxy code
with wsdl.exe or are you doing it all by hand? In using wsdl.exe eveything
works great as long as the C# client encapsulates the data sent back to the
server inside the generated objects from wsdl.exe.
Rob
"Steve Fisk" <sfisk@quantiv.com> wrote in message
news:1313794861F6D31193530090271F45FEEA72AF@leo.quantiv.com...
I've noticed a problem while working with SOAP talking to a C# web service:
We are developing a website where the engine is written in Microsoft
languages (chiefly c#) and the web site that it drives is written in PHP -
we are using SOAP to pass the information we need for each request from one
to the other.
The problem arose when we tried to write the login system - Our login is a
membership number on one page followed by a password screen where it asks
you some pre-agreed security questions. We wanted to send the back end an
array of answers and therein lies the problem:
When we send an array of answers the schema looks like this:
<answerList>
<ns4:item>answer1</item>
<ns4:item>answer2</item>
<ns4:item>answer3</item>
</answerList>
where ns4 is the default namespace and the item tags denote array elements.
The problem is that the definition in the WSDL defines strings - therefore
the schema should look like this:
<answerList>
<ns4:string>answer1</string >
<ns4:string>answer2</string >
<ns4:string>answer3</string >
</answerList>
This is the standard for Microsoft and the back end developers have to write
a big swathe of code to compensate for this problem.
In the end our solution was to send three separate answers - is there any
way the schema can be more tightly defined in PHP so that this work is
unnecessary? We were discussing the problem and came up with the idea that
because PHP is largely typeless the 'item' was to allow anything to be put
into the array but this is difficult when the code in other people's systems
is typed.and a big part of the idea for SOAP is that it can work with
anybody's code in anybody's language who could receive the protocol.
Thanks
Steve Fisk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24/04/2003
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________