I need some help declaring a WSDL type
-
Hello. I hope this is the right place to post this kind of question... I am trying to create a C# client and a PHP server communicating with each other using SOAP. I have written a WSDL file (a type of XML) to describe the SOAP envelope transmitted between the two applications. My problem is that I need to send to the client an object which contains several strings and another object which contains error and warning messages (3 strings) and I have no idea how to create a type in the WSDL that holds both objects. You probably want to know why I don't merge the two objects... I can't because in some situations the first object can be an array of objects... Here is the type definition for a simple function (this works): Here is what I'm trying to obtain: It seems that I'm making a mistake by declaring the type of the "Status" field as "AuctionStatusItem" I will be grateful if anybody can help me. I've been searching for a fix to this problem for days now... I'm a noob at XML's and I don't fully understand the complex type definitions yet... Thank you, Michael
-
Hello. I hope this is the right place to post this kind of question... I am trying to create a C# client and a PHP server communicating with each other using SOAP. I have written a WSDL file (a type of XML) to describe the SOAP envelope transmitted between the two applications. My problem is that I need to send to the client an object which contains several strings and another object which contains error and warning messages (3 strings) and I have no idea how to create a type in the WSDL that holds both objects. You probably want to know why I don't merge the two objects... I can't because in some situations the first object can be an array of objects... Here is the type definition for a simple function (this works): Here is what I'm trying to obtain: It seems that I'm making a mistake by declaring the type of the "Status" field as "AuctionStatusItem" I will be grateful if anybody can help me. I've been searching for a fix to this problem for days now... I'm a noob at XML's and I don't fully understand the complex type definitions yet... Thank you, Michael
It seems that I can do something like this: This works only if the "EndTime" element is simple type. If I replace it with an array (this is my actual goal), unfortunately, C# won't deserialize it :( I even tried to create another element which contains the array and reference it in the "EndAuctionResponseItem" but still no luck. I used MS Soap toolkit 3.0 to look inside the SOAP envelope and everything seems OK... PHP sends the right construct I guess... (a complex array which contains 2 arrays: one composed of the 3 strings from "AuctionStatusItem" and another composed of the "typens:AuctionStatusItem" objects). Please, somebody help... I'm running out of ideas... :((