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

strong-soap: Wrong sequence of xsd imports in wsdl leads to error #146

Closed
PaulHindenberg opened this issue Mar 15, 2018 · 4 comments
Closed
Labels

Comments

@PaulHindenberg
Copy link

Description/Steps to reproduce

Firstly, I think this might be a bug since e.g. SOAP UI is able to parse the original WSDL and strong-soap returns an error.

The error appears while loading the WSDL with createClient(). Nothing special here.

The provided WSDL has 3 schema imports.

  • Position1: exceptions
  • Position2: types
  • Position3: types

I was able to find a workaround by switching the xsd imports on position 1 & 2. So, the following is not leading to an error while everything else stays the same:

  • Position1: types
  • Position2: exceptions
  • Position3: types

In this archive testcase.zip you can find the broken and the working version of the wsdl and xsd files. Again, just the positions of the type imports were changed to .

assert.js:42 throw new errors.AssertionError({ AssertionError [ERR_ASSERTION]: Document/literal part should use element at Operation.getMode (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl\operation.js:349:11) at Operation.postProcess (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl\operation.js:65:12) at Binding.postProcess (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl\binding.js:60:17) at Service.postProcess (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl\service.js:22:19) at C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:68:25 at C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:196:9 at WSDL._processNextInclude (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:156:14) at C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:195:12 at C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:100:9 at WSDL._processNextInclude (C:\DEV\git\project\proxy\node_modules\strong-soap\src\parser\wsdl.js:156:14

"dependencies": { "strong-soap": "^1.5.0" }

If bug: Steps to reproduce:

`var options = {};

var url = './testcase/broken/wsdl_service.xml';

soap.createClient(url, options, function (err, client) {

  console.log(client);

})`

Expected result

No error and a working client Object

Additional information

console.log(process.platform, process.arch, process.versions.node)
win32 x64 9.3.0
npm ls --prod --depth 0
+-- body-parser@1.18.2
+-- cors@2.8.4
+-- express@4.16.2
`-- strong-soap@1.5.0
@raymondfeng
Copy link
Contributor

@PaulHindenberg Can you verify if #147 fixes your problem?

@PaulHindenberg
Copy link
Author

@raymondfeng Yes, this fixes my issue, thanks Raymond.

@stale
Copy link

stale bot commented Oct 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 24, 2019
@stale
Copy link

stale bot commented Nov 7, 2019

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants