How to check for WS-I compliance for WSDL files to be imported as custom connectors for Logic App

Published Sep 07 2021 01:53 AM 852 Views
Microsoft

When creating a custom connector using WSDL files, you may face an error stating -

'The validation of the WSDL document failed’. This might mean that the WSDL file is not WS-I compliant.

On elaborating the error message, you may notice that certain child elements are invalid are not included in the list of possible expected elements.

'The element '…' in namespace 'http://schemas.xmlsoap.org/wsdl/' has invalid child element '…' in namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy'.

List of possible elements expected: 'documentation, operation' in namespace 'http://schemas.xmlsoap.org/wsdl/'.'. '.'. Status code: 'BadRequest'.

 

Custom connectors for Logic app are based on API Management Service, thus, if you try uploading the WSDL file into APIM, you should get the same error.

Currently there is no method the skip WS-I compliance validation check in APIM for WSDL files, thus, the WSDL file must be WS-I compliant.

Providing steps on how to perform the WS-I compliance check on WSDL file -

What we need for this:

  1. soapUI, you may download the latest version from the official homepage: http://www.soapui.org/

soapUI is a tool for Web Service Testing. soapUI is Free and Open Source and is used for Inspecting Web Services, Invoking Web Services, Developing Web Services, Web Service Simulation and Web Service Mocking and Functional Testing of Web Services Load Testing of Web Services over HTTP.

 

  1. soapUI includes integrated support for the WS-I organizations Basic Profile validation tools for 2 situations:

 

Validating WSDL definitions - from the Interface Menu with the "Check WSI Compliance" option. This will run the WS-I Test Tools and validate the WSDL definition accordingly.

 

Validating SOAP request/response messages - from within the Request Editors response popup with the "Check WSI Compliance" option (as described under Message Validation).

 

If you are not using the latest SoapUI version, then you might first need to download either the Java™ or C# version (soapUI will use whichever is available) of the WS-I Interoperability Testing Tools 1.1 from the WS-I deliverables page. Once you download it unzip the file into a local directory and specify the contained "wsi test tools" directory in the soapUI together with the desired settings.

 

For example, if you have downloaded wsi-tools from the above link and extracted it to root of drive d: then you should go to File -> Preferences -> WS-I settings and in the Tool Location field enter: d:\wsi-test-tools

Additionally, you will need to set an environment variable for WSI_HOME to be wherever you extracted the wsi-test-tools directory.

 

How to test:

 

  1. Start soapUI, click on File -> New WSDL Project, specify the Project name and your initial WSDL that you would like to test, click OK.

 

  1. It will appear in the left side frame, expand your project, so, you can see your WSDL, then right click on the WSDL and click on "Check WS-I compliance".

 

  1. You will get a generated report with the detailed summary. Also, it can be useful to save it to an HTML file, so, support can review it as well.

 

Once you have made sure the WSDL file is WS-I compliant, please check for the restriction document mentioned below.


Here is the restriction document according to which the WSDL file should comply - Restrictions and details of API formats support - Azure API Management | Microsoft Docs

After ensuring the WSDL file is WS-I compliant and going through the restriction document, try to import the WSDL file again for the custom connector and the APIM service.



