You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Susantha Kumara <su...@opensource.lk> on 2004/08/18 13:27:28 UTC

Supporting complexType with simpleContent - FYI

Hi all,
 
I am working on Supporting complexType s with simpleContent and need to
add new functions to Serializer and Deserializer.
 
serializeAsChardata to the serialzer
 
and 
 
getChardataAsString to the deserializer
 
Then the corresponding code generated for 
 
<xsd:complexType name="name">
            <xsd:simpleContent>
                  <xsd:extension base="string">
                        <xsd:attribute ref="xml:lang" use="optional"/>
                  </xsd:extension>
            </xsd:simpleContent>
      </xsd:complexType>
 
will be
 
class name
{
public:
    xsd__string name_value; /*extension base type*/
    xsd__string lang; /*attribute*/
      name();
      ~name();
};
 
/* Serialized stream of the name object 
<name lang="en">some string in english </name>
*/
 
/*
* This static method serialize a name type of object
*/
int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
{
    if ( param == NULL ) {
        /* TODO : may need to check nillable value*/
        pSZ->serializeAsAttribute("xsi:nil", 0,
(void*)&(xsd_boolean_true), XSD_BOOLEAN);
        pSZ->serialize(">", NULL);
        return AXIS_SUCCESS;
    }
    /* first serialize attributes if any*/
    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING); 
    pSZ->serialize(">", 0);
    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
    return AXIS_SUCCESS;
}
 
/*
* This static method deserialize a name type of object
*/
int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
{
      param->lang = pIWSDZ->getAttributeAsString("lang",0);
    param->name_value = pIWSDZ->getChardataAsString();
}
 
I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.
 
Susantha
---
 

RE: Supporting complexType with simpleContent - FYI

Posted by Susantha Kumara <su...@opensource.lk>.
Hi all,
 
I have added the support for complexTypes with simpleContent. Now the
code generates fine for such complexTypes.
But I did not have much time to test any server/client code generated. 
 
I have committed the code because it has no affect on the rest of the
code. 
 
Please have a try with wsdls with complexTypes with simpleContent (Ex:
uddi wsdl ) and let me know if it works fine.
 
Susantha
---
 
-----Original Message-----
From: Susantha Kumara [mailto:susantha@opensource.lk] 
Sent: Wednesday, August 18, 2004 5:27 PM
To: 'Apache AXIS C Developers List'
Subject: Supporting complexType with simpleContent - FYI
 
Hi all,
 
I am working on Supporting complexType s with simpleContent and need to
add new functions to Serializer and Deserializer.
 
serializeAsChardata to the serialzer
 
and 
 
getChardataAsString to the deserializer
 
Then the corresponding code generated for 
 
<xsd:complexType name="name">
           <xsd:simpleContent>
                 <xsd:extension base="string">
                       <xsd:attribute ref="xml:lang" use="optional"/>
                 </xsd:extension>
           </xsd:simpleContent>
     </xsd:complexType>
 
will be
 
class name
{
public:
    xsd__string name_value; /*extension base type*/
    xsd__string lang; /*attribute*/
     name();
     ~name();
};
 
/* Serialized stream of the name object 
<name lang="en">some string in english </name>
*/
 
/*
* This static method serialize a name type of object
*/
int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
{
    if ( param == NULL ) {
        /* TODO : may need to check nillable value*/
        pSZ->serializeAsAttribute("xsi:nil", 0,
(void*)&(xsd_boolean_true), XSD_BOOLEAN);
        pSZ->serialize(">", NULL);
        return AXIS_SUCCESS;
    }
    /* first serialize attributes if any*/
    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING); 
    pSZ->serialize(">", 0);
    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
    return AXIS_SUCCESS;
}
 
/*
* This static method deserialize a name type of object
*/
int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
{
     param->lang = pIWSDZ->getAttributeAsString("lang",0);
    param->name_value = pIWSDZ->getChardataAsString();
}
 
I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.
 
Susantha
---
 

RE: Supporting complexType with simpleContent - FYI

