By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,082 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,082 IT Pros & Developers. It's quick & easy.

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

P: n/a

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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.