I have a strange problem and can’t seem to find any solution. I know navWS only uses windows authentication, but where is the problem?
situation:
Navision webservice is installed on the same box as SQL.
Navision webservice has been made available on the internet for testing purposes.
one method is simple: input some text and returnmessage contains UPPERCASE SOME TEXT.
Ok here are the scenario’s:
on SQL server: internet explorer + URL + loginbox name/password → OK, WSDL
on SQL server: running report (serverside client) that consumes this webservice/method → OK, message UPPERCASE text.
My laptop in companynetwork: both internetexplorer and report (from local navision)–> OK
Other network trying to communicate from SAP → 401 error
Other network trying to communicate from SoapUI → 401 error
Other network using Internet explorer etc. → OK, WSDL
My laptop from home: Internet explorer → OK
My laptop from home, SoapUI → 401 Error
My laptop from home using report in local database → OK.
Local report uses the following function:
//Variables
//XmlHttp Automation ‘Microsoft XML, v3.0’.XMLHTTP
//XMLDoc Automation ‘Microsoft XML, v3.0’.DOMDocument
//XMLResponse Automation ‘Microsoft XML, v3.0’.DOMDocument
IF ISCLEAR(XMLDoc) THEN
CREATE(XMLDoc);
XMLDoc.load(‘c:\test.xml’);
IF ISCLEAR(XmlHttp) THEN
CREATE(XmlHttp);
//communicate using autohorized domain account
XmlHttp.open(‘POST’,‘webservice URL’,0,‘domain\username’,'password);
XmlHttp.setRequestHeader(‘Content-type’,‘text/xml; charset=utf-8’);
XmlHttp.setRequestHeader(‘SOAPAction’,‘uppercase’);
XmlHttp.send(XMLDoc);
IF ISCLEAR(XMLResponse) THEN
CREATE(XMLResponse);
XMLResponse.load(XmlHttp.responseXML);
IF XmlHttp.readyState <> 4 THEN
ERROR(‘XmlHttp Not Ready’);
IF XmlHttp.status <> 200 THEN
ERROR('Http Error ’ + ’ ’ + FORMAT(XmlHttp.status) + ': ’ + XmlHttp.statusText);
XMLResponse.save(‘C:\PostXML_response.xml’);
MESSAGE(XMLResponse.selectSingleNode(’.//Uppercase_Result’).text);
Questions:
-
Does anyone know how to setup SoapUI testing for this to work.
-
Does anyone know why SAP (using the given credential for domainuser\password) get’s 401.