473,387 Members | 1,698 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,387 software developers and data experts.

Char array is being turned into int array -- please help!

Folks,
Hope you can help me here. I am using MS Visual Studio 2008 and
the .NET framework v3.5. I have built WCF Service Application with a
method that returns a char array.
I have imported this web service into a windows application but I see
that it now returns an int array.

I'm very confused! I have checked the return type in the web service
and it is char array, so I'm very confused. Can anyone help me please?
Any suggestions/comments/proposed solutions would be most
appreciated.

Thanking you,
Al.
Aug 19 '08 #1
2 1133
svcutil (via mex) does not guarantee to have a 1:1 mapping between client
and server. If you want the same definition at client and server, you can
simply copy the data-contract and service-contract between them, but the
current behavious suggests that it already isn't going to be fully portable
between different (non-.NET) clients.

For a simpler fix, why not just use a string instead of a char[]?

Marc
Aug 19 '08 #2
On Aug 19, 11:03*am, "Marc Gravell" <marc.grav...@gmail.comwrote:
svcutil (via mex) does not guarantee to have a 1:1 mapping between client
and server. If you want the same definition at client and server, you can
simply copy the data-contract and service-contract between them, but the
current behavious suggests that it already isn't going to be fully portable
between different (non-.NET) clients.

For a simpler fix, why not just use a string instead of a char[]?

Marc
Hi Marc,

Thanks - working like a charm now.

Cheers,
al.
Aug 19 '08 #3

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

Similar topics

38
by: VK | last post by:
Hello, In my object I have getDirectory() method which returns 2-dimentional array (or an imitation of 2-dimentional array using two JavaScript objects with auto-handled length property - please...
13
by: mike79 | last post by:
Hello all, I am a newbie to C, so please bear with me :) I need to create an array in a function (a local variable) with size of 1MB. Since local variables get stored on the stack, at...
5
by: jab3 | last post by:
(again :)) Hello everyone. I'll ask this even at risk of being accused of not researching adequately. My question (before longer reasoning) is: How does declaring (or defining, whatever) a...
3
by: s.subbarayan | last post by:
Dear all, I encountered the following piece of program: #include <stdio.h> void strprint(char *str); void main() { char *spr="hello"; strprint(spr); }
9
by: Brian Tkatch | last post by:
I'm looking for a simple way to unique an array of strings. I came up with this. Does it make sense? Am i missing anything? (Testing seems to show it to work.) Public Function Unique(ByVal...
2
by: Potiuper | last post by:
Question: Is it possible to use a char pointer array ( char *<name> ) to read an array of strings from a file in C? Given: code is written in ANSI C; I know the exact nature of the strings to be...
30
by: Yevgen Muntyan | last post by:
Hey, Why is it legal to do union U {unsigned char u; int a;}; union U u; u.a = 1; u.u; I tried to find it in the standard, but I only found that
20
by: sirsnorklingtayo | last post by:
hi guys please help about Linked List, I'm having trouble freeing the allocated memory of a single linked list node with a dynamic char* fields, it doesn't freed up if I use the FREE()...
2
by: MatejSlansky | last post by:
Hi everybody, I'd like to ask for help with usage of char **. I have a following func, which dynamically allocates pointer a array and pointers of char arrays in it: int sptr(char **ppchr) {...
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: 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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.