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 "Mark B. Elrod" <el...@vindicia.com> on 2004/01/02 22:45:24 UTC
Problems with WSDL2Ws and filenames
I am trying to create stubs out of a set of WSDLs which, while not
overly complex, are not trivial. When I run WSDL2Ws on them stubs are
created however the filenames it uses are an issue. Mainly, the cpp and
h files are created as just the classname, however when they are
included in other files as types the fully qualified type name is used
for the include. For example we have a Status type which results in the
following header (comments and #define stuff removed):
#include <axis/common/AxisUserAPI.h>
//Local name and the URI for the type
static const char* Axis_URI_Status =
"http://soap.vindicia.com/ChargebackReport";
static const char* Axis_TypeName_Status =
"Vindicia.Soap.ChargebackReport.Status";
class Status
{
public:
string value;
};
The files Status.h and Status.cpp are created. We also have an Item type
which references the Status. It is results in the following header:
#include <axis/common/AxisUserAPI.h>
#include "Vindicia.Soap.ChargebackReport.Status.h"
//Local name and the URI for the type
static const char* Axis_URI_Item =
"http://soap.vindicia.com/ChargebackReport";
static const char* Axis_TypeName_Item =
"Vindicia.Soap.ChargebackReport.Item";
class Item
{
public:
string merchant_transaction_id;
Axis_DateTime merchant_transaction_timestamp;
Axis_DateTime chargeback_timestamp;
float amount;
Vindicia.Soap.ChargebackReport.Status* status;
string merchant_user_id;
};
As you can see here the include references the fully qualified type
name. Additionally, the class member does as well. Seems that the
generator needs to use the fully qualified name everywhere.
elrod
--
Mark Elrod
Vindicia, Inc.
2755 Campus Drive, Suite 240
San Mateo, California 94403
Email: elrod@vindicia.com
Cell: 650-483-5763
Work: 650-522-4484
Main: 650-522-4480
Fax: 650-345-1165
Web: http://www.vindicia.com
Re: Problems with WSDL2Ws and filenames
Posted by "Mark B. Elrod" <el...@vindicia.com>.
Actually I was not even thinking when I wrote this -
Vindicia.Soap.ChargebackReport.Status is not a valid classname so the
the qualified name needs to be converted to a valid name if we are going
to use them everywhere or the generator should shorten it everywhere. I
don't know which is better. Obviously, shortening it leaves room for
name collisions if you are using mulitple WSDLs.
elrod
Mark B. Elrod wrote:
> I am trying to create stubs out of a set of WSDLs which, while not
> overly complex, are not trivial. When I run WSDL2Ws on them stubs are
> created however the filenames it uses are an issue. Mainly, the cpp
> and h files are created as just the classname, however when they are
> included in other files as types the fully qualified type name is used
> for the include. For example we have a Status type which results in
> the following header (comments and #define stuff removed):
>
> #include <axis/common/AxisUserAPI.h>
>
> //Local name and the URI for the type
> static const char* Axis_URI_Status =
> "http://soap.vindicia.com/ChargebackReport";
> static const char* Axis_TypeName_Status =
> "Vindicia.Soap.ChargebackReport.Status";
>
> class Status
> {
> public:
> string value;
> };
>
> The files Status.h and Status.cpp are created. We also have an Item
> type which references the Status. It is results in the following header:
>
> #include <axis/common/AxisUserAPI.h>
>
> #include "Vindicia.Soap.ChargebackReport.Status.h"
> //Local name and the URI for the type
> static const char* Axis_URI_Item =
> "http://soap.vindicia.com/ChargebackReport";
> static const char* Axis_TypeName_Item =
> "Vindicia.Soap.ChargebackReport.Item";
>
> class Item
> {
> public:
> string merchant_transaction_id;
> Axis_DateTime merchant_transaction_timestamp;
> Axis_DateTime chargeback_timestamp;
> float amount;
> Vindicia.Soap.ChargebackReport.Status* status;
> string merchant_user_id;
> };
>
> As you can see here the include references the fully qualified type
> name. Additionally, the class member does as well. Seems that the
> generator needs to use the fully qualified name everywhere.
>
> elrod
>
>
--
Mark Elrod
Vindicia, Inc.
2755 Campus Drive, Suite 240
San Mateo, California 94403
Email: elrod@vindicia.com
Cell: 650-483-5763
Work: 650-522-4484
Main: 650-522-4480
Fax: 650-345-1165
Web: http://www.vindicia.com