【问题标题】:WSO2 ESB: Custom URLWSO2 ESB:自定义 URL
【发布时间】:2015-08-19 13:48:27
【问题描述】:

我使用自定义 url 创建了我的代理,基于:

http://wso2.com/library/knowledge-base/2011/01/custom-urls-wso2-esb-proxy-services/

使用我的 SOAP 消息调用此自定义 URL 会导致错误,我仍然可以使用原始 URL。

自定义:/services/wss/PlanningOphaalServiceProxy_v1 原文:/services/PlanningOphaalServiceProxy_v1

错误:

TID: [0] [ESB] [2015-08-19 15:47:05,039] ERROR {org.apache.axis2.engine.AxisEngine} -  InvalidSecurity {org.apache.axis2.engine.AxisEngine}
org.apache.axis2.AxisFault: InvalidSecurity
        at org.apache.rampart.handler.PostDispatchVerificationHandler.invoke(PostDispatchVerificationHandler.java:151)
        at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
        at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:411)
        at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
TID: [0] [ESB] [2015-08-19 15:47:05,041] ERROR {org.apache.synapse.transport.passthru.ServerWorker} -  Error processing POST request for : /services/wss/PlanningOphaalServiceProxy_v1 {org.apache.synapse.transport.passthru.ServerWorker}
org.apache.axis2.AxisFault: InvalidSecurity

【问题讨论】:

    标签: soap wso2 wso2esb ws-security custom-url


    【解决方案1】:

    已解决:这是不可能的。根据 WSO2 支持,CustomURI 不能与 WS-Security 结合使用

    【讨论】:

      【解决方案2】:

      在axis2.xml中添加自定义调度后,我尝试了自定义URI并且工作正常

      下面是我的代理的 URI

      http://localhost:8280/GenericProxy

      和代理代码如下:

      <?xml version="1.0" encoding="UTF-8"?>
      <proxy xmlns="http://ws.apache.org/ns/synapse"
             name="CustomProxy"
             transports="https,http"
             statistics="disable"
             trace="disable"
             startOnLoad="true">
         <target>
            <inSequence>
               <property name="messageType"
                         value="application/xml"
                         scope="default"
                         type="STRING"/>
               <log level="full">
                  <property name="################## Body - In Seq###################"
                            expression="$body"/>
               </log>
               <send>
                  <endpoint>
                     <address uri="http://localhost:8090/services/OracleStoredProcedure.SOAP12Endpoint/"/>
                  </endpoint>
               </send>
            </inSequence>
            <outSequence>
               <log level="full">
                  <property name="############## Res Seq ############" value="Response"/>
               </log>
            </outSequence>
         </target>
         <parameter name="ServiceURI">/GenericProxy</parameter>
         <description/>
      </proxy>
      

      日志如下

      [2015-08-21 16:35:25,173]  INFO - ProxyService Successfully created the Axis2 se
      rvice for Proxy service : CustomProxy
      [2015-08-21 16:35:41,405]  INFO - LogMediator To: /GenericProxy, MessageID: urn:
      uuid:8e35439e-4d28-95be-4e25eb385843, Direction: request, #################
      # Body - In Seq################### = <soapenv:Body xmlns:soapenv="http://schemas
      .xmlsoap.org/soap/envelope/"><emp>
      <ID>sample</ID>
      </emp></soapenv:Body>, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:
      Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body
      ><emp>
      <ID>sample</ID>
      </emp></soapenv:Body></soapenv:Envelope>
      [2015-08-21 16:35:42,200]  INFO - LogMediator To: http://www.w3.org/2005/08/addr
      essing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:0431fb5f-4b03-47
      41-727bdb3637d8, Direction: response, ############## Res Seq ############ =
       Response, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xml
      ns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:En
      velope> 
      

      【讨论】:

        猜你喜欢
        • 2012-09-09
        • 2013-06-08
        • 2012-10-05
        • 2015-03-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多