C# exception after calling Java/Axis web service

Discussion in 'ASP .Net Web Services' started by Amil, Apr 18, 2005.

  1. Amil

    Amil Guest

    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
    Amil, Apr 18, 2005
    #1
    1. Advertising

  2. 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.
    Keenan Newton, Apr 18, 2005
    #2
    1. Advertising

  3. Amil

    Amil Guest

    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" <> wrote in message
    news:...
    > 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.
    >
    Amil, Apr 18, 2005
    #3
  4. Amil

    DC Guest

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


    "Amil" <> wrote in message
    news:%23qr$...
    > 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" <> wrote in message
    > news:...
    >> 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.
    >>

    >
    >
    DC, Apr 19, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MikePA
    Replies:
    1
    Views:
    434
    Sudsy
    Apr 24, 2004
  2. Replies:
    0
    Views:
    901
  3. hocho888
    Replies:
    1
    Views:
    611
  4. Michael Averstegge
    Replies:
    0
    Views:
    4,204
    Michael Averstegge
    Jan 10, 2006
  5. Asaf

    Calling a Java/AXIS web service from C#?

    Asaf, Mar 31, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    573
Loading...

Share This Page