By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

System.InvalidCastException in .Net client consuming Axis java web service

P: n/a
Hi,
I am developing a .Net client for Axis 1.1 web service written in java.
The wsdl is generated using, java2WSDL with these switches:: -y WRAPPED -u LITERAL

The login service which returns a session Id, is null, after deserializing, but when the XML passing over wire is seen, I can see the session Id being returned.
But if in the client proxy code, if I changed the "Use" property from Literal to Encoded, .Net client is able to deserialize the response, and I get the session Id.

One more thing, is when I call another webservice called, findUsers which returns array of user names in the response....
..Net is unable to deserialize this response, and throws exception::

System.InvalidCastException: Cannot assign object of type System.Xml.XmlNode[] to an object of type AxisClient.WebReference1.userInfo[]
where userInfo is a complexType....

Let me know, if anyone's got any hints on what could be wrong.
Thanks,
Parag.

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello Parag,
From another post.. hope this [0] helps

[0] - http://marc.theaimsgroup.com/?l=axis...4879902571&w=2

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Hi,
I am developing a .Net client for Axis 1.1 web service written in
java.
The wsdl is generated using, java2WSDL with these switches:: -y
WRAPPED
-u LITERAL
The login service which returns a session Id, is null, after
deserializing, but when the XML passing over wire is seen, I can see
the
session Id being returned.
But if in the client proxy code, if I changed the "Use" property from
Literal to Encoded, .Net client is able to deserialize the response,
and
I get the session Id.
One more thing, is when I call another webservice called, findUsers
which returns array of user names in the response....
..Net is unable to deserialize this response, and throws exception::
System.InvalidCastException: Cannot assign object of type
System.Xml.XmlNode[] to an object of type
AxisClient.WebReference1.userInfo[] where userInfo is a
complexType....

Let me know, if anyone's got any hints on what could be wrong.
Thanks,
Parag.

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.