简体   繁体   中英

SOAP/HTTP using different folder mappings in ColdFusion

I'm experiencing some strange behaviour with a ColdFusion 11 server, which (among other things) publishes some web services accessed via both SOAP and HTTP. The server itself is Windows 2012, running IIS. Actual folder config is as follows:

文件夹配置

IIS has two websites configured, 'BOB' and 'BOB_Services'. Both have been configured with the CF Server Config tool so that CF handles .cfc, .cfm files. They share a common CFIDE config.

  • BOB's root is I:/inetpub/BOB
  • BOB_Services's root is I:/inetpub/BOB_Services

There is a folder mapping configured in CF Admin from '/' to 'I:/inetpub/BOB'. Don't ask me why, no one seems to know.

Normally there is a services.cfc file in BOB_Services . BOB_Services存在一个services.cfc文件。 Yesterday we accidentally copied that same file into the BOB root folder, and all of our SOAP services using BOB_Services\\services.cfc started throwing errors. Yet I can query the same webservice via HTTP (eg. using http://bob/services.cfc?method=function1&param1=0 ....etc) and get a valid result.

This is a reference answer in case anyone else comes across this strange behaviour.

It appears that when BOB_Services/services.cfc is called using HTTP GET, the folder mapping

'/' -> 'I:/inetpub/BOB'

is ignored and the actual file used to process the request is I:/inetpub/BOB_Services/services.cfc .

When a function in BOB_Services/services.cfc is called using a SOAP client, the folder mapping is invoked and the file used to process the request is I:/inetpub/BOB/services.cfc , . If it does not exist, the file I:/inetpub/BOB_Services/services.cfc is used as expected.

This behaviour appears to be entirely repeatable - I can make a SOAP request, get one result, change the mapping, make another request and get the other result.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM