0

I've got an MDT deployment which does things a little differently based on the network location. From one of the locations, I have two webservices I need to call. My initial failed attempt was:

[Settings]
Priority=DefaultGateway

[DefaultGateway]
10.0.0.1=LOCATION_A
10.100.0.1=LOCATION_B

[LOCATION_A]
Subsection=WebService1
Subsection=WebService2

[WebService1]
WebService=http://contoso.com/webservice1

[WebService2]
WebService=http://contoso.com/webservice2

I quickly discovered this doesn't work, because you can only have one subsection in a section. So the best I could come up with was to have one webservice call another. This works, but now as the webservices evolve and have other callers, I have to maintain multiple copies of some services (that is, both chained and unchained). For example,

[Settings]
Priority=DefaultGateway

[DefaultGateway]
10.0.0.1=LOCATION_A
10.100.0.1=LOCATION_B

[LOCATION_A]
Subsection=WebService1AndWebService2

[WebService1]
WebService=http://contoso.com/webservice1

[WebService2]
WebService=http://contoso.com/webservice2

[WebService1AndWebService2]
WebService=http://contoso.com/webservice1
Subsection=WebService2

So I've got two places now where I have to maintain WebService1's url, parameters, etc.

Is there a better way within CustomSettings.ini? Should I just resort to calling the webservices manually from the task sequence instead of trying to pull this off from CustomSettings.ini?

0

Figured out a better way. This lets you easily enable/disable the web services you want to call from different DefaultGateways, but you won't be able to customize the ordering differently between them.

[Settings]
Priority=DefaultGateway,FLAG_WebService1,FLAG_WebService2
Properties=FLAG_WebService1,FLAG_WebService2

[DefaultGateway]
10.0.0.1=LOCATION_A
10.100.0.1=LOCATION_B

[LOCATION_A]
FLAG_WebService1=FLAG_YES_WebService1
FLAG_WebService2=FLAG_YES_WebService2

[FLAG_YES_WebService1]
WebService=http://contoso.com/webservice1

[FLAG_YES_WebService2]
WebService=http://contoso.com/webservice2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.