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 "Adrian Dick (JIRA)" <ax...@ws.apache.org> on 2005/03/04 16:08:46 UTC

[jira] Created: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
-----------------------------------------------------------------

         Key: AXISCPP-505
         URL: http://issues.apache.org/jira/browse/AXISCPP-505
     Project: Axis-C++
        Type: Bug
  Components: WSDL processing  
    Reporter: Adrian Dick


WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
eg:
<complexType name="list">
  <sequence>
    <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
  </sequence>
</complexType>

There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
Prefix all use user types with "::", eg:
  ::myReturnType* myPortType::myOperation(::myInput* Value0)
  {
    ::myReturnType* pReturn = NULL;
  ...
    if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
    {
      pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=history ]

Mark Whitlock reassigned AXISCPP-505:
-------------------------------------

    Assign To: Mark Whitlock

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick
>     Assignee: Mark Whitlock

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=comments#action_60553 ]
     
Samisa Abeysinghe commented on AXISCPP-505:
-------------------------------------------

Adrian,
    What is the test WSDL for this issue?
Samisa...

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=comments#action_60584 ]
     
Mark Whitlock commented on AXISCPP-505:
---------------------------------------

This JIRA was unassigned and it's high priority for us so I'll fix it. 

There are several cases here: where the offending name is an operation name, a parameter name or a field in a generated class. Also where the offending name clashes with a STL type, or a C++ primitive type, or is a C++ reserved keyword. All these should be valid in the WSDL.


> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick
>     Assignee: Mark Whitlock

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=all ]

Samisa Abeysinghe reassigned AXISCPP-505:
-----------------------------------------

    Assign To:     (was: Samisa Abeysinghe)

I had a look into this some time back. The solution seems to be a bit complicated. I would revisit this issues later. In the mean time, if anyone else have some time please look into this

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - RPC, WSDL processing - Doc
>     Reporter: Adrian Dick

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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


[jira] Assigned: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=history ]

Samisa Abeysinghe reassigned AXISCPP-505:
-----------------------------------------

    Assign To: Samisa Abeysinghe

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick
>     Assignee: Samisa Abeysinghe

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=comments#action_60656 ]
     
Mark Whitlock commented on AXISCPP-505:
---------------------------------------

Axis/Java puts generated classes in a package whose name is constructed from the namespace in the WSDL. This is to ensure that generated classes from different WSDLs do not clash with each other and with application's classes. Apache WSIF does something similar. Axis C++ could put generated classes in a C++ namespace constructed from the WSDL namespace to solve this same problem. That would certainly solve the problem with clashes with STL types.

To solve the problem with clashes with C++ reserved words, Axis would have to mangle the name somehow. Maybe by appending a _name on it.

I assigned this JIRA to myself because I was hoping to fix it. Unfortunately I have been swamped with other higher priority items, so I am unassigning it, in case someone else wants to take it on. If no one assigns it then hopefully I will have time later next week or so.


> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick
>     Assignee: Mark Whitlock

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=history ]

Mark Whitlock reassigned AXISCPP-505:
-------------------------------------

    Assign To:     (was: Mark Whitlock)

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing
>     Reporter: Adrian Dick

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-505) WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-505?page=all ]

John Hawkins updated AXISCPP-505:
---------------------------------

    Component: WSDL processing - Doc

> WSDL2Ws doesn't cope with WSDL complex types matching c/c++ types
> -----------------------------------------------------------------
>
>          Key: AXISCPP-505
>          URL: http://issues.apache.org/jira/browse/AXISCPP-505
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - RPC, WSDL processing - Doc
>     Reporter: Adrian Dick
>     Assignee: Samisa Abeysinghe

>
> WSDL2Ws produces generated stubs that cannot be compiled when WSDL contains types whose names match c/c++ types.
> eg:
> <complexType name="list">
>   <sequence>
>     <element maxOccurs="unbounded" name="item" nillable="true" type="xsd:string"/>
>   </sequence>
> </complexType>
> There are several potential fixes to this, including the rejection of c/c++ type, but I suggest the following would probably be the best fix:
> Prefix all use user types with "::", eg:
>   ::myReturnType* myPortType::myOperation(::myInput* Value0)
>   {
>     ::myReturnType* pReturn = NULL;
>   ...
>     if(AXIS_SUCCESS == m_pCall->checkMessage("myOperationResponse", "urn:amwebars"))
>     {
>       pReturn = (::myReturnType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_myReturnType, (void*) Axis_Create_myReturnType, (void*) Axis_Delete_myReturnType,"myOperationReturn", 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