How to change the address location of my wsdl

后端 未结 4 1664
孤独总比滥情好
孤独总比滥情好 2021-01-06 14:17

My wsdl put a wrong domain in address location, How to fix it?

- 
- 

        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 14:51

    Another option is to use the IIS URL Rewrite module (http://www.iis.net/downloads/microsoft/url-rewrite)

    First up - capture the output from XWebService.asmx?WSDL and save it as an HTML file (e.g. wsdl.htm).

    Edit this file and change the location to the alternative address

    ... from thishost.domain.com:

    - 
       
      
    

    ...to thathost.domain.com:

    - 
       
      
    

    In IIS - find the URL Rewrite icon in the website/virtual Feature View . Then click Add Rule(s) and choose Inbound Rule - Blank rule.

    With the rule - name it appropriately and set the pattern match for the webservice URL that will receive the WSDL request. For RegEx:

    (.*)XWebservice.asmx
    

    For the conditions match {QUERY_STRING} to WSDL and {REQUEST_METHOD} to GET.

    For the Action - set it to Rewrite (so this is transparent to the client) and choose the file that we saved it as earlier (wsdl.htm).

    This also adds a new rewrite section to the system.webServer section of the web.config

    
        
            
                
                    
                    
                        
                        
                    
                    
                
            
        
    
    

提交回复
热议问题