Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > C# exception after calling Java/Axis web service

Reply
Thread Tools

C# exception after calling Java/Axis web service

 
 
Amil
Guest
Posts: n/a
 
      04-18-2005
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


 
Reply With Quote
 
 
 
 
Keenan Newton
Guest
Posts: n/a
 
      04-18-2005
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.

 
Reply With Quote
 
 
 
 
Amil
Guest
Posts: n/a
 
      04-18-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.
>



 
Reply With Quote
 
DC
Guest
Posts: n/a
 
      04-19-2005
you'll want to look at the network trace to see what is being sent back and
forth.


"Amil" <(E-Mail Removed)> wrote in message
news:%23qr$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>> 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.
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
Calling Web Service that calls other Web Service with Windows Authentication manuelserpabrandao@gmail.com ASP .Net Security 1 06-14-2006 08:55 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
Calling a web service from a web service JC ASP .Net Web Services 1 08-20-2003 06:51 PM



Advertisments