Posted by Susantha Kumara <su...@opensource.lk>.
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> Sent: Thursday, August 19, 2004 7:02 AM
> To: Apache AXIS C Developers List
> Subject: Re: Supporting complexType with simpleContent - FYI
> 
> 
> --- Susantha Kumara <su...@opensource.lk> wrote:
> 
> > Hi all,
> >
> > I am working on Supporting complexType s with simpleContent and need
to
> > add new functions to Serializer and Deserializer.
> >
> > serializeAsChardata to the serialzer
> >
> > and
> >
> > getChardataAsString to the deserializer
> >
> > Then the corresponding code generated for
> >
> > <xsd:complexType name="name">
> >             <xsd:simpleContent>
> >                   <xsd:extension base="string">
> >                         <xsd:attribute ref="xml:lang"
use="optional"/>
> >                   </xsd:extension>
> >             </xsd:simpleContent>
> >       </xsd:complexType>
> >
> > will be
> >
> > class name
> > {
> > public:
> >     xsd__string name_value; /*extension base type*/
> >     xsd__string lang; /*attribute*/
> >       name();
> >       ~name();
> > };
> >
> 
> Do we need lang here? Why Java is not generating lang data member when
> generating code.
> BTW what does lang actually mean? What are the possible values?

You can get the full idea from section 2.12 of
http://www.w3.org/TR/REC-xml/

> 
> Samisa...
> 
> > /* Serialized stream of the name object
> > <name lang="en">some string in english </name>
> > */
> >
> > /*
> > * This static method serialize a name type of object
> > */
> > int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
> > {
> >     if ( param == NULL ) {
> >         /* TODO : may need to check nillable value*/
> >         pSZ->serializeAsAttribute("xsi:nil", 0,
> > (void*)&(xsd_boolean_true), XSD_BOOLEAN);
> >         pSZ->serialize(">", NULL);
> >         return AXIS_SUCCESS;
> >     }
> >     /* first serialize attributes if any*/
> >     pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
> > XSD_STRING);
> >     pSZ->serialize(">", 0);
> >     pSZ->serializeAsChardata((void*)&(param->name_value),
XSD_STRING);
> >     return AXIS_SUCCESS;
> > }
> >
> > /*
> > * This static method deserialize a name type of object
> > */
> > int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer*
pIWSDZ)
> > {
> >       param->lang = pIWSDZ->getAttributeAsString("lang",0);
> >     param->name_value = pIWSDZ->getChardataAsString();
> > }
> >
> > I am doing the improvements to serializer/deserializer code as well
as
> > WSDL2Ws code.
> >
> > Susantha
> > ---
> >
> >
> 
> 
> 
> 
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush


Re: Supporting complexType with simpleContent - FYI

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
--- Samisa Abeysinghe <sa...@yahoo.com> wrote:

> 
> --- Susantha Kumara <su...@opensource.lk> wrote:
> 
> > Hi all,
> >  
> > I am working on Supporting complexType s with simpleContent and need to
> > add new functions to Serializer and Deserializer.
> >  
> > serializeAsChardata to the serialzer
> >  
> > and 
> >  
> > getChardataAsString to the deserializer
> >  
> > Then the corresponding code generated for 
> >  
> > <xsd:complexType name="name">
> >             <xsd:simpleContent>
> >                   <xsd:extension base="string">
> >                         <xsd:attribute ref="xml:lang" use="optional"/>
> >                   </xsd:extension>
> >             </xsd:simpleContent>
> >       </xsd:complexType>
> >  
> > will be
> >  
> > class name
> > {
> > public:
> >     xsd__string name_value; /*extension base type*/
> >     xsd__string lang; /*attribute*/
> >       name();
> >       ~name();
> > };
> >  
> 
> Do we need lang here? Why Java is not generating lang data member when generating code.
> BTW what does lang actually mean? What are the possible values?

OK I think the earlier thread had the answers. I suppose When the attribute is optional the lang
could be NULL.

One more observation is that the generated java code (for Axis Java) treats Name class to be of
simple type:
public class Name  implements java.io.Serializable, org.apache.axis.encoding.SimpleType

I am not sure why exactly this is done. May be axis java simply treats this type similar to
xsd:string.


Samisa...