%3CLINGO-SUB%20id%3D%22lingo-sub-2723726%22%20slang%3D%22en-US%22%3EHow%20to%20check%20for%20WS-I%20compliance%20for%20WSDL%20files%20to%20be%20imported%20as%20custom%20connectors%20for%20Logic%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2723726%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20creating%20a%20custom%20connector%20using%20WSDL%20files%2C%20you%20may%20face%20an%20error%20stating%20-%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3E'The%20validation%20of%20the%20WSDL%20document%20failed%E2%80%99.%3C%2FEM%3E%3C%2FSTRONG%3E%20This%20might%20mean%20that%20the%20WSDL%20file%20is%20not%20WS-I%20compliant.%3C%2FP%3E%0A%3CP%3EOn%20elaborating%20the%20error%20message%2C%20you%20may%20notice%20that%20certain%20child%20elements%20are%20invalid%20are%20not%20included%20in%20the%20list%20of%20possible%20expected%20elements.%3C%2FP%3E%0A%3CP%3E'The%20element%20'%E2%80%A6'%20in%20namespace%20'%3CA%20href%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fwsdl%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.xmlsoap.org%2Fwsdl%2F%3C%2FA%3E'%20has%20invalid%20child%20element%20'%E2%80%A6'%20in%20namespace%20'%3CA%20href%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fws%2F2004%2F09%2Fpolicy%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.xmlsoap.org%2Fws%2F2004%2F09%2Fpolicy%3C%2FA%3E'.%20%3CBR%20%2F%3E%3CBR%20%2F%3EList%20of%20possible%20elements%20expected%3A%20'documentation%2C%20operation'%20in%20namespace%20'%3CA%20href%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fwsdl%2F%2527.%2527.%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.xmlsoap.org%2Fwsdl%2F'.'.%3C%2FA%3E%20'.'.%20Status%20code%3A%20'BadRequest'.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECustom%20connectors%20for%20Logic%20app%20are%20based%20on%20API%20Management%20Service%2C%20thus%2C%20if%20you%20try%20uploading%20the%20WSDL%20file%20into%20APIM%2C%20you%20should%20get%20the%20same%20error.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3ECurrently%20there%20is%20no%20method%20the%20skip%20WS-I%20compliance%20validation%20check%20in%20APIM%20for%20WSDL%20files%2C%20thus%2C%20the%20WSDL%20file%20must%20be%20WS-I%20compliant.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EProviding%20steps%20on%20how%20to%20perform%20the%20WS-I%20compliance%20check%20on%20WSDL%20file%20-%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhat%20we%20need%20for%20this%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EsoapUI%2C%20you%20may%20download%20the%20latest%20version%20from%20the%20official%20homepage%3A%20%3CA%20href%3D%22http%3A%2F%2Fwww.soapui.org%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fwww.soapui.org%2F%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EsoapUI%20is%20a%20tool%20for%20Web%20Service%20Testing.%20soapUI%20is%20Free%20and%20Open%20Source%20and%20is%20used%20for%20Inspecting%20Web%20Services%2C%20Invoking%20Web%20Services%2C%20Developing%20Web%20Services%2C%20Web%20Service%20Simulation%20and%20Web%20Service%20Mocking%20and%20Functional%20Testing%20of%20Web%20Services%20Load%20Testing%20of%20Web%20Services%20over%20HTTP.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EsoapUI%20includes%20integrated%20support%20for%20the%20WS-I%20organizations%20Basic%20Profile%20validation%20tools%20for%202%20situations%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EValidating%20WSDL%20definitions%20-%20from%20the%20Interface%20Menu%20with%20the%20%22Check%20WSI%20Compliance%22%20option.%20This%20will%20run%20the%20WS-I%20Test%20Tools%20and%20validate%20the%20WSDL%20definition%20accordingly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EValidating%20SOAP%20request%2Fresponse%20messages%20-%20from%20within%20the%20Request%20Editors%20response%20popup%20with%20the%20%22Check%20WSI%20Compliance%22%20option%20(as%20described%20under%20Message%20Validation).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20not%20using%20the%20latest%20SoapUI%20version%2C%20then%20you%20might%20first%20need%20to%20download%20either%20the%20Java%E2%84%A2%20or%20C%23%20version%20(soapUI%20will%20use%20whichever%20is%20available)%20of%20the%20WS-I%20Interoperability%20Testing%20Tools%201.1%20from%20the%20WS-I%20deliverables%20page.%20Once%20you%20download%20it%20unzip%20the%20file%20into%20a%20local%20directory%20and%20specify%20the%20contained%20%22wsi%20test%20tools%22%20directory%20in%20the%20soapUI%20together%20with%20the%20desired%20settings.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFor%20example%3C%2FSTRONG%3E%2C%20if%20you%20have%20downloaded%20wsi-tools%20from%20the%20above%20link%20and%20extracted%20it%20to%20root%20of%20drive%20d%3A%20then%20you%20should%20go%20to%20File%20-%26gt%3B%20Preferences%20-%26gt%3B%20WS-I%20settings%20and%20in%20the%20Tool%20Location%20field%20enter%3A%20d%3A%5Cwsi-test-tools%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20you%20will%20need%20to%20set%20an%20environment%20variable%20for%20WSI_HOME%20to%20be%20wherever%20you%20extracted%20the%20wsi-test-tools%20directory.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20to%20test%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EStart%20soapUI%2C%20click%20on%20File%20-%26gt%3B%20New%20WSDL%20Project%2C%20specify%20the%20Project%20name%20and%20your%20initial%20WSDL%20that%20you%20would%20like%20to%20test%2C%20click%20OK.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EIt%20will%20appear%20in%20the%20left%20side%20frame%2C%20expand%20your%20project%2C%20so%2C%20you%20can%20see%20your%20WSDL%2C%20then%20right%20click%20on%20the%20WSDL%20and%20click%20on%20%22Check%20WS-I%20compliance%22.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EYou%20will%20get%20a%20generated%20report%20with%20the%20detailed%20summary.%20Also%2C%20it%20can%20be%20useful%20to%20save%20it%20to%20an%20HTML%20file%2C%20so%2C%20support%20can%20review%20it%20as%20well.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20made%20sure%20the%20WSDL%20file%20is%20WS-I%20compliant%2C%20please%20check%20for%20the%20restriction%20document%20mentioned%20below.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EHere%20is%20the%20restriction%20document%20according%20to%20which%20the%20WSDL%20file%20should%20comply%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapi-management%2Fapi-management-api-import-restrictions%23wsdl%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ERestrictions%20and%20details%20of%20API%20formats%20support%20-%20Azure%20API%20Management%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EAfter%20ensuring%20the%20WSDL%20file%20is%20WS-I%20compliant%20and%20going%20through%20the%20restriction%20document%2C%20try%20to%20import%20the%20WSDL%20file%20again%20for%20the%20custom%20connector%20and%20the%20APIM%20service.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2723726%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20creating%20a%20custom%20connector%20using%20WSDL%20files%2C%20you%20may%20face%20an%20error%20stating%20-%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CEM%3E'The%20validation%20of%20the%20WSDL%20document%20failed%E2%80%99.%3C%2FEM%3E%3C%2FSTRONG%3E%20This%20might%20mean%20that%20the%20WSDL%20file%20is%20not%20WS-I%20compliant.%3CBR%20%2F%3ECheck%20this%20article%20on%20steps%20on%20how%20to%20perform%20the%20WS-I%20compliance%20check%20on%20WSDL%20file.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2723726%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELogic%20Apps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Sep 07 2021 01:53 AM
Updated by: