.NET not specifying namespace in web reply, but Java/Axis needs it
From: PaulG (google_alias_at_blinkenlights.org)
Date: 02/28/04
- Next message: Andrew Hobbs: "Re: Removing Elements from a Vector"
- Previous message: Sudsy: "Re: JBOSS vs TOMCAT stand alone production environment"
- Next in thread: PaulG: "Re: .NET not specifying namespace in web reply, but Java/Axis needs it"
- Maybe reply: PaulG: "Re: .NET not specifying namespace in web reply, but Java/Axis needs it"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Feb 2004 16:19:35 -0800
Greetings,
[In a nutshell, the Java client is throwing an exception because it
doesn't expect the returned type it sees, because the namespace isn't
specified when the .NET side responds.]
I'm trying to get web services running, with C#/.NET on the server and
Java/Axis on the client. I managed to get a remote object returned,
but now that I've created a derived class from the original base, I'm
experiencing problems on the Java side.
I've got a base class Task, and an inherited class SpecialTask, which
I've derived from Task, on the .NET side. GetTask is a web method of
TaskManager, which returns Task, although in my code right now, it's a
SpecialTask that I'm actually returning.
An [XmlInclude(typeof(SpecialTask))] at the top of my GetTask method
in the TaskManger causes a description of SpecialTask to be inserted
into the generated wsdl. It looks right to me.
I created my Java stubs with:
wscompile.bat -f:searchschema -keep -gen config.xml (config.xml
contains reference to the wsdl)
However, when I call from Java, the response I get back contains:
...<GetTaskResponse xmlns="blah"><GetTaskResult
xsi:type="SpecialTask">
...
</GetTaskResult></GetTaskResponse>...
The actual exception the Java side throws starts with:
java.rmi.RemoteException: Runtime exception; nested exception is:
unexpected element type: expected=, actual=SpecialTask
and from fiddling with the source in the generated stubs, I see that
the Java side isn't working because it's looking for
{mynamespace}SpecialTask (not "" as it claims), but getting
{}SpecialTask which doesn't match. The Java side doesn't see the type
as belonging to any namespace when it reads the response, and I
haven't found a way yet on either side to make changes to compensate
for the other.
Paul
- Next message: Andrew Hobbs: "Re: Removing Elements from a Vector"
- Previous message: Sudsy: "Re: JBOSS vs TOMCAT stand alone production environment"
- Next in thread: PaulG: "Re: .NET not specifying namespace in web reply, but Java/Axis needs it"
- Maybe reply: PaulG: "Re: .NET not specifying namespace in web reply, but Java/Axis needs it"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|