473,398 Members | 2,403 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,398 software developers and data experts.

problem apparently with type conversion

Hi all, hope someone can help here, I'm really stuck. Reading and
googling like mad, to no avail so far...
Basically, my problem *seems* to boil down to type conversion:

Here's a sample web service I knocked up:

<WebMethod()> _
Public Function HelloWorld() As myType
Return New myType("Andrew", "too old")
End Function

End Class
Public Class myType
Private _name, _age As String
Property name() As String
Get
Return _name
End Get
Set(ByVal Value As String)
_name = Value
End Set
End Property

Property age() As String
Get
Return _age
End Get
Set(ByVal Value As String)
_age = Value
End Set
End Property
Sub New()
End Sub
Sub New(ByVal n As String, ByVal a As String)
_name = n
_age = a
End Sub
End Class
In my main application, I have a copy of the myType class, it's
identical, but when I do this:

Dim myLocalType As myType
Dim svc As mytest.Service1
myLocalType = svc.HelloWorld <<< error

it throws an error of "value of type 'imsws.mytest.mytype' cannot be
converted to 'imsws.mytype'". They are exactly the same type! The web
reference reference.vb shows:

<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/imsService/Service1")>
_
Public Class myType

'<remarks/>
Public name As String

'<remarks/>
Public age As String
End Class

I'm really stuck here - can you help? Thanks in advance if so :)

Cheers

AW (beginning to sweat a little..)

Nov 23 '05 #1
0 734

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

Similar topics

5
by: Venn Syii | last post by:
I do the following: ->Lock( 0, 0, (BYTE**)&pVertices, DUSAGE_WRITEONLY ) And get the following error: error C2664: 'Lock' : cannot convert parameter 3 from 'unsigned char ** ' to 'void ** '...
17
by: Jon Slaughter | last post by:
I'm having a little trouble understanding what the slicing problem is. In B.S.'s C++ PL3rdEd he says "Becayse the Employee copy functions do not know anything about Managers, only the Employee...
2
by: xmail123 | last post by:
In a web service I am using a SqlDataReader to retrieve the information to populate an ArrayList. public ArrayList ReadHistory(int ItemPK) { SDrdr = SDcmd.ExecuteReader(); ArrayList AL = new...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
5
by: Chad | last post by:
I want to create a class which contains a date, integer and string property which all allow a NULL value. I don't want to store the values in an Object datatype. I prefer more strongly typed...
8
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
39
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1)...
8
by: SpreadTooThin | last post by:
Basically I think the problem is in converting from a 32 bit integer to a 16 bit integer. I have two arrays: import array a = array.array('L', ) b = array.array('H', ) b = a
19
by: jacob navia | last post by:
I posted this to comp.std.c, but may be of interest here too: Consider this: extern void abort(void); int main (void) { unsigned long long xx; unsigned long long *x = (unsigned long long *)...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.