CREATE(locautSoapHttpConnector); CREATE(locautSoapSerializer); CREATE(locautXmlDoc); locautSoapHttpConnector.Property('EndPointURL', 'http://servername:7047/DynamicsNAV/ws/coduenit/'); locautSoapHttpConnector.Connect; //WSDL('7047'); locautSoapHttpConnector.Property('AuthUser', 'Adminuserid'); locautSoapHttpConnector.Property('AuthPassword', 'Adminpsw'); locautSoapHttpConnector.Property('Timeout', 5 * 1000); locautSoapHttpConnector.Property('SoapAction','http://servername:7047/DynamicsNAV/ws/coduenit/thefunction'); locautSoapHttpConnector.BeginMessage; locautSoapSerializer.Init(locautSoapHttpConnector.InputStream); locautSoapSerializer.startEnvelope('SOAP','STANDARD'); locautSoapSerializer.startBody; locautSoapSerializer.startElement('Type'); locautSoapSerializer.writeString(FORMAT(Type)); locautSoapSerializer.endElement; locautSoapSerializer.startElement('ID'); locautSoapSerializer.writeString(FORMAT(ID)); locautSoapSerializer.endElement; locautSoapSerializer.endBody; locautSoapSerializer.endEnvelope; locautSoapHttpConnector.EndMessage; locautXmlDoc.load(locautSoapHttpConnector.OutputStream); locautXmlDoc.save('c:\temp\tempOut.xml');
Comments
if the user is the one your logged on then don't use the "auth user" propertys, if it works like in c# then it automaticly uses your windows user for authentication.
otherwise if you need to specify the user by code, then i suggest to use a normal DB-user, such a user can be used for "AuthUser" Property.
Warning: I never done this in NAV but if it works the same as in c# (I think so) then this is the way to go.
Any other suggestions ?
edit: why are you connecting before you set the login (user/pw) parameters?
Try using .connect after you entered the login.
I can connect to Navision using the Db user I was using.
Moving the Connect to after the user/psw gives the same issue as using a db user. IE an Instance create error on the EndMessage.
It appears as though it needs user/psw for NT authentication in the Connection to create the soap message.
Is there a separate property or way of passing in a user/psw through the EndPoint or Soapaction or indicate that it should run using window authentication and not db?
but with parameters, I am again getting this message:
the code used is: Please suggest