WebService

Hello,

I have a WebService which is in different server. I need to consume that WebService in notes database. But that web service is secured by the windows authentication. When I am tiring that WebService from my browser it is asking for the windows user id and password, after giving that user id and password, it got opens. But while I am trying to consume it from my notes database it is giving below error message.


No WSDL was returned from the url:

http://XX.XX.XX.XX/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx http://10.84.100.114/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx


Can anyone help me on this, how to authenticate this.

Note: I also try to include my AD ID in WebService server but no luck.

Thanks in advance.

Sandip K Roy.

Subject: WebService

Hello,

WebService already written in different server, I need to consume that in my notes database to call the method in that web service. I am doing it from “New Web Service Consumer” button in lotus notes database and I am giving the URL of that webservice but I am getting the error message.

Now I removed all the windows authentication, but getting the same error as below.


No WSDL was returned from the url:

http://XX.XX.XX.XX/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx http://XX.XX.XX.XX/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx


any idea why I am getting this error.

Sandip.

Subject: WebService

Thanks Danny.

Now I am able to consume my WebService in notes database. But now I’m getting another error, can you please help me on this.

When I am trying to call the methods of that WebService, I am getting below error message from the server consol.

Agent Manager: Agent message: Web Service SMS_Receive_Confirm_ServiceSoap_n1 method OptOutEmail error (401) Unauthorized

Any idea why this error is coming.

Thanks in advance.

Sandip

Subject: Alternative to Web Service Consumer

I understand your trouble. I’m assuming the error is resulting from the fact that it can’t see the WSDL since it’s behind an authentication layer.

My previous response was an example of consuming your webservice manually with LotusScript instead of creating a consumer through Domino Designer. Instead of using a webservice consumer to call the webservice, you’re simply creating a POST object, passing a string of XML (presumably for SOAP) in the body of the POST request, then reading the response text (XML). In simpler terms, you send some XML to a URL and it gives you XML back.

What I described is very easy to do with webservices that don’t require authentication; however, although I’ve never tried it, I believe the concept can be extended by authenticating via a request header. Before attempting the code, you may want to do a proof-of-concept in a tool such as Postman, which is an extension for Chrome.

Subject: Could Try a POST Request

You may have to call the webservice via a POST request and pass the authentication credentials in the request header.

LotusScript example:

Dim objXML As Variant

Set objXML = CreateObject(“Microsoft.XMLHTTP”)

objXML.Open “POST”, “http://XX.XX.XX.XX/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx http://XX.XX.XX.XX/SMS_Receive_Confirm_WServ/SMS_Receive_Confirm_Service.asmx”, False

objXML.setRequestHeader “SOAPAction”, “TheMethodYouWantHere”

'TODO: Set Authentication Header Here

objXML.Send |
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:urn=“urn:DefaultNamespace”>
soapenv:Header/
soapenv:Body
your soap body here
</soapenv:Body>
</soapenv:Envelope>|

Print objXML.responseText