Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some type declarations are missing #26

Open
blyzniuk-energi opened this issue Oct 19, 2021 · 1 comment
Open

Some type declarations are missing #26

blyzniuk-energi opened this issue Oct 19, 2021 · 1 comment

Comments

@blyzniuk-energi
Copy link

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?

@peterarusanoff
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants