Forum Discussion

rajd18's avatar
rajd18
New Contributor
5 years ago

SOAPUI 5.5(MAC) Fails for EWS -- 401 Unauthorized

Hello Folks,

 

I am have a weird issue setting up SOAPUI connectivity to EWS. I have tried in past setting up the initial project with the provided WSDL and dont recall any issue however, I am trying to replicate that recently for the same webservices account and am getting "Receiving response: HTTP/1.1 401 Unauthorized"

 

Note: The only difference is earlier i tested when I was on windows desktop and now its a Mac.

Also note the previous imported projected from windows works fine on MAC including all its methods.

 

This is real bottleneck for me and is holding up my entire work backlog. Any assistance is greatly appreciated.

 

Thanks you

Raj

 

The WSDL used is internal like https://<servername>/Services.wsdl

 

Note: The URL requires authentication and works fine when accessesd via a Browser.

 

Things I have tried:

When I ADD WSDL to the project it runs logs like below and then Prompt for NT authenticationbut with No success. On that NT authentication pop up I have tried:

  • Provide domain\username, with its passowrd, and domain empty
  • Provide usermame , password and domain in their respective places

Change Preferences to use 1.0 for HTTP

Add credentials under "Outgoing WS-Seurity Configurations:

 

The failure mesage on UI :

Error loading [https://<servername>/ews/Services.wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null

 

SOAUI log:

  • Tue Jan 28 15:10:27 EST 2020:DEBUG:Found credentials
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:Attempt 2 to execute request
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:Sending request: GET /ews/Services.wsdl HTTP/1.1
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Connection can be kept alive indefinitely
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Target requested authentication
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Authorization challenge processed
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Authentication scope: NEGOTIATE @<servername>:443
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:Authentication failed
  • Tue Jan 28 15:10:28 EST 2020:ERROR:Failed to load url [https://<servername>/ews/Services.wsdl]
  • Tue Jan 28 15:10:28 EST 2020:ERROR:An error occurred [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException], see error log for details
  • Tue Jan 28 15:11:01 EST 2020:DEBUG:Connection closed

The HTTP log is as below:

  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "GET /ews/Services.wsdl HTTP/1.1[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "Host: <servername>[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "Cookie: BIGipServerp_exchange2010es_dc2_vip1_443=136776203.47873.0000[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:>> "[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "Date: Tue, 28 Jan 2020 20:10:00 GMT[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "Connection: keep-alive[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "Content-Length: 0[\r][\n]"
  • Tue Jan 28 15:10:01 EST 2020:DEBUG:<< "[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "GET /ews/Services.wsdl HTTP/1.1[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "Host: <servername>[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "Cookie: BIGipServerp_exchange2010es_dc2_vip1_443=136776203.47873.0000[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
  • Tue Jan 28 15:10:27 EST 2020:DEBUG:>> "[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "Date: Tue, 28 Jan 2020 20:10:27 GMT[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "Connection: keep-alive[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "Content-Length: 0[\r][\n]"
  • Tue Jan 28 15:10:28 EST 2020:DEBUG:<< "[\r][\n]"

Error Logs:

  • Tue Jan 28 15:10:28 EST 2020: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(Thread.java:748)
  • hello Rao.

     

    EWS --> Exchange Web Services.

     

    It appears SOAPUI fails to interface with the Exchange WSDL directly based on a provided WSDl

     

    On further research found that i had to literally download the WSDL locally and other related files to populate all the methods availabe on the WSDL.

     

    Thanks for the response but this thread can now be closed

     

    Raj

     

     

  • nmrao's avatar
    nmrao
    Champion Level 3
    What is EWS?
    Have you checked with your team who is working on windows? No way for the people outside to try.
    • rajd18's avatar
      rajd18
      New Contributor

      hello Rao.

       

      EWS --> Exchange Web Services.

       

      It appears SOAPUI fails to interface with the Exchange WSDL directly based on a provided WSDl

       

      On further research found that i had to literally download the WSDL locally and other related files to populate all the methods availabe on the WSDL.

       

      Thanks for the response but this thread can now be closed

       

      Raj