Problem with {User defined type} having array of {User defined type} with RPC-Literal
Hello, We are trying to work with our web service, which is publishedas RPC-Literal. In all the simple cases, it is working very fine. But in some of the cases, we are facing problems; like: a). If an operation has a parameter with a schema like 'A user defined type having a array of User defined type'; we are getting server side exception. Stating that 'invalid element with class named - item'. For example, schema is: Person name (String) addresses (array of Address) hno (int) street (String) With it, we are getting exception that 'Invalid element with class Address - Item'. We have given the mappings for person, address and even also tried with mapping for address array. But it seems that Axis Server is not picking up typeMappings for the array, in RPC literal case. With RPC-Encoded, it is working fine. Besides it, BeanDeserializer class is picking up array's component type for finding out the deserializer for addresses. b). If any of the operation's return type is an array of primitives, then with RPC-encoded service we need not to specify any mapping on client side. But RPC-Literal seems to be demanding for a mapping even for premitives array on client side. Error message is something like 'No mapping found for Array_of_tns_int'. Any reply in this regard will be a great help for us. Thanks, Mohit Gupta. Do you Yahoo!? Meet the all-new My Yahoo! Try it today!
Re: Problem with {User defined type} having array of {User defined type} with RPC-Literal
Note that Axis doesn't really support RPC/Literal. It kinda supports it from a client perspective, but there's no Axis WSDD style attribute value that corresponds to RPC/Literal. I suggest you use Wrapped Document/Literal instead. (Note that .NET does not support RPC/Literal, either.) Anne On Mon, 20 Dec 2004 03:48:27 -0800 (PST), Adaptive Protocols [EMAIL PROTECTED] wrote: Hello, We are trying to work with our web service, which is published as RPC-Literal. In all the simple cases, it is working very fine. But in some of the cases, we are facing problems; like: a). If an operation has a parameter with a schema like 'A user defined type having a array of User defined type'; we are getting server side exception. Stating that 'invalid element with class named - item'. For example, schema is: Person name (String) addresses (array of Address) hno (int) street (String) With it, we are getting exception that 'Invalid element with class Address - Item'. We have given the mappings for person, address and even also tried with mapping for address array. But it seems that Axis Server is not picking up typeMappings for the array, in RPC literal case. With RPC-Encoded, it is working fine. Besides it, BeanDeserializer class is picking up array's component type for finding out the deserializer for addresses. b). If any of the operation's return type is an array of primitives, then with RPC-encoded service we need not to specify any mapping on client side. But RPC-Literal seems to be demanding for a mapping even for premitives array on client side. Error message is something like 'No mapping found for Array_of_tns_int'. Any reply in this regard will be a great help for us. Thanks, Mohit Gupta. Do you Yahoo!? Meet the all-new My Yahoo! Try it today!
Re: Problem with {User defined type} having array of {User defined type} with RPC-Literal
Is wrapped supposed to have meaning only on the server side (where it determines how arguments are passed to the implementation method for the operation), or also on the client side (where it would determine whether the document that makes up the soap body of a doc/lit operation must be supplied, or whether Axis will assemble one from the child components of that document)? Also, if wrapped has meaning on the client side, is its usage completely independent of what is done on the server side, since what is transmitted over the wire is the same? That is, the client could set the style to be wrapped in a deployment descriptor in order to be able to supply primitive data types and have them assembled into the request document, even if the service implementation is processing that document as a whole (and vice versa)? Axis currently supports use of wrapped on the client. I noticed recently using the Axis samples.client.DynamicInvoker with a doc/lit web service looking like (namespace stuff omitted): types schema ... element name=x type=X/ complexType name=X sequence element name=a type=anyURI/ /sequence /complexType element name=xResponse type=XResponse/ complexType name=XResponse sequence element name=b type=string/ /sequence /complexType /schema /types message name=xRequest part name=parameters element=x/ /message message name=xResponse part name=parameters element=xResponse/ /message portType name=xPT operation name=x input message=xRequest/ output message=xResponse/ /operation /portType that I could pass the single WS argument urn:foo to the DynamicInvoker client command line, and it would use this to construct the content for the request's soap body: xaurn:foo/a/x under the assumption that this operation is wrapped (verified by the traces emitted with debug logging enabled for Axis). Jeff - Original Message - From: Anne Thomas Manes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 20, 2004 9:14 AM Subject: Re: Problem with {User defined type} having array of {User defined type} with RPC-Literal Note that Axis doesn't really support RPC/Literal. It kinda supports it from a client perspective, but there's no Axis WSDD style attribute value that corresponds to RPC/Literal. I suggest you use Wrapped Document/Literal instead. (Note that .NET does not support RPC/Literal, either.) Anne