c and webservices?

H

h

Is it possible to consume web services with c? If not, what other
languages would be needed to accomplish this?

H
 
R

Richard Heathfield

h said:
Is it possible to consume web services with c?

Sure, given an appropriate library. All you need to do now is find a
newsgroup supporting your platform, so that you can ask about appropriate
libraries for that platform.
 
C

Chuck F.

h said:
>
Is it possible to consume web services with c? If not, what other
languages would be needed to accomplish this?

Not efficiently. You need spider. Try www.spiderosity.org. Also
read spider.man and whatwebsweweave.com

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
F

Flash Gordon

pawel_lesik said:
yes it is possible for example with gSOAP

Please provide context when posting. See
http://cfaj.freeshell.org/google/ for reasons and instructions on how to
do this.

Also, please don't give off topic advice without at least redirecting
the OP to a more appropriate group. Since I am currently involved in
doing web service stuff I can definitely say that gSOAP is not always
the answer, and C is not always the best language. The OP should
therefore investigate what the options are for his/her platform and
discus them somewhere they are topical, which is not here.
 
H

h

Thank you everyone,


Richard, thanks, are there any suggestions you could give me that might
lead me to libraries for the windows platform?

Chuck, I checked out whatwebsweweave.com, thanks for the resource,
however, spiderosity.org doesn't exist, and I'm not sure where I should
look for spider.man.

pawel, thanks, I appreciate your help, I will look into gSOAP, I also
found http://www.sqldata.com/, ever hear of that one?

Thanks for taking the time guys,

H
 
H

h

Flash Gordon, I apologize for my mistakes, however, my question seems
very well within the knowledge base of this group, and so I'm gaining
alot of insight into my problem. My question pertains to the C
language, so to be quite honest I really don't know where else to go.
What would your suggestion be?

H
 
M

Michael Wojcik

Is it possible to consume web services with c?

Yes, if by "consume" you mean either "invoke" or "provide". Both are
possible in C. They may even be possible entirely in portable C,
given a sufficiently flexible definition of "web services" or a
sufficiently generous implementation.

For most applications, however, you would have to use facilities
outside the C standard (which is what we discuss here), such as an
API for network communications.

I suggest that rather than reinventing the wheel, you look for a C
web services client or server implementation that suits your needs,
or at least for libraries that provide facilities such as HTTP and
XML parsing. Further discussion along those lines would be off-topic
for comp.lang.c and probably better directed to a newsgroup for your
target platform.
 
C

Christopher Benson-Manica

h said:
Flash Gordon, I apologize for my mistakes, however, my question seems
very well within the knowledge base of this group, and so I'm gaining
alot of insight into my problem. My question pertains to the C
language, so to be quite honest I really don't know where else to go.

1. Please quote properly:

It is proper Usenet etiquette to include the relevant portions of the text
you are replying to. To do this using Google groups, please follow the
instructions below, penned by Keith Thompson:

If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.

2. Please read

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html
 
F

Flash Gordon

h said:
Flash Gordon, I apologize for my mistakes, however, my question seems
very well within the knowledge base of this group, and so I'm gaining
alot of insight into my problem. My question pertains to the C
language, so to be quite honest I really don't know where else to go.

No, your question mainly pertains to the availability of libraries for
your specific platform. The C language has absolutely no abilities for
the most fundamental things required for a web service, such as
communications over a network.

