axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Slattery (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-106) some problems building sample code
Date Thu, 23 Mar 2006 13:40:43 GMT
    [ http://issues.apache.org/jira/browse/AXIS2C-106?page=comments#action_12371563 ] 

Ed Slattery commented on AXIS2C-106:
------------------------------------

Picky I know, but the OM tutorial sample code listing 2:

axis2_om_namespace_t *ns1 = NULL;
axis2_om_namespace_t *ns2 = NULL;

axis2_om_element_t* root_ele = NULL;
axis2_om_node_t*    root_ele_node = NULL;

axis2_om_element_t *ele1      = NULL;
axis2_om_node_t *ele1_node = NULL;

ns1 = axis2_om_namespace_create(env, "bar", "x");
ns2 = axis2_om_namespace_create(env, "bar1", "y");


root_ele = axis2_om_element_create(env, NULL, "root", ns1, &root_ele_node);
ele1_node     = axis2_om_element_create(env, root_node, "foo1", ns2, &ele1_node);


Would compile better if the last line was:

ele1     = axis2_om_element_create(&env, root_ele_node, "foo1", ns2, &ele1_node);


> some problems building sample code
> ----------------------------------
>
>          Key: AXIS2C-106
>          URL: http://issues.apache.org/jira/browse/AXIS2C-106
>      Project: Axis2-C
>         Type: Bug
>     Versions: M0.5
>  Environment: windows
>     Reporter: Ed Slattery

>
> Ive been using the samples as a base for testing use of OM.  Ive had a number of problems
which I guess others will meet.
> 1) The sample code cannot be built against the shipped binaries. I would have expected
that it did. 
> The main reason is that the shipped header files drag in headers which are not shipped.
To date I have needed
> axis_string.h, axis_hash.h ,axis_log_default.h and axis_error_default.h
> 2) AXIS_DECLARE_DATA  comes out as AXIS_IMPORT since I dont have any particular requirement
to link statically.
> This gives many warnings like:
> __declspec(dllimport ) ' : ignored on left of 'struct axis2_thread_pool_ops' when no
variable is declared.
> Setting AXIS_DECLARE_DATA to be empty at line 141 of axis2_defines.h fixes this, but
I dont know if thats the right thing to do.
> 3) I used a few lines from the OM  tutorial (which is great), however, the code introduces
an "env" parameter without explaining where to get it, so at first I had a lot of problems
because its really an env**, not an env*. A few lines inserted in the tutorial from the echo
sample would fix that.
> My sample (which now runs):
> extern "C" {
>     int main (int argc, char** argv)
>     {
>         /* general axis setup stuff */
>         axis2_status_t status = AXIS2_FAILURE;
>         axis2_env_t *env = NULL;
>         axis2_error_t *error = NULL;
>         axis2_log_t *log = NULL;
>         axis2_allocator_t *allocator = NULL;
>     
>         allocator = axis2_allocator_init (NULL);
>         error = axis2_error_create(allocator);
>         log = axis2_log_create(allocator, NULL, "main.log");
>         env = axis2_env_create_with_error_log(allocator, error, log);
>         env->log->level = AXIS2_LOG_LEVEL_TRACE;
>         axis2_error_init();
>         axis2_om_node_t *my_node = NULL;
>         axis2_om_element_t *my_ele = NULL;
>         my_ele = axis2_om_element_create(&env, NULL, "MY_ELEMENT", NULL, &my_node);
>         printf("OM test done\n");
>         return 0;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message