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

allow xsd:include to include a schema without target namespace #138

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Jan 5, 2018

Description

Fix #137

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look reasonable to me. Can we add tests for them?

@raymondfeng raymondfeng merged commit 6fe5308 into master Jan 12, 2018
@raymondfeng raymondfeng deleted the fix-issue-137 branch January 31, 2018 20:39
@chandrakantpant
Copy link

@raymondfeng i still the similar issue at my end.

I have got below strong-soap package.

cat package.json
{
"name": "soapclient",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"strong-soap": "^1.5.0"
}
}

Wdsl that i am trying is ORACLE BPM serivce
http://host:port/integration/services/TaskQueryService/TaskQueryService?WSDL

and the error that i am getting is

=======

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
'0'
var exposedclient = {};
undefined
soap.createClient(url, {}, function(err, client) {
... exposedclient = client;
... console.log('done creating client');
... console.log(err);
... });
undefined
AssertionError [ERR_ASSERTION]: Document/literal part should use element
at Operation.getMode (C:\Users\user\Desktop\soapclient\node_modules\stron
g-soap\src\parser\wsdl\operation.js:349:11)
at Operation.postProcess (C:\Users\user\Desktop\soapclient\node_modules\s
trong-soap\src\parser\wsdl\operation.js:65:12)
at Binding.postProcess (C:\Users\user\Desktop\soapclient\node_modules\str
ong-soap\src\parser\wsdl\binding.js:60:17)
at Service.postProcess (C:\Users\user\Desktop\soapclient\node_modules\str
ong-soap\src\parser\wsdl\service.js:22:19)
at C:\Users\user\Desktop\soapclient\node_modules\strong-soap\src\parser\w
sdl.js:69:25
at C:\Users\user\Desktop\soapclient\node_modules\strong-soap\src\parser\w
sdl.js:197:9
at WSDL._processNextInclude (C:\Users\user\Desktop\soapclient\node_module
s\strong-soap\src\parser\wsdl.js:157:14)
at C:\Users\user\Desktop\soapclient\node_modules\strong-soap\src\parser\w
sdl.js:196:12
at C:\Users\user\Desktop\soapclient\node_modules\strong-soap\src\parser\w
sdl.js:101:9
exposedclient
{}
============

@wrfarina
Copy link

@chandrakantpant can you give access to the WSDL? The url:

http://host:port/integration/services/TaskQueryService/TaskQueryService?WSDL

Is not accesible.

I have a similar issue even after this fix, it's a WSDL that imports XSDs but I can't put it here.

@PaulHindenberg
Copy link

PaulHindenberg commented Mar 14, 2018

@wrfarina I had the same issue.. and this fix didn't do it as well. But after a few hours, I found the wrongly turned piece of the puzzle. Maybe this will help you as well.

Ok, so I had a few WSDL files to import. Most of them worked perfectly, but for some, I had the same error as in this issue. All of them have some XSD imports though! The problem with those "Error" WSDLs were that the Import for the "Exceptions-XSD" was on Position 1 and the other Definitions were after those -> Position 2,3,... After shifting the import of the "Exception-XSD" to position 2 I was able to load the WSDL file and the error was gone.

@raymondfeng Shall I open a new issue for this? --> #146

@raymondfeng
Copy link
Contributor Author

@PaulHindenberg Yes, please open a new issue with offending wsdl/xsd files.

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

Successfully merging this pull request may close these issues.

Elements defined in an included xsd file are not found by the wsdl parser
5 participants