“Duplicate file name” for same WSDL namespace when using web-service from different sub-domains

后端 未结 4 729
無奈伤痛
無奈伤痛 2021-01-25 03:39

Preface

We are providing customers with our service API.

Each customer has own subdomain (e.g. sergii.ourwebsite.com) and own WSDL URL, it look

4条回答
  •  情深已故
    2021-01-25 04:19

    I can not "place the WSDL at a common URL for all customers" for now and I've explained why: because I have to use the sub-domains. If you know the way to put the WSDL at one URL and make service requests to another -- please tell me.

    A WSDL is just an XML document that describes the web service. You can write (customize) it using CFML. For instance:

    http://subdomain.domain.com/api/wsdl.cfm?api=bsapi&customer=subdomain

    Then just copy the WSDL generated by CF, and use it as a template for your custom WSDL page. Replace the parts of the WSDL that are subdomain-specific and return the XML document. Be mindful of whitespace (perhaps see CFSilent, CFSetting), and consider using CFHeader to set the mime type to "text/xml".

提交回复
热议问题