You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Adaptive Protocols <ad...@yahoo.com> on 2004/12/21 06:12:07 UTC

Re: Problem with {User defined type} having array of any type with Wrapped-Literal

Thanks Anne. I am trying with Wrapped Document/Literal.
 
But here also, I am facing the same problem. I even tried with a user define type having an array of primitives, schema is like
 
Company (Company Java Object - UDT)
    employeeCodes ( int array )
 
I passed this object to server using operation testCompany (Company).
 
The soap message generated is fine as per my knowledge. It is something like:
<soapenv: Body>
    <testCompany xmlns="abc">
        <Company>
            <employeeCodes>
                <items>......
            </employeeCodes>
        </Company>
    </testCompany>
<soapenv: Body>
  
But on server, it is showing problem while finding deserializer for the array type of attribute for company object. Exception Faced is: 
SAXException: SimpleDeserializer encounterd a child element, which is NOT expected, in something it was trying to deserialize.
 
It is again the same problem, i.e. BeanDeserializer is getting simple Deserializer for array type of property. 
 
Help is required urgently. 
 
Thanks,
Mohit

Anne Thomas Manes <at...@gmail.com> wrote:
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
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! 
> 
>

		
---------------------------------
Do you Yahoo!?
 Dress up your holiday email, Hollywood style. Learn more.

Re: Problem with {User defined type} having array of any type with Wrapped-Literal

Posted by Adaptive Protocols <ad...@yahoo.com>.
Hi All,
 
I am waiting for a kind response for this problem. I am just stuck with this one. Any clue would be a great help for me.
 
Thanks,
Mohit
 

Adaptive Protocols <ad...@yahoo.com> wrote:
Thanks Anne. I am trying with Wrapped Document/Literal.
 
But here also, I am facing the same problem. I even tried with a user define type having an array of primitives, schema is like
 
Company (Company Java Object - UDT)
    employeeCodes ( int array )
 
I passed this object to server using operation testCompany (Company).
 
The soap message generated is fine as per my knowledge. It is something like:
<soapenv: Body>
    <testCompany xmlns="abc">
        <Company>
            <employeeCodes>
                <items>......
            </employeeCodes>
        </Company>
    </testCompany>
<soapenv: Body>
  
But on server, it is showing problem while finding deserializer for the array type of attribute for company object. Exception Faced is: 
SAXException: SimpleDeserializer encounterd a child element, which is NOT expected, in something it was trying to deserialize.
 
It is again the same problem, i.e. BeanDeserializer is getting simple Deserializer for array type of property. 
 
Help is required urgently. 
 
Thanks,
Mohit

Anne Thomas Manes <at...@gmail.com> wrote:
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
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! 
> 
>


---------------------------------
Do you Yahoo!?
Dress up your holiday email, Hollywood style. Learn more.
		
---------------------------------
Do you Yahoo!?
 Meet the all-new My Yahoo! � Try it today!