|
-
Aug 12th, 2003, 11:54 AM
#1
Thread Starter
Lively Member
Value conversion error between solutions
I've got 3 errors in my app level that say something like:
C:\Programming\DBFTPUpload_App\DBFTPUpload_App\ConsoleApplication1\DBFTPUpload.vb(52): Value of type 'ws.si.search.User' cannot be converted to 'ConsoleApplication1.ws.si.JobManager.User'.
The first line of code responsible for two of the errors is:
Dataset = m_wsJobManager.PolicySearch(GetUser(m_User), CreatePolicySearchRequest)
GetUser creates a temporary user, populating tmpUser (a private user object) with username, password, and network credentials. It then returns tmpUser.
The next error occurs in the call to CreateSearchRequest, a function of type SearchRequest that builds a search request. That request is then sent in the above line of code in order to fill a DataSet.
The final error is in the User object as I try to pass it to our web services layer. I get the same exact error for each of the above examples.
What am I doing wrong? I'm having a terrible time trying to figure it out.
Thanks a lot,
Mike
-
Aug 12th, 2003, 12:05 PM
#2
It sounds like the types are in two different assemblies and aren't related (thru inheritance) so it can't convert them.
-
Aug 12th, 2003, 02:16 PM
#3
Thread Starter
Lively Member
So how would I resolve something like that?
I'm trying to do essentially the same thing as other solution-to-solution projects, and I even have the same references and everything..
Thanks,
Mike
-
Aug 12th, 2003, 02:26 PM
#4
How are 'ws.si.search.User' and 'ConsoleApplication1.ws.si.JobManager.User' related?
You can either use the same type on both, Making them Comparable through an IComparable implementation (I think you can do that not sure though), or if one extended the other then have it inherit the parent and it will be convertable then.
-
Aug 12th, 2003, 03:09 PM
#5
Thread Starter
Lively Member
How are 'ws.si.search.User' and 'ConsoleApplication1.ws.si.JobManager.User' related?
ws.si.search.User is a reference to the User object in the ws.si.search web service. ConsoleApplication1 is my app, and I'm trying to create the user object from that end, and passing it along through the web service to the Interop layer.
I just realized that one of my problems was that I was basically creating redundant objects, which could be part of the problem. They're both essentially the same User objects, but originating in different classes, I guess. So I eliminated one of the errors by changing the function CreatePolicySearchRequest to be of type ws.si.JobManager.PolicySearchRequest instead of ws.si.search...
I basically was able to eliminate the rest of the errors in the same fashion...time will tell if that was a "legal" move or not!
Thanks a lot,
Mike
-
Aug 12th, 2003, 03:22 PM
#6
Sorry I wasn't very clear but that is what I meant by 'You can ... use the same type on both'. Seems like a perfectly legal move to me.
-
Aug 12th, 2003, 03:23 PM
#7
Thread Starter
Lively Member
Legal in that it's not giving me errors, yes, but in terms of our project architecture, we shall see.
Thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|