axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: How to set a value of type anyType in generated stub
Date Wed, 19 Dec 2007 18:07:07 GMT
BTW you will face the same problem as the one in
https://issues.apache.org/jira/browse/AXIS2C-843. I will look in to
that ASAP.

On Dec 19, 2007 11:17 PM, Dimuthu Gamage <dimuthuc@gmail.com> wrote:
> Hi Antonio,
>
> If I m correct you are asking how to create string or int node so you
> can assign it the variable with anytype.
>
> You can use 'axiom_text_create' to create text element and corresponding node.
>
> axiom_text_t* text_element;
> axiom_node_t *text_node;
>
> text_element = axiom_text_create(env,
>  NULL /* no parent at start */,
>  "SomeString" /* your string */,
>  &text_node);
>
> here you can set the text_node to the setter method of the above struct.
>
> you may set int, float values after converting them to string (May be
> using sprintf)
>
> Check http://ws.apache.org/axis2/c/docs/om_tutorial.html Code Listing
> 6 for an example.
>
> Thanks
> Dimuthu
>
>
>
>
> On Dec 19, 2007 10:56 PM, Antonio Chiurla <antoniochiurla@katamail.com> wrote:
> > Hi,
> > I have to set a value defined as anyType in wsdl and relative xsd:
> >
> > <xs:sequence>
> > <xs:element minOccurs="0" name="metadataName" type="xs:string"/>
> > <xs:element minOccurs="0" name="value" type="xs:anyType"/>
> > </xs:sequence>
> >
> > I have generated the stub for this wsdl and the struct defined
> > to pass to the op contains a field of type axiom_node_t*
> >
> >         struct adb_metadataValue
> >         {
> >             axis2_char_t* property_metadataName;
> >
> >
> >                 axis2_bool_t is_valid_metadataName;
> >
> >             axiom_node_t* property_value;
> >
> >
> >                 axis2_bool_t is_valid_value;
> >
> >
> >         };
> >
> >
> > I need to insert a string or int or other types depending of
> > some conditions verified at runtime.
> >
> >
> > Thanks
> >
> > Antonio Chiurla
> >
> >
> > -------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message