> 
> Samisa...
> 
> > /* Serialized stream of the name object 
> > <name lang="en">some string in english </name>
> > */
> >  
> > /*
> > * This static method serialize a name type of object
> > */
> > int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
> > {
> >     if ( param == NULL ) {
> >         /* TODO : may need to check nillable value*/
> >         pSZ->serializeAsAttribute("xsi:nil", 0,
> > (void*)&(xsd_boolean_true), XSD_BOOLEAN);
> >         pSZ->serialize(">", NULL);
> >         return AXIS_SUCCESS;
> >     }
> >     /* first serialize attributes if any*/
> >     pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
> > XSD_STRING); 
> >     pSZ->serialize(">", 0);
> >     pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
> >     return AXIS_SUCCESS;
> > }
> >  
> > /*
> > * This static method deserialize a name type of object
> > */
> > int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
> > {
> >       param->lang = pIWSDZ->getAttributeAsString("lang",0);
> >     param->name_value = pIWSDZ->getChardataAsString();
> > }
> >  
> > I am doing the improvements to serializer/deserializer code as well as
> > WSDL2Ws code.
> >  
> > Susantha
> > ---
> >  
> > 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Re: Supporting complexType with simpleContent - FYI

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
--- Susantha Kumara <su...@opensource.lk> wrote:

> Hi all,
>  
> I am working on Supporting complexType s with simpleContent and need to
> add new functions to Serializer and Deserializer.
>  
> serializeAsChardata to the serialzer
>  
> and 
>  
> getChardataAsString to the deserializer
>  
> Then the corresponding code generated for 
>  
> <xsd:complexType name="name">
>             <xsd:simpleContent>
>                   <xsd:extension base="string">
>                         <xsd:attribute ref="xml:lang" use="optional"/>
>                   </xsd:extension>
>             </xsd:simpleContent>
>       </xsd:complexType>
>  
> will be
>  
> class name
> {
> public:
>     xsd__string name_value; /*extension base type*/
>     xsd__string lang; /*attribute*/
>       name();
>       ~name();
> };
>  

Do we need lang here? Why Java is not generating lang data member when generating code.
BTW what does lang actually mean? What are the possible values?

Samisa...

> /* Serialized stream of the name object 
> <name lang="en">some string in english </name>
> */
>  
> /*
> * This static method serialize a name type of object
> */
> int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
> {
>     if ( param == NULL ) {
>         /* TODO : may need to check nillable value*/
>         pSZ->serializeAsAttribute("xsi:nil", 0,
> (void*)&(xsd_boolean_true), XSD_BOOLEAN);
>         pSZ->serialize(">", NULL);
>         return AXIS_SUCCESS;
>     }
>     /* first serialize attributes if any*/
>     pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
> XSD_STRING); 
>     pSZ->serialize(">", 0);
>     pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
>     return AXIS_SUCCESS;
> }
>  
> /*
> * This static method deserialize a name type of object
> */
> int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
> {
>       param->lang = pIWSDZ->getAttributeAsString("lang",0);
>     param->name_value = pIWSDZ->getChardataAsString();
> }
>  
> I am doing the improvements to serializer/deserializer code as well as
> WSDL2Ws code.
>  
> Susantha
> ---
>  
> 



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

RE: Supporting complexType with simpleContent - FYI

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
I fixed the ANON_TOKEN ('>') problems in the code. (I had to fix the problem in about 7 places in
the code) This code is in CVS now.

Now the generated code for UDDI WSDL (and for toher WSDLS) looks fine (I do not get wrong '>'
signs here and there.) The code generated for UDDI WSDL compiles. However I did not run this
generated code against a service. I will try to test the generated code againt a service and
verify the code generation. Also if someone could help test for validity of the generated code
that will be great.

I tried the WSTX WSDL as well. With -nonwrapped option. The generated code compiles except single
compilation problem due to a mixup with an XML namespace prifix. I will try to look into this
problem as well.

Thanks,
Samisa...


--- John Hawkins <HA...@uk.ibm.com> wrote:

