Can't access Web Service from MDT...

Dec 6, 2012 at 5:18 PM
Edited Dec 6, 2012 at 5:19 PM

Hi,

I have set up the web service on one of my web servers, say WEB1.

MDT 2012 is setup on say MDT1.

As a simple test, I am trying to implement the SetComputerDescription function.

If I try to run it from the browser, it works fine.

If I try to run a simple TS on my test machine, it fails with the clueless error "Event 41014 sent: Litetouch deployment failed, Return Code = -2147467259  0x80004005"...

From what I can tell WEB1 never receives the request.

CustomSettings.ini:

[Settings]
Priority=ByLaptop, ByDesktop, CSettings, CRoles, RSettings, RApps,Default
Properties=Description

[...]

[SetComputerDescription]
WebService=https://web1.acme.com/MDTWebService/AD.asmx/SetComputerDescription
Parameters=OSDComputerName, Description
OSDComputerName=ComputerName
Description=ComputerDescription

The TS sets the TS variable Description to MDT-TEST, then calls the web service via

cscript.exe "%SCRIPTROOT%\ACME-SetComputerDescription.wsf" 

and is launched from the desktop via LiteTouch.wsf.

Have I missed something simple???

Thanks!

... Alex ...

Coordinator
Dec 6, 2012 at 5:47 PM

What does the ACME-SetComputerDescription.wsf do? Does it write any log files you can check? What does the bdd.log say?

Dec 6, 2012 at 7:27 PM
Hi,

It's ZtiSetComputerDescription.wsf from the Downloads section of this site, I just renamed it so I can find the custom scripts in the Scripts folder.
I tried adding /debug:true as it suggests, but I haven't seen anything different?
The error message I gave earlier comes out of bdd.log, that's the only relevant entry I could find...

Thanks!

... Alex ...
Coordinator
Dec 7, 2012 at 6:06 AM

If you rename the script, you also need to adjust the class name within the script itself. MDT tries to initialize a class that has the same name as the script. So as you changed the name, it won't find the corresponding class within the script.

Dec 7, 2012 at 6:35 AM
Hi,

Funnily enough I had done that, but it was more for OCDs ;)

To be on the safe side, I'll try the original script unchanged too.

... Alex ...
Coordinator
Dec 7, 2012 at 7:00 AM

Also make sure you tell the script which section to use in your cs.ini by calling

cscript.exe "%ScriptRoot%"\ZTI_ExecuteWebservice.wsf /wsSection:SetComputerDescription

Please see http://myitforum.com/cs2/blogs/maikkoster/archive/2010/10/08/executing-web-services-a-generic-mdt-script.aspx for details.

 

Regards

Maik

Dec 7, 2012 at 9:54 AM

Hi!

Result!

- If I use the original file ZTISetComputerDescription.wsf, it works

- If I rename the file to ACME-SetComputerDescription.wsf, and replace all references of ZTISetComputerDescription to ACME-SetComputerDescription, it doesn't work

- If I use ZTI_ExecuteWebservice.wsf, it works

 

However, if I rename ZTISetComputerDescription to ACME_SetComputerDescription, it works! I'm not sure why, but it doesn't like a hyphen in the name...

Problem solved, thanks for guiding me in the right direction!

... Alex ...