I put the declarations before the actual code and it is compiling fine
now, (the headers were already included). Too much C++ programming has
put me away from the C world ;)

I should have stuck to the original style in the example, instead I
tried to minimize on the lines of code.

This (xsd -> xsd1) is not an issue, I had mistakenly attached slightly
old wsdl. But thanks for spotting it anyways.

Thanks for all your help.

Regards,
Navin

-----Original Message-----
From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: 04 April 2008 17:52
To: Apache AXIS C User List
Subject: Re: WSDL2C

BTW your wsdl has a problem, I got following warning in generating the
code,

2008-04-04 22:18:42,668 WARN  org.apache.axis2.schema.SchemaCompiler -
Type {http://www.w3.org/2001/XMLSchema}SimpleStruct missing!


And  noticed following part should be replaced

  <wsdl:message name="testOpRequest">
    <wsdl:part name="in0" type="xsd:SimpleStruct"/>
  </wsdl:message>

to

  <wsdl:message name="testOpRequest">
    <wsdl:part name="in0" type="xsd1:SimpleStruct"/>
  </wsdl:message>


Note the xsd is renamed to xsd1

Thanks
Dimuthu




On Fri, Apr 4, 2008 at 10:16 PM, Dimuthu Gamage <[EMAIL PROTECTED]>
wrote:
> Hi Kamath,
>
>  Apparently this is not a problem in the generated code.. Did you
>  include the generated axis2_stub_Calc2.h in your source. If so did
you
>  set the headers path to the axis2/c headers directory?
>
>  Can you try declaring all the types in the first part of the
>  function?, There are issues in windows if we mix variable declaration
>  inside function body.
>
>  void main()
>  {
>    /* first declaration */
>    axutil_env_t *env;
>    axs2_stub_t *stub;
>
>    /* then usage*/
>    env = ...;
>    stub = ...;
>  }
>
>  Hope this will useful in catching the problem.
>
>  Thanks
>  Dimuthu
>
>
>
>  On Fri, Apr 4, 2008 at 9:34 PM, Kamath, Navin <[EMAIL PROTECTED]>
wrote:
>  > Thanks Dimuthu. Now I got it to generate some stuff
>  >
>  >  I have further questions about the types generated. I am using the
>  >  incantation
>  >
>  >  "... -uri calc2.wsdl -ss -sd -g -d adb -f"
>  >
>  >  Where calc2.wsdl is the wsdl for an extended calculator service
(see
>  >  attached)
>  >
>  >  I was able to get the code generated. Now I want to write some
simple
>  >  client to invoke on add using ADB but couldn't find examples, so
used
>  >  the header file to work out a simple client which looks like
this...
>  >
>  >  <snip>
>  >     ... // create env etc
>  >
>  >     axis2_stub_t* stub = axis2_stub_create_Calc2(
>  >         env, client_home,
"http://localhost:9090/axis2/services/calc2";
>  >     );
>  >
>  >     adb_add_t* in = adb_add_create(env);
>  >     if (stub == NULL)
>  >     {
>  >         return;
>  >     }
>  >
>  >     // populate adb_add_t (not done yet)
>  >     adb_addResponse_t* out = axis2_stub_op_Calc2_add(stub, env,
in);
>  >     printf("Received: \n");
>  >     printf(adb_addResponse_get_addReturn(out, env));
>  >     ...
>  >  </snip>
>  >
>  >  Getting the following error
>  >
>  >         cl.exe /nologo /D "WIN32" /D "AXIS2_DECLARE_EXPORT" /D
>  >  "_WINDOWS" /D "_M
>  >  BCS" axis2_stub_Calc2.c calc2_client.c /I.\..\..\..\include /c
>  >  axis2_stub_Calc2.c
>  >  calc2_client.c
>  >  calc2_client.c(50) : error C2275: 'axis2_stub_t' : illegal use of
this
>  >  type as a
>  >  n expression
>  >         ..\..\..\include\axis2_stub.h(54) : see declaration of
>  >  'axis2_stub_t'
>  >
>  >  I can see that the internal structures are defined in c files. If
so,
>  >  how can the type definitions be pulled into my client mainline,
should
>  >  these be defined in the header files adb_add.h and
adb_addResponse.h
>  >
>  >  Using VC 7.1 installed as part of visual studio .NET 2003
>  >
>  >  C:\Axis2\axis2c-bin-1.3.0-win32\samples\client\calc2>cl
>  >  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077
for
>  >  80x86
>  >
>  >
>  >  Regards,
>  >  Navin
>  >
>  >  -----Original Message-----
>  >  From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
>  >
>  >
>  > Sent: 03 April 2008 19:06
>  >  To: Apache AXIS C User List
>  >  Subject: Re: WSDL2C
>  >
>  >  Oops, looks like it is not part of the windows build. Should be
>  >  corrected in the next incomming patch release.
>  >
>  >  For the time being, please copy the scripts form
>  >
https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/tools/codegen
>  >  /javatool/
>  >
>  >  Thanks
>  >  Dimuthu
>  >
>  >  On Thu, Apr 3, 2008 at 11:30 PM, Kamath, Navin
<[EMAIL PROTECTED]>
>  >  wrote:
>  >  > Hi,
>  >  >
>  >  >  I downloaded 1.3.0 binary distribution of Axis2/C from
>  >  > http://ws.apache.org/axis2/c/download.cgi  using my local mirror
but
>  >  > after extracting axis2c-bin-1.3.0-win32.zip
>  >  >
>  >  >  I see the following structure
>  >  >
>  >  >  C:\Axis2\axis2c-bin-1.3.0-win32>ls -1  AUTHORS  CREDITS
INSTALL
>  >  > LICENSE  NEWS  NOTICE  README  axis2.xml  bin  docs  ides
include
>  >  > lib  logs  modules  samples
>  >  >
>  >  >  No tools folder in the distribution, should I be trying a
nightly
>  >  > distribution. If I am right, then this tool was part of the
>  >  > distribution  since some time, right?
>  >  >
>  >  >  Thanks for the quick reply
>  >  >
>  >  >  Regards,
>  >  >  Navin
>  >  >
>  >  >
>  >  >
>  >  >  -----Original Message-----
>  >  >  From: Dimuthu Gamage [mailto:[EMAIL PROTECTED]
>  >  >  Sent: 03 April 2008 18:51
>  >  >  To: Apache AXIS C User List
>  >  >  Subject: Re: WSDL2C
>  >  >
>  >  >  Try to use the WSDL2C scripts in the "tools/codegen/javatool"
>  >  >  directory of the axis2/C distribution. Note that you have to
set
>  >  > AXIS2_HOME to the Axis2/Java distribution.
>  >  >
>  >  >  Thanks
>  >  >  Dimuthu
>  >  >
>  >  >  On Thu, Apr 3, 2008 at 11:09 PM, Kamath, Navin
>  >  > <[EMAIL PROTECTED]>
>  >  >  wrote:
>  >  >  > Hi there,
>  >  >  >
>  >  >  >  I want to use WSDL2C tool from Axis2 on windows to generate
some C
>  >
>  >  > code.
>  >  >  >  But no matter which version I download I don't see the tool
in bin
>  >
>  >  > > folder.
>  >  >  >
>  >  >  >  I understand that the tool itself belongs to Axis2/J. The
versions
>  >
>  >  > I
>  >  >
>  >  >  > tried are
>  >  >  >
>  >  >  >  http://ws.apache.org/axis2/download/1_3/download.cgi using a
local
>  >
>  >  > > mirror  >  >  http://people.apache.org/dist/axis2/nightly/
>  >  >  >  distribution-snapshot-bin.zip
>  >  >  >
>  >  >  >  I also see jars under nightly
>  >  >  >  http://people.apache.org/repository/org.apache.axis2/jars/
but
>  >  > seem  > older, hence didn't download it but if it's helps in any
way,
>  >  > I can do
>  >  >
>  >  >  > that as well.
>  >  >  >
>  >  >  >  I just want to use some distribution and generate code
rather than
>  >
>  >  > > building Axis2/C or Axis2/J myself. What am I missing?
>  >  >  >
>  >  >  >  Can anyone help me? If this is a question for the Java user
list
>  >  > > please  let me know so that I can sign up for it rather than
the c
>  >  > > user list  >  >  Regards,  >  Navin  >  >
>  >  > ----------------------------  >  IONA Technologies PLC
(registered in
>  >  > Ireland)  Registered Number:
>  >  >  > 171387  Registered Address: The IONA Building, Shelbourne
Road,
>  >  > Dublin
>  >  >
>  >  >  > 4, Ireland
>  >  >  >
>  >  >  >
>  >  >
---------------------------------------------------------------------
>  >  >  >  To unsubscribe, e-mail:
[EMAIL PROTECTED]
>  >  >  >  For additional commands, e-mail:
[EMAIL PROTECTED]  >
>  >
>  >  > >
>  >  >
>  >  >
---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >  >
>  >  >  ----------------------------
>  >  >  IONA Technologies PLC (registered in Ireland)  Registered
Number:
>  >  > 171387  Registered Address: The IONA Building, Shelbourne Road,
Dublin
>  >
>  >  > 4, Ireland
>  >  >
>  >  >
---------------------------------------------------------------------
>  >  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >  >
>  >  >
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >  ----------------------------
>  >  IONA Technologies PLC (registered in Ireland)
>  >  Registered Number: 171387
>  >  Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to