axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Rathnayake <writetoam...@yahoo.com>
Subject RE: Axis C++ Calculator example
Date Tue, 22 Jun 2004 04:51:13 GMT
Hi,

I guess you have used Axis C++ 1.1.1 bug fix release.
If it is not so,
let me know the AXIS C++ version that you are using.
In that release I
also found that problem in Calculator sample. This
problem will be there
in all the WSDL's in which the "ParameterOrder" have
used. In the
calculator wsdl also this "ParameterOrder" have been
used. Further in
this release it is generating add, sub, etc methods in
both Client stubs
and Server skeletons as they are getting 3 parameters
in. But the third
parameter is not a reference. So this can't be work.
But this is
happening only in this release. Even in the 1.2 Alpha
release it is
accepting 2 parameters for all these methods.

Therefore, if you use the latest release you will not
have this problem.
So I can suggest you to use the latest release from
Axis C++.

Thanks and Regards,
Amila Rathnayake.


> -----Original Message-----
> From: Oliver Lyttleton [mailto:lyttleto@cs.tcd.ie]
> Sent: Monday, June 21, 2004 10:27 PM
> To: Apache AXIS C User List
> Subject: Re: Axis C++ Calculator example
> 
> Sorry, that still doesn't work! Any other
suggestions from anybody?!?
> 
> 
> 
> On Mon, 2004-06-21 at 15:12, Mansart Jean-sebastien
wrote:
> 
> > Oliver Lyttleton wrote:
> 
> >
> 
> > >On the client side, I'm doing exactly as you're
telling me.
However, I
> 
> > >am unsure as to what should be done on the server
side. Also, I'm a
> 
> > >little confused by the Calculator.cpp file on the
client side....
> 
> > >
> 
> > >if (AXIS_SUCCESS == m_pCall->Invoke())
> 
> > >	{
> 
> > >		if(AXIS_SUCCESS ==
m_pCall->CheckMessage("subResponse",
> 
> > >		"http://localhost/axis/Calculator"))
> 
> > >		{
> 
> > >			/*not successful*/
> 
> > >		}
> 
> > >	}
> 
> > >
> 
> > >Does this mean that if the second if statement
evaluates to true,
the
> 
> > >invocation has failed? How is the value for the
result of an
operation
> 
> > >sent back to the client, should code be inserted
to do this where
the
> 
> > >"not successful" comment is? If so, what methods
from Call.cpp are
used
> 
> > >to do this?
> 
> > >
> 
> > >
> 
> > Yes I know that this part is a little
disturbing...
> 
> > So, for myself I think that the second statement
if evaluate to true
is
> 
> > a success, not a failure...
> 
> >
> 
> > >Also, how is the result from the service
invocation in
> 
> > >$AXISCPP/samples/client/simple/Calculator.cpp
returned to the
> CalcClient
> 
> > >program? In the example taken from the user guide
(see below in
> previous
> 
> > >mail) the values passed to the Calculator method
aren't passed by
> 
> > >reference. So how can intOut have *any* other
value other than the
> value
> 
> > >it was instantiated with?!?
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> > So here, yes you have to add some code...
> 
> > so in the calcultator.cpp you have this line:
> 
> > m_pCall->AddParameter((void*)&Value2, "addReturn",
XSD_INT);
> 
> > try to add a line like this juste after the /*not
successful*/
> 
> > Value2 = m_pCall->GetElementAsString("addReturn",
0);
> 
> > this line is for getting the element where the
response is...
> 
> >
> 
> > I don't have enought time to explain more...
> 
> > try to make it work with this...
> 
> >
> 
> > >
> 
> > >On Mon, 2004-06-21 at 12:03, Mansart
Jean-sebastien wrote:
> 
> > >
> 
> > >
> 
> > >>Oliver Lyttleton wrote:
> 
> > >>
> 
> > >>
> 
> > >>
> 
> > >>>I'm not sure how I get the Axis C++ Calculator
example to work. I
> know
> 
> > >>>that the files generated by WSDL2ws are
skeletons, and must be
> completed
> 
> > >>>by the user, but I don't know what else needs
to be added!
> 
> > >>>
> 
> > >>>
> 
> > >>You have to write a client that use the class in
claculator.cpp
> 
> > >>for example create a file CalcClient.cpp and
then fill it with
this:
> 
> > >>
> 
> > >>#include "Calculator.h"
> 
> > >>#include<stdio.h>
> 
> > >>int main()
> 
> > >> {
> 
> > >>  Calculator c;
> 
> > >>  int intOut=0;
> 
> > >>  c.add(20, 40, intOut);
> 
> > >>  printf("result is = %d\n", intOut);
> 
> > >>  return 0;
> 
> > >> }
> 
> > >>
> 
> > >>
> 
> > >>
> 
> > >>
> 
> > >>>For instance, do I need to add anything to
> 
> >
>>>$AXISCPP_HOME/samples/client/simple/calculator.cpp
> 
> > >>>in order to get the example to work?
> 
> > >>>
> 
> > >>>
> 
> > >>see up...
> 
> > >>
> 
> > >>
> 
> > >>
> 
> > >>>Do I need to add anything to
> 
> >
>>>$AXISCPP_HOME/samples/server/simple/calculator.cpp?
> 
> > >>>
> 
> > >>>
> 
> > >>for the server I don't know...
> 
> > >>but read the userguide from the internet... I
found the code for
the
> 
> > >>client... so maybe there is something for ther
server part too...
> 
> > >>
> 
> > >>
> 
> > >>
> 
> > >>>My question is: what files do I need to add
extra code to in
order to
> 
> > >>>get the calculator sample to work? And what
code should I add?
> 
> > >>>
> 
> > >>>Thanks in advance,
> 
> > >>>
> 
> > >>>Oliver
> 
> > >>>
> 
> > >>>
> 
> > >>>
> 
> > >>>
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> >
> 
> 




		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Mime
View raw message