Forum Discussion

eret1k's avatar
eret1k
New Contributor
4 years ago

Import WSDL in SOAPUI from IIS with NT Authentication error

I wanna use soap ui open source (version 5.5.0) for debug MS Dynamics web services (AIF).
When import wsdl file from iis with NT(windows) Authentication i have error.
MS Dynamics application integration services have only windows authentication.
What can i do?

Spoiler
ERROR:com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
   com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.makeInvalidDefinitionException(WsdlLoader.java:127)
    at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:117)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:486)
    at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:475)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:92)
    at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:208)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:131)
    at java.lang.Thread.run(Unknown Source)

 

 

3 Replies

  • richie's avatar
    richie
    Community Hero
    Hey eret1k,

    Youre getting an xmlexception generated when you try loading in the .wsdl, right?
    Looking at the exception generated id guess you have malformed .xml in your .wsdl rather than the issue being related to authentication due to the presence of the nbsp entity.

    Have you tried launching your .wsdl with something that has an xmlparser like XMLSpy or Notepad++ with the xml plugin (or even a browser)?
    If you cant open the file or get warnings then this indicates it's either malformed .xml or the default xml char encoding defined within the .wsdl (im guessing UTF-8) isnt recognising the &nbsp entity.

    Im guessing youll need to fix the xml exception (by editing the file removing the erroneous nbsp) before youll be able to load in the .wsdl cos soapui parses the file using thr embedded xmlparser when you try and load in the .wsdl file.

    Cheers

    Rich
    • eret1k's avatar
      eret1k
      New Contributor

      Hi, richie!

      All right with wsdl file.
      I change settings in IIS:
      1. disable windows authentication,
      2. enable anonymous authentication,
      3. in web config of folder set - clientCredentialType="none"
      After this steps wsdl file loading successful, but in this mode not work web service methods, because ms dynamics can not do authentication, and check user rights.

      To making web services methods working, i save soapui project, rollback all steps in IIS and setup ntlm auth in requests.
      This is difficult to repeat for every web service. The problem is in the SOUPUI.

      • richie's avatar
        richie
        Community Hero
        Hi eret1k,

        Great youve nailed this down!!! However, the successful loading of the file when you select anonymous auth and the error response generated when you try loading in the .wsdl with NTLM auth is the clue.

        The warning is generated by the xmlparser when you load it into soapui. I dont know which parser soapui's using but the soapui developers wouldve just grabbed one that is available...they wouldnt have bothered coding a new parser when theyre freely available so i dont think the issue is with soapui itself.

        I think (without knowing more about whats going on), that when you export the .wsdl when creating (and specifying NTLM auth) this creates some additional xml (including the &nbsp entity) that is causing the error response. Once the &nbsp entity is removed from the .wsdl the issue i think will be resolved.

        So i think you have 2 choices. Load in a .wsdl with no auth and then update the auth for each SOAP request and hope the auth is inherited successfully for each test step once the file is successfully loaded into soapui, OR create the .wsdl with the NTLM auth (which should generate the problematic entity 'nbsp') then edit the file to remove the malformed xml.

        As i said above, this is a parser error and parsers report only malformed xml errors. If you open the .wsdl in xmlspy it'll show you exactly where the problem is. You can then edit it to remove the malformed bit, thereby making the .wsdl wellformed xml which will then allow you to launch the .wsdl in soapui!

        Hope ive explained it clearly,

        Nice one!

        Rich


        Id suggest launching the .wsdl in an app with a parser