> 
> 
> 
> 
> Thanks Samisa,
> 
> We tried looking into the issues to see whether some of our patches had
> caused the problem and by the time we'd done that and verified against the
> released alpha drop we'd run out of runway !
> 
> thankyou,
> John.
> 
> 
> 
> 
> 
> 
>                                                                            
>              Samisa Abeysinghe                                             
>              <samisa_abeysingh                                             
>              e@yahoo.com>                                               To 
>                                        Apache AXIS C User List             
>              21/08/2004 02:24          <ax...@ws.apache.org>         
>                                                                         cc 
>                                                                            
>              Please respond to                                     Subject 
>               "Apache AXIS C           RE: Supporting complexType with     
>                 User List"             simpleContent - FYI                 
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> I tested with the latest CVS code and UDDI WSDL.
> In addition to what John has reported I found few more problems.
> 
> 1. In the generated serializer code we have:
> SZ->serializeCmplxArray((Axis_Array*)(&param->email_Ref),
>                 (void*) Axis_Serialize_email, (void*) Axis_Delete_email,
> (void*)
> Axis_GetSize_email,
>                 "contact>email", Axis_URI_email)
> 
> This is similar to what john has reported by in serializer code. This means
> we are still not
> dealing with ANON_TOKEN (i.e. '>') in Symbol table.
> 
> 2. generated classes do not have xml:lang related attibutes.
> 
> I am looking into fixing the '>' problem.
> 
> Samisa...
> 
> 
> --- John Hawkins <HA...@uk.ibm.com> wrote:
> 
> >
> >
> >
> >
> > fyi: the alpha code drop appears not to creatae a valid stub e.g.
> >
> >       if(AXIS_SUCCESS == m_pCall->checkMessage("getInputResponse",
> > "http://www.sample.com/Enumeration.wsdl"))
> >       {
> >             pReturn = (Type1*)m_pCall->getCmplxObject((void*)
> > Axis_DeSerialize_Type1, (void*) Axis_Create_Type1, (void*)
> > Axis_Delete_Type1,">getInputResponse>type", 0);
> >       }
> > being produced in the client code (note the ">getInputResponse>type", )
> > there are other errors like this in the created stubs.
> >
> > We also found another example that was fixed by a previous patch that has
> > been overwritten/removed since 1.2. Something has regressed - any clues?
> > These errors do not show up in compilation only when running tests
> because
> > the SOAP across the wire is screwed up.
> >
> > Was any testing done on this code before shipping?  Things like this just
> > re-emphasise the need for daily builds with tests running off the build
> :-(
> >
> > John
> >
> >
> >
> >
> >
> 
> >              "Susantha Kumara"
> 
> >              <susantha@opensou
> 
> >              rce.lk>
> To
> >
> 
> >              20/08/2004 14:06
> cc
> >                                        "'Apache AXIS C User List'"
> 
> >                                        <ax...@ws.apache.org>
> 
> >              Please respond to
> Subject
> >               "Apache AXIS C           RE: Supporting complexType with
> 
> >                 User List"             simpleContent - FYI
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> >
> >
> >
> > Hi all,
> >
> >
> >
> >
> >
> > I have added the support for complexTypes with simpleContent. Now the
> code
> > generates fine for such complexTypes.
> >
> >
> > But I did not have much time to test any server/client code generated.
> >
> >
> >
> >
> >
> > I have committed the code because it has no affect on the rest of the
> code.
> >
> >
> >
> >
> >
> > Please have a try with wsdls with complexTypes with simpleContent (Ex:
> uddi
> > wsdl ) and let me know if it works fine.
> >
> >
> >
> >
> >
> > Susantha
> >
> >
> > ---
> >
> >
> > -----Original Message-----
> > From: Susantha Kumara [mailto:susantha@opensource.lk]
> > Sent: Wednesday, August 18, 2004 5:27 PM
> > To: 'Apache AXIS C Developers List'
> > Subject: Supporting complexType with simpleContent - FYI
> >
> >
> >
> >
> >
> > Hi all,
> >
> >
> >
> >
> >
> > I am working on Supporting complexType s with simpleContent and need to
> add
> > new functions to Serializer and Deserializer.
> >
> >
> >
> >
> >
> > serializeAsChardata to the serialzer
> >
> >
> >
> >
> >
> > and
> >
> 
=== message truncated ===



		
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

RE: Supporting complexType with simpleContent - FYI

Posted by John Hawkins <HA...@uk.ibm.com>.



Thanks Samisa,

We tried looking into the issues to see whether some of our patches had
caused the problem and by the time we'd done that and verified against the
released alpha drop we'd run out of runway !

thankyou,
John.






                                                                           
             Samisa Abeysinghe                                             
             <samisa_abeysingh                                             
             e@yahoo.com>                                               To 
                                       Apache AXIS C User List             
             21/08/2004 02:24          <ax...@ws.apache.org>         
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           RE: Supporting complexType with     
                User List"             simpleContent - FYI                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




I tested with the latest CVS code and UDDI WSDL.
In addition to what John has reported I found few more problems.

1. In the generated serializer code we have:
SZ->serializeCmplxArray((Axis_Array*)(&param->email_Ref),
                (void*) Axis_Serialize_email, (void*) Axis_Delete_email,
(void*)
Axis_GetSize_email,
                "contact>email", Axis_URI_email)

This is similar to what john has reported by in serializer code. This means
we are still not
dealing with ANON_TOKEN (i.e. '>') in Symbol table.

2. generated classes do not have xml:lang related attibutes.

I am looking into fixing the '>' problem.

Samisa...


--- John Hawkins <HA...@uk.ibm.com> wrote:

>
>
>
>
> fyi: the alpha code drop appears not to creatae a valid stub e.g.
>
>       if(AXIS_SUCCESS == m_pCall->checkMessage("getInputResponse",
> "http://www.sample.com/Enumeration.wsdl"))
>       {
>             pReturn = (Type1*)m_pCall->getCmplxObject((void*)
> Axis_DeSerialize_Type1, (void*) Axis_Create_Type1, (void*)
> Axis_Delete_Type1,">getInputResponse>type", 0);
>       }
> being produced in the client code (note the ">getInputResponse>type", )
> there are other errors like this in the created stubs.
>
> We also found another example that was fixed by a previous patch that has
> been overwritten/removed since 1.2. Something has regressed - any clues?
> These errors do not show up in compilation only when running tests
because
> the SOAP across the wire is screwed up.
>
> Was any testing done on this code before shipping?  Things like this just
> re-emphasise the need for daily builds with tests running off the build
:-(
>
> John
>
>
>
>
>

>              "Susantha Kumara"

>              <susantha@opensou

>              rce.lk>
To
>

>              20/08/2004 14:06
cc
>                                        "'Apache AXIS C User List'"

>                                        <ax...@ws.apache.org>

>              Please respond to
Subject
>               "Apache AXIS C           RE: Supporting complexType with

>                 User List"             simpleContent - FYI

>

>

>

>

>

>

>
>
>
>
> Hi all,
>
>
>
>
>
> I have added the support for complexTypes with simpleContent. Now the
code
> generates fine for such complexTypes.
>
>
> But I did not have much time to test any server/client code generated.
>
>
>
>
>
> I have committed the code because it has no affect on the rest of the
code.
>
>
>
>
>
> Please have a try with wsdls with complexTypes with simpleContent (Ex:
uddi
> wsdl ) and let me know if it works fine.
>
>
>
>
>
> Susantha
>
>
> ---
>
>
> -----Original Message-----
> From: Susantha Kumara [mailto:susantha@opensource.lk]
> Sent: Wednesday, August 18, 2004 5:27 PM
> To: 'Apache AXIS C Developers List'
> Subject: Supporting complexType with simpleContent - FYI
>
>
>
>
>
> Hi all,
>
>
>
>
>
> I am working on Supporting complexType s with simpleContent and need to
add
> new functions to Serializer and Deserializer.
>
>
>
>
>
> serializeAsChardata to the serialzer
>
>
>
>
>
> and
>
>
>
>
>
> getChardataAsString to the deserializer
>
>
>
>
>
> Then the corresponding code generated for
>
>
>
>
>
> <xsd:complexType name="name">
>
>
>            <xsd:simpleContent>
>
>
>                  <xsd:extension base="string">
>
>
>                        <xsd:attribute ref="xml:lang" use="optional"/>
>
>
>                  </xsd:extension>
>
>
>            </xsd:simpleContent>
>
>
>      </xsd:complexType>
>
>
>
>
>
> will be
>
>
>
>
>
> class name
>
>
> {
>
>
> public:
>
>
>     xsd__string name_value; /*extension base type*/
>
>
>     xsd__string lang; /*attribute*/
>
>
>      name();
>
>
>      ~name();
>
>
> };
>
>
>
>
>
> /* Serialized stream of the name object
>
>
> <name lang="en">some string in english </name>
>
>
> */
>
>
>
>
>
>
=== message truncated ===




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail



RE: Supporting complexType with simpleContent - FYI

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
I tested with the latest CVS code and UDDI WSDL.
In addition to what John has reported I found few more problems.

1. In the generated serializer code we have:
SZ->serializeCmplxArray((Axis_Array*)(&param->email_Ref),
                (void*) Axis_Serialize_email, (void*) Axis_Delete_email, (void*)
Axis_GetSize_email,
                "contact>email", Axis_URI_email)

This is similar to what john has reported by in serializer code. This means we are still not
dealing with ANON_TOKEN (i.e. '>') in Symbol table.

2. generated classes do not have xml:lang related attibutes.

I am looking into fixing the '>' problem.

Samisa...


--- John Hawkins <HA...@uk.ibm.com> wrote:

> 
> 
> 
> 
> fyi: the alpha code drop appears not to creatae a valid stub e.g.
> 
>       if(AXIS_SUCCESS == m_pCall->checkMessage("getInputResponse",
> "http://www.sample.com/Enumeration.wsdl"))
>       {
>             pReturn = (Type1*)m_pCall->getCmplxObject((void*)
> Axis_DeSerialize_Type1, (void*) Axis_Create_Type1, (void*)
> Axis_Delete_Type1,">getInputResponse>type", 0);
>       }
> being produced in the client code (note the ">getInputResponse>type", )
> there are other errors like this in the created stubs.
> 
> We also found another example that was fixed by a previous patch that has
> been overwritten/removed since 1.2. Something has regressed - any clues?
> These errors do not show up in compilation only when running tests because
> the SOAP across the wire is screwed up.
> 
> Was any testing done on this code before shipping?  Things like this just
> re-emphasise the need for daily builds with tests running off the build :-(
> 
> John
> 
> 
> 
> 
>                                                                            
>              "Susantha Kumara"                                             
>              <susantha@opensou                                             
>              rce.lk>                                                    To 
>                                                                            
>              20/08/2004 14:06                                           cc 
>                                        "'Apache AXIS C User List'"         
>                                        <ax...@ws.apache.org>         
>              Please respond to                                     Subject 
>               "Apache AXIS C           RE: Supporting complexType with     
>                 User List"             simpleContent - FYI                 
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> Hi all,
> 
> 
> 
> 
> 
> I have added the support for complexTypes with simpleContent. Now the code
> generates fine for such complexTypes.
> 
> 
> But I did not have much time to test any server/client code generated.
> 
> 
> 
> 
> 
> I have committed the code because it has no affect on the rest of the code.
> 
> 
> 
> 
> 
> Please have a try with wsdls with complexTypes with simpleContent (Ex: uddi
> wsdl ) and let me know if it works fine.
> 
> 
> 
> 
> 
> Susantha
> 
> 
> ---
> 
> 
> -----Original Message-----
> From: Susantha Kumara [mailto:susantha@opensource.lk]
> Sent: Wednesday, August 18, 2004 5:27 PM
> To: 'Apache AXIS C Developers List'
> Subject: Supporting complexType with simpleContent - FYI
> 
> 
> 
> 
> 
> Hi all,
> 
> 
> 
> 
> 
> I am working on Supporting complexType s with simpleContent and need to add
> new functions to Serializer and Deserializer.
> 
> 
> 
> 
> 
> serializeAsChardata to the serialzer
> 
> 
> 
> 
> 
> and
> 
> 
> 
> 
> 
> getChardataAsString to the deserializer
> 
> 
> 
> 
> 
> Then the corresponding code generated for
> 
> 
> 
> 
> 
> <xsd:complexType name="name">
> 
> 
>            <xsd:simpleContent>
> 
> 
>                  <xsd:extension base="string">
> 
> 
>                        <xsd:attribute ref="xml:lang" use="optional"/>
> 
> 
>                  </xsd:extension>
> 
> 
>            </xsd:simpleContent>
> 
> 
>      </xsd:complexType>
> 
> 
> 
> 
> 
> will be
> 
> 
> 
> 
> 
> class name
> 
> 
> {
> 
> 
> public:
> 
> 
>     xsd__string name_value; /*extension base type*/
> 
> 
>     xsd__string lang; /*attribute*/
> 
> 
>      name();
> 
> 
>      ~name();
> 
> 
> };
> 
> 
> 
> 
> 
> /* Serialized stream of the name object
> 
> 
> <name lang="en">some string in english </name>
> 
> 
> */
> 
> 
> 
> 
> 
> 
=== message truncated ===



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

RE: Supporting complexType with simpleContent - FYI

Posted by John Hawkins <HA...@uk.ibm.com>.



fyi: the alpha code drop appears not to creatae a valid stub e.g.

      if(AXIS_SUCCESS == m_pCall->checkMessage("getInputResponse",
"http://www.sample.com/Enumeration.wsdl"))
      {
            pReturn = (Type1*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_Type1, (void*) Axis_Create_Type1, (void*)
Axis_Delete_Type1,">getInputResponse>type", 0);
      }
being produced in the client code (note the ">getInputResponse>type", )
there are other errors like this in the created stubs.

We also found another example that was fixed by a previous patch that has
been overwritten/removed since 1.2. Something has regressed - any clues?
These errors do not show up in compilation only when running tests because
the SOAP across the wire is screwed up.

Was any testing done on this code before shipping?  Things like this just
re-emphasise the need for daily builds with tests running off the build :-(

John




                                                                           
             "Susantha Kumara"                                             
             <susantha@opensou                                             
             rce.lk>                                                    To 
                                                                           
             20/08/2004 14:06                                           cc 
                                       "'Apache AXIS C User List'"         
                                       <ax...@ws.apache.org>         
             Please respond to                                     Subject 
              "Apache AXIS C           RE: Supporting complexType with     
                User List"             simpleContent - FYI                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi all,





I have added the support for complexTypes with simpleContent. Now the code
generates fine for such complexTypes.


But I did not have much time to test any server/client code generated.





I have committed the code because it has no affect on the rest of the code.





Please have a try with wsdls with complexTypes with simpleContent (Ex: uddi
wsdl ) and let me know if it works fine.





Susantha


---


-----Original Message-----
From: Susantha Kumara [mailto:susantha@opensource.lk]
Sent: Wednesday, August 18, 2004 5:27 PM
To: 'Apache AXIS C Developers List'
Subject: Supporting complexType with simpleContent - FYI





Hi all,





I am working on Supporting complexType s with simpleContent and need to add
new functions to Serializer and Deserializer.





serializeAsChardata to the serialzer





and





getChardataAsString to the deserializer





Then the corresponding code generated for





<xsd:complexType name="name">


           <xsd:simpleContent>


                 <xsd:extension base="string">


                       <xsd:attribute ref="xml:lang" use="optional"/>


                 </xsd:extension>


           </xsd:simpleContent>


     </xsd:complexType>





will be





class name


{


public:


    xsd__string name_value; /*extension base type*/


    xsd__string lang; /*attribute*/


     name();


     ~name();


};





/* Serialized stream of the name object


<name lang="en">some string in english </name>


*/





/*


* This static method serialize a name type of object


*/


int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)


{


    if ( param == NULL ) {


        /* TODO : may need to check nillable value*/


        pSZ->serializeAsAttribute("xsi:nil", 0, (void*)&(xsd_boolean_true),
XSD_BOOLEAN);


        pSZ->serialize(">", NULL);


        return AXIS_SUCCESS;


    }


    /* first serialize attributes if any*/


    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING);


    pSZ->serialize(">", 0);


    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);


    return AXIS_SUCCESS;


}





/*


* This static method deserialize a name type of object


*/


int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)


{


     param->lang = pIWSDZ->getAttributeAsString("lang",0);


    param->name_value = pIWSDZ->getChardataAsString();


}





I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.





Susantha


---







RE: Supporting complexType with simpleContent - FYI

Posted by Titus Jakob <ti...@fh-aargau.ch>.
Hi Susantha
I tested quit a bit with complex data types: I could successfully send
"point-Objects" ( having to int's as member) from a C++-client to a
java-server but I never succeeded the other wise round. In the best
version I could see the values of the int-members in the tcpmon but when
deserializing they became '0' (zero).
If you have any hints, please let me know.
Titus
-----Original Message-----
From: axis-c-user-return-835-titus.jakob=fh-aargau.ch@ws.apache.org
[mailto:axis-c-user-return-835-titus.jakob=fh-aargau.ch@ws.apache.org]
On Behalf Of Susantha Kumara
Sent: Freitag, 20. August 2004 15:07
Cc: 'Apache AXIS C User List'
Subject: RE: Supporting complexType with simpleContent - FYI


Hi all,
 
I have added the support for complexTypes with simpleContent. Now the
code generates fine for such complexTypes.
But I did not have much time to test any server/client code generated. 
 
I have committed the code because it has no affect on the rest of the
code. 
 
Please have a try with wsdls with complexTypes with simpleContent (Ex:
uddi wsdl ) and let me know if it works fine.
 
Susantha
---
-----Original Message-----
From: Susantha Kumara [mailto:susantha@opensource.lk] 
Sent: Wednesday, August 18, 2004 5:27 PM
To: 'Apache AXIS C Developers List'
Subject: Supporting complexType with simpleContent - FYI
 
Hi all,
 
I am working on Supporting complexType s with simpleContent and need to
add new functions to Serializer and Deserializer.
 
serializeAsChardata to the serialzer
 
and 
 
getChardataAsString to the deserializer
 
Then the corresponding code generated for 
 
<xsd:complexType name="name">
           <xsd:simpleContent>
                 <xsd:extension base="string">
                       <xsd:attribute ref="xml:lang" use="optional"/>
                 </xsd:extension>
           </xsd:simpleContent>
     </xsd:complexType>
 
will be
 
class name
{
public:
    xsd__string name_value; /*extension base type*/
    xsd__string lang; /*attribute*/
     name();
     ~name();
};
 
/* Serialized stream of the name object 
<name lang="en">some string in english </name>
*/
 
/*
* This static method serialize a name type of object
*/
int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
{
    if ( param == NULL ) {
        /* TODO : may need to check nillable value*/
        pSZ->serializeAsAttribute("xsi:nil", 0,
(void*)&(xsd_boolean_true), XSD_BOOLEAN);
        pSZ->serialize(">", NULL);
        return AXIS_SUCCESS;
    }
    /* first serialize attributes if any*/
    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING); 
    pSZ->serialize(">", 0);
    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
    return AXIS_SUCCESS;
}
 
/*
* This static method deserialize a name type of object
*/
int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
{
     param->lang = pIWSDZ->getAttributeAsString("lang",0);
    param->name_value = pIWSDZ->getChardataAsString();
}
 
I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.
 
Susantha
---
 

RE: Supporting complexType with simpleContent - FYI

Posted by Susantha Kumara <su...@opensource.lk>.
Hi all,
 
I have added the support for complexTypes with simpleContent. Now the
code generates fine for such complexTypes.
But I did not have much time to test any server/client code generated. 
 
I have committed the code because it has no affect on the rest of the
code. 
 
Please have a try with wsdls with complexTypes with simpleContent (Ex:
uddi wsdl ) and let me know if it works fine.
 
Susantha
---
-----Original Message-----
From: Susantha Kumara [mailto:susantha@opensource.lk] 
Sent: Wednesday, August 18, 2004 5:27 PM
To: 'Apache AXIS C Developers List'
Subject: Supporting complexType with simpleContent - FYI
 
Hi all,
 
I am working on Supporting complexType s with simpleContent and need to
add new functions to Serializer and Deserializer.
 
serializeAsChardata to the serialzer
 
and 
 
getChardataAsString to the deserializer
 
Then the corresponding code generated for 
 
<xsd:complexType name="name">
           <xsd:simpleContent>
                 <xsd:extension base="string">
                       <xsd:attribute ref="xml:lang" use="optional"/>
                 </xsd:extension>
           </xsd:simpleContent>
     </xsd:complexType>
 
will be
 
class name
{
public:
    xsd__string name_value; /*extension base type*/
    xsd__string lang; /*attribute*/
     name();
     ~name();
};
 
/* Serialized stream of the name object 
<name lang="en">some string in english </name>
*/
 
/*
* This static method serialize a name type of object
*/
int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
{
    if ( param == NULL ) {
        /* TODO : may need to check nillable value*/
        pSZ->serializeAsAttribute("xsi:nil", 0,
(void*)&(xsd_boolean_true), XSD_BOOLEAN);
        pSZ->serialize(">", NULL);
        return AXIS_SUCCESS;
    }
    /* first serialize attributes if any*/
    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING); 
    pSZ->serialize(">", 0);
    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
    return AXIS_SUCCESS;
}
 
/*
* This static method deserialize a name type of object
*/
int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
{
     param->lang = pIWSDZ->getAttributeAsString("lang",0);
    param->name_value = pIWSDZ->getChardataAsString();
}
 
I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.
 
Susantha
---