470,601 Members | 1,173 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,601 developers. It's quick & easy.

InvalidOperationException with DateTime datatype in .NET client application accessing a java web service.


I have a .NET client that accesses a Java webservice.
Let me first say that the client stub I got generated from the wsdl was
incomplete and had to make changes to it manually to make it work to an
I generated a java client stub for the java web service and have been
modifying my .NET client stub using the java client stub as a reference
and things seemed to work fine until I got the following error.
In my client application, I try to pass a parameter to a method which
expects DateTime data. The wsdl equivalent of the same is:
<xs:element name="effectivityDate" type="xs:dateTime" minOccurs="0">
and I get the following exception when running my application:
An unhandled exception of type 'System.InvalidOperationException'
occurred in system.xml.dll
Additional information: There was an error reflecting type

I see that I can get past this error if I remove the declaration for
the datetime variable from the .NET client stub; objectQueryType is a
complex datatype which internally down the line somewhere has
declaration for the datetime datatype.

In the java client stub, the equivalent of the DateTime datatype
variable is a java.util.calendar type variable. So I tried modifying
the declaration of the variable to be of System.Globalization.Calendar
in my .NET client stub, but I still get this error.

I am not sure why I get this error. I need to pass this datetime
variable for my code to be working.

Any help would be great.
Many Thanks in advance.


Dec 22 '05 #1
0 1442

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by andrew lowe | last post: by
9 posts views Thread by Phil B | last post: by
2 posts views Thread by GeRmIc | last post: by
1 post views Thread by Scott Holman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.