简体   繁体   中英

WSO2 EI 6.6.0 TenantMgtAdminService through proxy

I'm trying to access retrieveTenants method from TenantMgtAdminService .

For this I've created a custom proxy in EI 6.6.0 with the following code :

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

When I try the proxy I get the following error :

[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.

I'm able to access the same method through SoapUI.

Please what would be wrong with my proxy?

Thks Érico

Can you please modify the proxy service as follows and try this again.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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