WSO2 EI 6.6.0 TenantMgtAdminService через прокси - PullRequest
0 голосов
/ 16 марта 2020

Я пытаюсь получить доступ к методу retrieveTenants из TenantMgtAdminService.

. Для этого я создал собственный прокси в 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.

Пожалуйста, что не так с моим прокси?

Спасибо Эрико

1 Ответ

1 голос
/ 17 марта 2020

Можете ли вы изменить прокси-сервис следующим образом и повторить попытку.

<?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/>

...