|
Hi Anne, I actually started from Java classes using Java2WSDL (I know this is not the best practice, but if there's something wrong with the WSDL I could try and fix it by hand). The ArrayOfNamedValue is defined like below, but it does not seem to come into play at all:
<element name="item" type="impl:NamedValue" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType> I exposed this method: NamedValue[] login(String username, String password, NamedValue[] options)Which in the WSDL the request looks like this: And the response like this: This seems OK so far, even though ArrayOfNamedValue is defined but it does not seem to be used. This is exactly what I want to pass back and forth: NamedValue object: name: "dummy-2" value: NamedValue[] But it doesn't look like that's what I get on the server side, it seems that I get: NamedValue object: name: "dummy-2" value: NamedValue <--- Note no array [] hereAnd the value of the red NamedValue is the last value sent, in my example below it's 314 How would Axis know that it needs to convert the request below into a NamedValue[] on the server side? What if the sequence of values would not be homogeneus, would it convert it into an Object[] instead (if it worked at all)? <login xmlns="http://some/namespace"> <username>tim</username> <password>tim</password> <options> <name>dummy1</name> <value xsi:type="xsd:string">dummy_val1</value> </options> <options> <name>dummy2</name> <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace"> <name>dummy2-1</name> <value xsi:type="xsd:string">val2-1</value> </value> <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace"> <name>dummy2-2</name> <value xsi:type="xsd:int">314</value> </value> </options> </login> The part in red above does not seem to map to this: NamedValue object: name: "dummy-2" value: NamedValue[]This confuses me greatly, I'm not sure whether what I'm trying to do is allowed/supported over wrapped doc/literal at all, if it is not I should then switch back to rpc/encoded or it's just a bug in Axis. Btw, .NET doesn't seem to be able to convert the red fragment above into a NamedValue[] so I suspect the message generated by Axis is not correct when it comes to arrays inside arrays. Thanks. Tim Anne Thomas Manes wrote: Tim, How did you define the array of NamedValue in the schema (where did the <options> tag come from)? It looks to me as if the message corresponds to the request. Because you're using <xsd:anytype>, the value element may contain an array of the NameValue. Hence the dummy-2 object is defined thus: NamedValue object: name: "dummy-2" value: NamedValue[] Is this not what you want? Anne On 4/13/05, Tim K. (Gmane) <[EMAIL PROTECTED]> wrote: |
- Re: HELP PLEASE: array inside array and wrapped document... Tim K. (Gmane)
- Re: HELP PLEASE: array inside array and wrapped doc... Anne Thomas Manes
- Re: HELP PLEASE: array inside array and wrapped... Tim K. (Gmane)
- Re: HELP PLEASE: array inside array and wra... Anne Thomas Manes
- Question on Axis functionality on WebSp... Shantanu Sen
- Re: HELP PLEASE: array inside array and wrapped... Tim K. (Gmane)
- Re: HELP PLEASE: array inside array and wra... Anne Thomas Manes
- Re: HELP PLEASE: array inside array and... Tim K. (Gmane)
- Re: HELP PLEASE: array inside arra... Anne Thomas Manes
- Re: HELP PLEASE: array inside ... Tim K. (Gmane)
- Re: HELP PLEASE: array ins... Davanum Srinivas
