wsdl-tsclient icon indicating copy to clipboard operation
wsdl-tsclient copied to clipboard

Some type declarations are missing

Open blyzniuk-energi opened this issue 4 years ago • 1 comments

I generate a SOAP client from WSDL files. Archive with wsdl files here

Run it as: npx wsdl-tsclient ./resources/elhub_wsdl/v2/wsdl/PollMeteringValues.wsdl -o ./generated/ --verbose

A SOAP client is generated successfully but not all the type definitions are generated.

For example, there is a PollForData interface where all properties are strings, but I expect to have real types instead (they are declared in comments above the property).

/**
 * PollForData
 * @targetNSAlias `rsm`
 * @targetNamespace `urn:no:elhub:emif:PollForData:v2`
 */
export interface PollForData {
  /** Elhub_HeaderType */
  Header?: string;
  /** Elhub_EnergyContextType */
  ProcessEnergyContext?: string;
  /** Elhub_PollForData */
  Payload?: string;
}

There is a chain of includes/imports in WSDL to bring these types in.

  • PollMeteringValues.wsdl include xsd/PollMeteringValues.xsd
  • xsd/PollMeteringValues.xsd import ../../bim/PollForData.xsd
  • ../../bim/PollForData.xsd import common/Elhub_AggregatedBusinessInformationEntities.xsd

The last file has a declarations for Elhub_HeaderType, Elhub_EnergyContextType, Elhub_PollForData.

My colleague was able to generate .NET client based on these WSDL files, so they should be fine. Most likely something wrong with wsdl-tsclient or my configuration for it.

Does anyone have an idea how to solve it?

blyzniuk-energi avatar Oct 19 '21 14:10 blyzniuk-energi

I am having similar issues

I am generating a client from an Amadeus WSDL(it's a travel soap API). In my generated files I am missing many types. I have tried many permutations of the options to no avail. When I look into the WSDL everything is typed out properly however in my client it seems to be missing a lot of them.

peterarusanoff avatar Dec 27 '23 00:12 peterarusanoff