简体   繁体   English

Wso2 ESB上的FTP

[英]FTP on Wso2 ESB

I have a .Net web application that is front-ending the ESB in order to create Proxies programmatically . 我有一个.Net Web应用程序,它是ESB的前端,以便以编程方式创建代理

I am trying to push a xml proxy into the ESB path: repository/deployment/server/synapse-configs/default/proxy-services/ via FTP but it seems not to work. 我正在尝试将XML代理推入ESB路径:通过FTP的repository/deployment/server/synapse-configs/default/proxy-services/ ,但这似乎不起作用。

I was trying this connection: ftp://admin:admin@localhost:9443/repository/deployment/server/synapse-configs/default/proxy-services/ 我正在尝试此连接: ftp://admin:admin@localhost:9443/repository/deployment/server/synapse-configs/default/proxy-services/

There is any other way to upload my XML in the ESB? 还有其他方法可以在ESB中上传我的XML吗? many thanks 非常感谢

EDIT : I know that one answer could be "yes, you can do that by using admin services", but that didn't work for me due to lack of documentation regarding adding proxies via admin services. 编辑 :我知道一个答案可能是“是的,您可以通过使用admin服务来做到这一点”,但是由于缺乏有关通过admin服务添加代理的文档,因此这对我不起作用。 So I am looking at alternatives like FTP, because I know that placing the xml directly in the Repo folder will work, the problem is accessing the folder. 因此,我正在研究FTP之类的替代方法,因为我知道将xml直接放置在Repo文件夹中会起作用,问题出在访问该文件夹。

As I understand, you are trying to use FTP to upload a file to a path. 据我了解,您正在尝试使用FTP将文件上传到路径。 This doesn't involve invoking WSO2 ESB, does it? 这不涉及调用WSO2 ESB,不是吗?

Based on above understanding, it seems your port specified in FTP address is incorrect. 根据以上理解,您在FTP地址中指定的端口似乎不正确。 I think you should use the port of the FTP server you are running in your machine. 我认为您应该使用计算机中正在运行的FTP服务器的端口。 Unless you haven't edit its config, it should be 21. After this change, you need to provide absolute path instead of relative path /repository/... 除非尚未编辑其配置,否则应为21。更改后,您需要提供绝对路径,而不是相对路径/ repository /...。

Think about it as just another FTP upload. 将其视为另一个FTP上传。 ESB automatically deploy any file that comes to /repository/deployment/server/synapse-configs/default/proxy-services/ regardless of how it came there. ESB会自动部署/ repository / deployment / server / synapse-configs / default / proxy-services /中附带的任何文件,而不管它来自何处。

Hope this helps! 希望这可以帮助!

I was looking for a proper way to add a proxy to the ESB, possibly using ws-admin services, but that wasn't really straightforward: problem with repositories, libraries etc... 我一直在寻找一种可能使用ws-admin服务向ESB添加代理的正确方法,但这并不是很简单:存储库,库等问题。

I ended up with a quick a dirty solution: secure java ftp to the server (with jsch )in the proper folder of the proxies. 我最终得到了一个肮脏的解决方案:在代理的正确文件夹中,将java ftp保护到服务器(使用jsch)(使用jsch)。

Thanks for your help anyway 还是要谢谢你的帮助

  1. You could create your proxy within the Web Interface of WSO2 (use a Web Browser): localhost:9443/carbon/admin/login.jsp 您可以在WSO2的Web界面(使用Web浏览器)中创建代理: localhost:9443/carbon/admin/login.jsp

  2. Or add the proxy by just copying the file 或仅复制文件即可添加代理

mv myProxy.xml MY_WSO2/repository/deployment/server/synapse-configs/default/proxy-services/myProxy.xml

An FTP connection to localhost:9443 will not work. 与localhost:9443的FTP连接将不起作用。 Otherwise explain why you need to use FTP? 否则请解释为什么需要使用FTP?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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