Please help defining a complexType of mine |
Site Admin
|
see links to the samples published on this forum
|
||||||||||||
_________________ The PHP IDE team |
|
Hi dmitri,
I've looked lots of examples around the web including this forum but couldn't find a solution yet. I've no problem defining complex types that's all structures (keys, value types) are known. But how do i define a complex structure that is mapping a database row (variant keys, variant values). I've tried this:
This works with a nusoap client but not with a .NET client. Here i can't go any further with QueryRow definition because it doesn't have a fixed structure, it has the structure of the database table that's returned by executing the sql statement. So i still need your help. Thanks. |
||||||||||||||
|
Site Admin
|
I'm not sure if variants (in VB terms) are supported by soap standards itself. Also, from your sample it looks like you use mysql. For sure it does not support variants too. Finally, php uses strings/int/float/array for storing values. Where the variants come from?
Finally, if you need to pass a value which type is now known beforehand, you can always map it into string and pass as string, it's portable the most. |
||||||||||||
_________________ The PHP IDE team |
|
Hi dmitri,
By variant i mean it changes, i didn't mean as a variable type. Sorry for my english. The function gets a string which is a select sql statement and returns the resultset. For example user can call this function with this: select * from table1; or select * from table1 as t1 left join table2 as t2... or select id from table1 each resultset is different, i don't know which columns, data types it has. how can i define my function's return value type in wsdl with nusoap? thanks. |
||||||||||||
|
|
any hope?
|
||||||||||||
|
Site Admin
|
I have very little to add to what you have already replied. The problem is more of soap standard. It can't work "this time with endpoint will work with this set of parameters and next time it will work with totally different one". What you can is define two dimensional array of _STRINGS_ and return it as a resultset. In this case you'll have to convert all fields returned from database to strings and put them into the array of arrays.
|
||||||||||||
_________________ The PHP IDE team |
|
scalar data types are not important for me, it may all be string.
can't i just say "this function returns an array" like:
|
||||||||||||||
|
Please help defining a complexType of mine |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by