C# exception after calling Java/Axis web service

A

Amil

I am calling a client's Java/Axis web service (I have no control over it's
code). I added the WSDL no problem. When I call their method, I get an
error:

Unhandled Exception: System.InvalidOperationException: There is an error in
XML document (13, 26). ---> System.InvalidCastException: Cannot assign
object of type System.Object[] to an object of type
ClientService.ClientElement[].

I see from the C# generated web service code on my end that this occurs
while generating the object returned via the web service. Any ideas of how
to go about tracking down how to fix this?

Amil
 
K

Keenan Newton

Take a look at the wsdl generated and the actual soap response
returned. It seems that the wsdl is defining a class as
ClientService.ClientElement[], but the response from the web service is
of type Object[]. This is not the first time I have seen these kind of
issues involving java web services being consumed by a .Net client. So
look at those two you might be able to tweak the wsdl, but I must admit
I am nto a java expert so i don't know.
 
A

Amil

OK, unfortunately I fixed the problem...by manually changing the
auto-generated WSDL code on my end from a ClientElement[] to an object[].
I'll try to figure out if .NET was doing something wrong.

Amil
 
D

DC

you'll want to look at the network trace to see what is being sent back and
forth.


Amil said:
OK, unfortunately I fixed the problem...by manually changing the
auto-generated WSDL code on my end from a ClientElement[] to an object[].
I'll try to figure out if .NET was doing something wrong.

Amil

Keenan Newton said:
Take a look at the wsdl generated and the actual soap response
returned. It seems that the wsdl is defining a class as
ClientService.ClientElement[], but the response from the web service is
of type Object[]. This is not the first time I have seen these kind of
issues involving java web services being consumed by a .Net client. So
look at those two you might be able to tweak the wsdl, but I must admit
I am nto a java expert so i don't know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top