簡體   English   中英

WSO2 EI 6.6.0 TenantMgtAdminService 通過代理

[英]WSO2 EI 6.6.0 TenantMgtAdminService through proxy

我正在嘗試從TenantMgtAdminService訪問retrieveTenants方法。

為此,我使用以下代碼在 EI 6.6.0 中創建了一個自定義代理:

<?xml version="1.0" encoding="UTF-8"?><proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy_RetrieveTenants" startOnLoad="true" statistics="disable" trace="disable" transports="http,https">
    <target>
        <inSequence>
            <property name="POST_TO_URI" scope="axis2" value="true"/>
            <property xmlns:ns="http://org.apache.synapse/xsd" expression="fn:concat('Basic ', base64Encode('ws.palmsoft:YWRtaW46YWRtaW4'))" name="Authorization" scope="transport"/>
            <call>
                <endpoint>
                    <wsdl uri="https://localhost:9443/services/TenantMgtAdminService.TenantMgtAdminServiceHttpsSoap12Endpoint HTTP/1.1"/>
                    <property name="action" scope="axis2" value="urn:retrieveTenants"/>
                    <property name="Host" scope="axis2" value="localhost:9443"/>
                    <property name="Content-Type" scope="axis2" value="application/soap+xml"/>
                </endpoint>
            </call>
        </inSequence>
        <outSequence>
            <call/>
        </outSequence>
        <faultSequence/>
    </target>
    <description/>
</proxy>

當我嘗試代理時,出現以下錯誤:

[2020-03-16 12:33:49,874] ERROR {org.apache.axis2.description.ClientUtils} - The system cannot infer the transport information from the /services/Proxy_RetrieveTenants.Proxy_RetrieveTenantsHttpSoap12Endpoint URL.

[2020-03-16 12:33:49,877] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out org.apache.axis2.AxisFault: The system cannot infer the transport information from the /services/Proxy_RetrieveTenants.Proxy_RetrieveTenantsHttpSoap12Endpoint URL.

我可以通過 SoapUI 訪問相同的方法。

請問我的代理有什么問題?

感謝埃里科

能否請您按如下方式修改代理服務,然后再試一次。

<?xml version="1.0" encoding="UTF-8"?><proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy_RetrieveTenants" startOnLoad="true" statistics="disable" trace="disable" transports="http,https">
<target>
    <inSequence>
        <property name="POST_TO_URI" scope="axis2" value="true"/>
        <property xmlns:ns="http://org.apache.synapse/xsd" expression="fn:concat('Basic ', base64Encode('admin:admin'))" name="Authorization" scope="transport"/>
        <property name="ContentType" scope="axis2" value="text/xml"/>
        <property name="SOAPAction" scope="transport" value="urn:retrieveTenants"/>
        <payloadFactory media-type="xml">
            <format>
                <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org">
                    <soap:Header/>
                    <soap:Body>
                        <ser:retrieveTenants/>
                    </soap:Body>
                </soap:Envelope>
            </format>
            <args/>
        </payloadFactory>
        <call>
            <endpoint>
                <address format="soap12" uri="https://localhost:9443/services/TenantMgtAdminService.TenantMgtAdminServiceHttpsSoap12Endpoint"/>
            </endpoint>
        </call>
        <respond/>
    </inSequence>
    <outSequence>
        <send/>
    </outSequence>
    <faultSequence/>
</target>
<description/>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM