Mule file download with HTTP Endpoint

后端 未结 1 1866
有刺的猬
有刺的猬 2021-01-07 11:17

My HTTP Endpoint responsible for downloading the file at the end of the flow is erroring out. It keeps trying to communicate with http://:80/ instead of the URL

1条回答
  •  [愿得一人]
    2021-01-07 11:55

    I can't spot the error: your flow looks good (except a problem I'll detail below) so, alternatively to using an http:outbound-endpoint, which can be finicky at times, you could use the http:rest-service-component.

    Your next problem will be in the outputPattern of the file endpoint: remember at this point message.payload will be the response from the HTTP endpoint not the (partial) URL anymore. You need to pre-compute the file name and store it in a flow variable, then use it.

    This would give:

    
      
        
      
    
    
    
        
        
        
        
        
        
        
            
                
            
        
        
    
    

    0 讨论(0)
提交回复
热议问题