473,378 Members | 1,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Interopt issue: Long an object in Java but not in .NET?


In an interopt application between .NET and Java, I am consuming a Java
WebService with arguments supplied, some of the arguments being Long
types. These arguments are fields which is to be used by the service
backend to query a database. Sometimes a field is not to be included in
the search, so in Java I test whether the field is null or not.
However, while building a .NET client I notice that in .NET unlike Java,
a Long is not an object per se, so it can not hold a null reference.

This trivial interopt issue has me searching for the best way to solve
the problem, I can only come up with the solution of introdocuing a
LongWrapper complex object which in .NET CAN hold a null reference.

Any suggestions greatly appreciated,
Thanks,
Casper
Nov 23 '05 #1
1 1011
One of the many joys of life that your mom never told ya about. Java
data types working with .Net data types. This issue is not with just
the long type it either datetime as the same issue. To resolve it is
trickier. You can force the java applciation to never return null from
a web service. You could intercept the SOAP message in the .Net app
and modify it so it does not return the null. Its a wonder why .Net
does not have web service data types like the sql data types.

Standards are open to interpretation.

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
0
by: Rennie deGraaf | last post by:
I want to create a long-running RMI server, which makes an object available to remote hosts, and does nothing else. However, the server consistently exists with no exception or error after >=60...
30
by: Rhino | last post by:
I am giving some thought to applying for some jobs that want people with Java and C++ experience. I have been writing Java for several years and am fluent enough that I don't have to get help with...
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
4
by: Paul | last post by:
Hi, I've been struggling with this today, I'm developing a DotNet2.0 website in C# that needs to call a long running data query. Obviously this is a good candidate for an Asynchronous call, so...
9
by: Miro | last post by:
VB 2003 and Im still new to vb, so i hope i can explain this as best I can. I have a variable defined as such: ( simple example ) Dim AVariableOfSorts(,) As Object = _ { _ {"Last", "String",...
6
by: Ikke | last post by:
Hi everybody, Coming from a Java background, I'm used to having a "long" type and a "Long" Object around... I've recently started a simple, small C# project, and I'm looking for a way to pass...
1
by: HarishAdea | last post by:
Hi, I am trying to run the JAVA pgm, but it is giving error as "selection does not contain a main type". The filename is "ScoreLeadSummary.java" when i try to run it or debug,it gives the pop...
2
by: yeshello54 | last post by:
so here is my problem...in a contact manager i am trying to complete i have ran into an error..we have lots of code because we have some from class which we can use...anyways i keep getting an error...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.