<tfoot id='kPXDB'></tfoot>
  • <legend id='kPXDB'><style id='kPXDB'><dir id='kPXDB'><q id='kPXDB'></q></dir></style></legend>

        <small id='kPXDB'></small><noframes id='kPXDB'>

        <i id='kPXDB'><tr id='kPXDB'><dt id='kPXDB'><q id='kPXDB'><span id='kPXDB'><b id='kPXDB'><form id='kPXDB'><ins id='kPXDB'></ins><ul id='kPXDB'></ul><sub id='kPXDB'></sub></form><legend id='kPXDB'></legend><bdo id='kPXDB'><pre id='kPXDB'><center id='kPXDB'></center></pre></bdo></b><th id='kPXDB'></th></span></q></dt></tr></i><div id='kPXDB'><tfoot id='kPXDB'></tfoot><dl id='kPXDB'><fieldset id='kPXDB'></fieldset></dl></div>
        • <bdo id='kPXDB'></bdo><ul id='kPXDB'></ul>
      1. Wso2 ESB 管理服务获取创建代理 Java

        Wso2 ESB admin services to get Create proxies Java(Wso2 ESB 管理服务获取创建代理 Java)
        <i id='O0OLA'><tr id='O0OLA'><dt id='O0OLA'><q id='O0OLA'><span id='O0OLA'><b id='O0OLA'><form id='O0OLA'><ins id='O0OLA'></ins><ul id='O0OLA'></ul><sub id='O0OLA'></sub></form><legend id='O0OLA'></legend><bdo id='O0OLA'><pre id='O0OLA'><center id='O0OLA'></center></pre></bdo></b><th id='O0OLA'></th></span></q></dt></tr></i><div id='O0OLA'><tfoot id='O0OLA'></tfoot><dl id='O0OLA'><fieldset id='O0OLA'></fieldset></dl></div>
      2. <legend id='O0OLA'><style id='O0OLA'><dir id='O0OLA'><q id='O0OLA'></q></dir></style></legend>

          • <bdo id='O0OLA'></bdo><ul id='O0OLA'></ul>

              <small id='O0OLA'></small><noframes id='O0OLA'>

              <tfoot id='O0OLA'></tfoot>
                <tbody id='O0OLA'></tbody>

                1. 本文介绍了Wso2 ESB 管理服务获取创建代理 Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  1)您好,我正在尝试使用管理服务在 ESB 中创建代理.

                  1) Hello I am trying to use the admin services to create an Proxy inside the ESB.

                  所以我暴露了管理服务 (Hidden=false)

                  So I have exposed the admin services (Hidden=false)

                  我已经在我的 Java 项目中导入了 WSDl https://localhost:8243/services/ProxyServiceAdmin?wsdl

                  I have imported the WSDl in my Java project https://localhost:8243/services/ProxyServiceAdmin?wsdl

                  但我无法锻炼如何调用方法 addProxy 我是否使用了错误的管理服务?请提供使用此方法的示例.

                  But I cannot workout how to call the method addProxy am I using the wrong admin service? Please help with an example of consuming this method.

                  ProxyServiceAdmin ps = new ProxyServiceAdmin();
                  ps.addProxy(); //wrong
                  

                  2) 我有一个代理定义为单行字符串,比如

                  2) I have a proxy defined as a one-line String, like

                  String xmlproxy="<?xml version='1.0' encoding='UTF-8'?><proxy xmlns='http://ws.apache.org/ns/synapse' name='MyProxy1' transports='https' startOnLoad='true' trace='disable'> <target inSequence='sequence1'>...."
                  

                  是否可以通过调用管理服务的某些方法来添加此代理?

                  Is it possible to add this Proxy by calling some method of the admin services?

                  非常感谢您的关注!

                  编辑我查看了 WSDL ProxyServiceAdmin?wsdl"它说 <wsdl:operation name="addProxy"><http:operation location="addProxy"/><wsdl:input><mime:content type="text/xml" part="参数"/></wsdl:input><wsdl:output><mime:content type="text/xml" part="parameters"/></wsdl:output>

                  EDIT I had a look at the WSDL "ProxyServiceAdmin?wsdl" it says <wsdl:operation name="addProxy"><http:operation location="addProxy"/><wsdl:input><mime:content type="text/xml" part="parameters"/></wsdl:input><wsdl:output><mime:content type="text/xml" part="parameters"/></wsdl:output>

                  所以它在那里,但为什么我不能调用它?为什么我的代码不能像普通的 Web 服务那样工作?真的,请帮忙.我不明白我做错了什么......

                  so it is there, but why I cannot call it? Why my code does not work as a normal Web Service would? Really, please help. I don't get what i am doing wrong...

                  ProxyServiceAdmin ps = new ProxyServiceAdmin();
                  ps.addProxy(); //not recognized as an operation of ProxyServiceAdmin even if it is in the wsdl
                  

                  推荐答案

                  你只需要使用org.wso2.carbon.proxyadmin.stub.ProxyServiceAdminStub"通过管理服务来广告代理

                  You simply have to use "org.wso2.carbon.proxyadmin.stub.ProxyServiceAdminStub" to ad proxy by admin services

                  请查看以下代码和内联注释.

                  Please have a look at following code and comments inline.

                      String endPoint = *<your backend service url>* +"ProxyServiceAdmin";
                      proxyServiceAdminStub = new ProxyServiceAdminStub(endPoint);
                  

                  您必须在使用服务存根之前对其进行身份验证

                  You have to authenticate your service stub before make any use of it

                      CarbonUtils.setBasicAccessSecurityHeaders(userName, password,                      
                                                proxyServiceAdminStub._getServiceClient());
                  

                  需要将代理的 ProxyData 对象生成为 synaps xml

                  Need to generate ProxyData object of your proxy as synaps xml

                      String[] transport = {"http", "https"};
                      ProxyData data = new ProxyData();
                      data.setName(proxyName);
                      data.setWsdlURI(*<url to your WSDL>*);
                      data.setTransports(transport);
                      data.setStartOnLoad(true);       
                      data.setEndpointXML("<endpoint xmlns="http://ws.apache.org/ns/synapse"><address uri="" + serviceEndPoint + "" /></endpoint>");
                      data.setEnableSecurity(true);
                      proxyServiceAdminStub.addProxy(data);
                  

                  谢谢你,佛法

                  这篇关于Wso2 ESB 管理服务获取创建代理 Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  1. <i id='9W48m'><tr id='9W48m'><dt id='9W48m'><q id='9W48m'><span id='9W48m'><b id='9W48m'><form id='9W48m'><ins id='9W48m'></ins><ul id='9W48m'></ul><sub id='9W48m'></sub></form><legend id='9W48m'></legend><bdo id='9W48m'><pre id='9W48m'><center id='9W48m'></center></pre></bdo></b><th id='9W48m'></th></span></q></dt></tr></i><div id='9W48m'><tfoot id='9W48m'></tfoot><dl id='9W48m'><fieldset id='9W48m'></fieldset></dl></div>

                        <tfoot id='9W48m'></tfoot>
                          <bdo id='9W48m'></bdo><ul id='9W48m'></ul>

                            <tbody id='9W48m'></tbody>

                            <small id='9W48m'></small><noframes id='9W48m'>

                            <legend id='9W48m'><style id='9W48m'><dir id='9W48m'><q id='9W48m'></q></dir></style></legend>