QUSIR / staff

Automatically exported from code.google.com/p/staff
Apache License 2.0
0 stars 0 forks source link

Generate wsdl file with error #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.The Calculator.h as follow:
/////////////////////////////////////////////////////////////
#include <staff/common/IService.h>
#include "door.h"

namespace cspws
{
  //! Calculator service
  class Calculator: public staff::IService
  {
  public:
    virtual int AddDoorConfig(const DoorFirmConfig& tConfig) = 0;
  };
}
/////////////////////////////////////////////////////////////////
The door.h as follow:
namespace cspws
{
namespace csp
{
namespace door
{
struct DoorFirmConfig
{
    unsigned long long id;
    unsigned int type; 
};
}
}
}
/////////////////////////////////////////////////////////////////
2.Generate the wsdl as follow:
staff_codegen -u -twsdl -csrc Calculator.h
It will generate file cspws.Calculator.wsdl and cspws.csp.door.door.xsd
3.Add the wsdl file to Eclipse, the compiler prompt error info as follow:
(1) s4s-att-invalid-value: Invalid attribute value for 'type' in element 
'element'. Recorded reason: cvc-datatype-valid.1.2.1: 'unsigned int' is not a 
valid value for 'QName'.
The Wsdl content as follow:
<complexType name="DoorFirmConfig">
        <sequence>
          <element name="id" type="unsigned long long"/>
          <element name="type" type="unsigned int"/>
        </sequence>
</complexType>

??? The Wsdl do not support unsigned?

(2)s4s-att-invalid-value: Invalid attribute value for 'type' in element 
'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 
'ns_cspws_csp_door:DoorFirmConfig' as a QName: the prefix 'ns_cspws_csp_door' 
is not declared.
The Wsdl content as follow:
<element name="AddDoorConfig">
  <complexType>
   <sequence>
     <element name="tConfig" type="ns_cspws_csp_door:DoorFirmConfig"/>
   </sequence>
  </complexType>
</element>
///////////////////////////////////////////////////////////////
In cspws.Calculator.wsdl file do not define ns_cspws_csp_door. But it's a 
namespace in cspws.csp.door.door.xsd file. 

You can get the file from attachment.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
revision r699. windows xp

Please provide any additional information below.

Original issue reported on code.google.com by bingqing...@gmail.com on 18 Aug 2012 at 6:23

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by loentar on 31 Aug 2012 at 12:29

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r708.

Original comment by loentar on 31 Aug 2012 at 12:30