Perhaps I should start asking here how to work out where the horizon is
in am image given the altitude and attitude of the aircraft a camera is
mounted together with the HFOV VFOV and LDA of the camera? After all,
that is a C question because the code is required in C (code I actually
had to design and write, so it's not an invented example).

Perhaps I should ask people here about how to port ffdev and fred from
Linux to Windows? After all, they are written in C using libraries
written in C so surely that is a C question? (It is also a real question
and one I am part way through addressing)

Do you see the point yet? If not I'm sure I could come up with hundreds
more questions about libraries that are designed to be called from C
which 90% or more of the people here would have no knowledge of and
which, in reality, are nothing to do with C but instead to do with
implementation specifics or specific libraries which are not part of C.
Then I could flood the group with so many such questions that you would
not be able to find the actual C questions for all the non-C questions.

On the other hand, we could stick to talking about C which is what this
group is for, then if I have a problem with some badly written C code
that I will have to port to a true 64 bit system one day, and I want to
ask how to achieve in portable C things for which the code currently
uses dirty tricks, there will still be a few of the C experts around
that can help me come up with answers to my C questions.
What would your suggestion be?

Since in another post you have asked about Windows you could try a
Windows group of which there are many including
microsoft.public.msdn.soaptoolkit. There they might tell you about
things written to take advantage of the MS specific libraries (I know MS
have an interest in SOAP). For more general discussions about
programming there is also comp.programming
 
P

pemo

h said:
Is it possible to consume web services with c? If not, what other
languages would be needed to accomplish this?

Anything can be done in C [more or less - and even then it's 'moot'], the
library/language you're using is possibly written in C, as is your OS.
However, if you're looking for a webservices C based API, well, Google's
your best mate [?].
 
C

Chuck F.

h said:
>
Is it possible to consume web services with c? If not, what
other languages would be needed to accomplish this?

It is quite possible that my earlier reply with foolish references
to spiders was inappropriate, and that your use of 'consume' was
due to a language difficulty, rather than a desire to create DOS
software. If this is the case I apologize.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
R

Richard Heathfield

h said:
Thank you everyone,


Richard, thanks, are there any suggestions you could give me that might
lead me to libraries for the windows platform?

Sure - why not check out the comp.os.ms-windows.programmer.win32 newsgroup?
I reckon they'll either know, or at least be able to point you in the right
direction. Please note: if you really, really need a library that is
accessible from C, then make this clear to them. (The MS crowd are off on a
COM/CLR nightmare trip right now, and it may take them some time to come
down long enough to put their C hats back on for the duration of your
question.)
 
H

h

Perhaps I should start asking here how to work out where the horizon is
in am image given the altitude and attitude of the aircraft a camera is
mounted together with the HFOV VFOV and LDA of the camera? After all,
that is a C question because the code is required in C (code I actually
had to design and write, so it's not an invented example).

Very interesting example, and it certainly forces me to rethink alot of
assumptions I've had about the C language.
Perhaps I should ask people here about how to port ffdev and fred from
Linux to Windows? After all, they are written in C using libraries
written in C so surely that is a C question? (It is also a real question
and one I am part way through addressing)
Do you see the point yet?
Yes.

If not I'm sure I could come up with hundreds
more questions about libraries that are designed to be called from C
which 90% or more of the people here would have no knowledge of and
which, in reality, are nothing to do with C but instead to do with
implementation specifics or specific libraries which are not part of C.
Then I could flood the group with so many such questions that you would
not be able to find the actual C questions for all the non-C questions.

I don't know what 'libraries that are designed to be called from C'
are, and further I don't know how these libraries implementation
specifics pertain to the misuse of google groups, however, I have no
doubt that you're correct.
On the other hand, we could stick to talking about C which is what this
group is for, then if I have a problem with some badly written C code
that I will have to port to a true 64 bit system one day, and I want to
ask how to achieve in portable C things for which the code currently
uses dirty tricks, there will still be a few of the C experts around
that can help me come up with answers to my C questions.

Yes, it's clear that only C experts should be having discussions in
this group. Anyone new to the language, or with little to no
understanding of the flexibility doesn't even know enough about the
language to even post. I would say, as part of group etiquette, people
that don't know what they're doing should be treated with attention to
tact.
Since in another post you have asked about Windows you could try a
Windows group of which there are many including
microsoft.public.msdn.soaptoolkit. There they might tell you about
things written to take advantage of the MS specific libraries (I know MS
have an interest in SOAP). For more general discussions about
programming there is also comp.programming

The other users of the group have provided me with the information I
need in order to accomplish my task.

Everyone else, thank you for your courtesy,

H
 
R

Richard Heathfield

Flash Gordon said:
No, your question mainly pertains to the availability of libraries for
your specific platform. The C language has absolutely no abilities for
the most fundamental things required for a web service, such as
communications over a network.

h: Flash is basically right.

Flash: A heavily over-the-top response, IMHO, especially given the apology
in the first line of h's reply. There's such a thing as overdoing it.
 
F

Flash Gordon

h wrote:

Yes, it's clear that only C experts should be having discussions in
this group. Anyone new to the language, or with little to no
understanding of the flexibility doesn't even know enough about the
language to even post. I would say, as part of group etiquette, people
that don't know what they're doing should be treated with attention to
tact.

Sorry for being heavy handed. Like anyone, I sometimes have a bad day at
the office and can over-react.

Asking whether something is part of the C language is not unreasonable,
but insisting something is a question about C when the main item you
need is assistance in either selecting or using third party libraries.

I do seriously think that, as you are using Windows, you check out the
toolkits MS provide, hence my pointing you at the
microsoft.public.msdn.soaptoolkit as well.
 
M

Michael Wojcik

The C language has absolutely no abilities for
the most fundamental things required for a web service, such as
communications over a network.

This is arguably true (there's a possible quibble over "fundamental"
and "required"), but not necessarily relevant. While network
communication is "fundamental" to web services, that does not mean
that a provider or consumer of web services need be responsible for
network communications.

Consider, for example, a portable C program running in an environment
where stdin and stdout are the required network communications
channel. Such environments are actually very common: inetd and its
analogues, CGI programs, and so forth. (There are client-side
examples as well.)

It might not be practical, for most applications, to provide or
consume web services entirely in portable C, in an environment where
this is possible; but I'd like to avoid the false generalization that
any task (such as using web services) which is associated with some
facility outside the C standard therefore cannot be done in portable
C. Even here we must entertain various unguaranteed expectations
about the execution environment, QoI, and so forth.

I'm of the opinion that the original question itself was marginally
topical (if considered as "can this be done in standard C?"), but
answers other than redirections to implementation-specific groups
or those that describe what standard C does not provide (eg network
communications, XML parsing, etc) would be off-topic. h's claim
of topicality for the larger question ("how can this be done in C?")
on the grounds that all C programs are topical is spurious, of
course, for the reasons you outline and we're all familiar with, but
it's legitimate (again, IMO) for someone to ask here whether some
task *can* be accomplished in standard C. And in that event I for
one would prefer to see responses that are a bit more cautious in
delimiting what is and is not covered by the standard language.

An ideal response, in my opinion, might be along the lines of "it is
possible, in some environments, to consume web services in a portable
C program, which is what we discuss here; but in practice you are
likely to want to use implementation- and environment-specific
features and facilities, and you should ask about those in a news-
group relevant to your platform".

--
Michael Wojcik (e-mail address removed)

Unlikely prediction o' the day:
Eventually, every programmer will have to write a Java or distributed
object program.
-- Orfali and Harkey, _Client / Server Programming with Java and CORBA_
 
K

Keith Thompson

This is arguably true (there's a possible quibble over "fundamental"
and "required"), but not necessarily relevant. While network
communication is "fundamental" to web services, that does not mean
that a provider or consumer of web services need be responsible for
network communications.

Consider, for example, a portable C program running in an environment
where stdin and stdout are the required network communications
channel. Such environments are actually very common: inetd and its
analogues, CGI programs, and so forth. (There are client-side
examples as well.)
[snip]

The manner in which the network communications channel is associated
with stdin and stdout is implementation-specific and non-portable --
but of course the manner in which *anything* is associated with stdin
and stdout is implementation-specific and non-portable.
 
H

h

Hi Michael,

Thank you for your input, I've learned alot from your response.
I'm of the opinion that the original question itself was marginally
topical (if considered as "can this be done in standard C?"), but
answers other than redirections to implementation-specific groups
or those that describe what standard C does not provide (eg network
communications, XML parsing, etc) would be off-topic. h's claim
of topicality for the larger question ("how can this be done in C?")
on the grounds that all C programs are topical is spurious, of
course, for the reasons you outline and we're all familiar with, but
it's legitimate (again, IMO) for someone to ask here whether some
task *can* be accomplished in standard C.

I want to clarify that I was very careful with my wording. Since that
was misunderstood, I will say in other words: I meant that I didn't
know whether my question would be appropriate for this forum; this,
resulting from my lack of understanding with C, is no claim of
topicality, it's a claim of rather ignorance.
And in that event I for
one would prefer to see responses that are a bit more cautious in
delimiting what is and is not covered by the standard language.

I think this is key for someone in my position, where I don't know
where the bounding lines are drawn.
An ideal response, in my opinion, might be along the lines of "it is
possible, in some environments, to consume web services in a portable
C program, which is what we discuss here; but in practice you are
likely to want to use implementation- and environment-specific
features and facilities, and you should ask about those in a news-
group relevant to your platform".

The web service must be consumed in a portable C program. The
application engine is written in portable C. The webservice pertains
from the necessity of a license control implementation that is to be
made; it will basically identify that the client machine is using a
valid license, nothing elaborate.


Hi Keith,
The manner in which the network communications channel is associated
with stdin and stdout is implementation-specific and non-portable --
but of course the manner in which *anything* is associated with stdin
and stdout is implementation-specific and non-portable.

Now I'm a bit confused, there seems to be alot of controversy over the
portability of these network communication channels. Your statement
renders my idea impossible. I appreciate your response.

Thanks everyone,

H
 
K

Keith Thompson

h said:
Hi Keith,


Now I'm a bit confused, there seems to be alot of controversy over the
portability of these network communication channels. Your statement
renders my idea impossible. I appreciate your response.

To be perhaps a bit clearer:

Standard C has absolutely no support for networking. That doesn't
mean it's impossible to write networking code in C (obviously a great
deal of networking code is written in C); it just means it's
impossible to write networking code in C without using system-specific
extensions.

If you can arrange for the environment in which your program runs to
associate any necessary network communications channels with your
program's stdin and/or stdout, you may be able to write your program
in 100% standard C, perhaps even strictly conforming C. But it's not
clear that it would be worth the effort. You're going to have to do
*some* system-specific work regardless; keeping the system
dependencies entirely out of your C program may or may not make sense.

It should be possible to write networking code that's not 100%
portable C, but that's probably as portable as you need it to be. The
POSIX standard, though it's off-topic here, provides facilities for
networking and a number of other operating system interfaces. If your
code is expected to run only on POSIX-compliant systems, you can use
the POSIX-defined interfaces and your program will still be "portable
enough". The comp.unix.programmer newsgroup is probably the best
place to ask about this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top