提问人:Wajih Haider 提问时间:11/8/2023 更新时间:11/8/2023 访问量:18
获取系统无法推断传输信息错误
Getting system cannot infer the transport information error
问:
嗨,我正在使用 wso2 micro integrator 向端点发送请求,但出现以下错误:
Unexpected error during sending message out org.apache.axis2.AxisFault: The system cannot infer the transport information from the 10.184.18.142:31258/api/v1/niPush URL.
我用来执行此操作的代码如下:
<payloadFactory media-type="json">
<format>{ "executeBatch": { "sessionID": "$1", "commands": [ { "event": "Accepted", "eventParameters": [ { "name": "App_Text", "valueAsString": "$2", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Account_Data", "valueAsString": "$3", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Account_SMS", "valueAsString": "$4", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Account_Voice", "valueAsString": "$5", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Allocation_Data", "valueAsString": "$6", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Allocation_SMS", "valueAsString": "$7", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Allocation_Voice", "valueAsString": "$8", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Duration_Data", "valueAsString": "$9", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Duration_SMS", "valueAsString": "$10", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Offer_Duration_Voice", "valueAsString": "$11", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "offer_price", "valueAsString": "$12", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Payment_Method", "valueAsString": "Airtime,MPESA,Bonga,Okoa", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Provisioning_Type", "valueAsString": "7.0", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "SMS_Text", "valueAsString": "$13", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "customer_profile", "valueAsString": "1", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "customer_cell_id", "valueAsString": "63902457739896", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "selected_payment_method", "valueAsString": "", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "msisdn", "valueAsString": "$14", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "offerCode", "valueAsString": "$15", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "offerName", "valueAsString": "$2", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "UACIOfferTrackingCode", "valueAsString": "$16", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "mpesa_correl_id", "valueDataType": "string", "valueAsString": "", "valueAsNumeric": 0.0 }, { "name": "mpesa_tunukiwa_callback_url", "valueAsString": "https://172.29.134.86:21013/rest/tunukiwa/MPESA_Fuliza_Callback", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "unica_accept_callback_url", "valueAsString": "https://172.29.134.86:21002/rest/RESTInteractWrapper/executeBatch", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "accountType", "valueAsString": "$17", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "Duration_Category", "valueAsString": "$20", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "expiry", "valueAsString": "$18", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "expiryUnit", "valueAsString": "$19", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "expiryUnitType", "valueAsString": "$20", "valueDataType": "string", "valueAsNumeric": 0.0 }, { "name": "resourceAmount", "valueAsString": "$21", "valueDataType": "string", "valueAsNumeric": 0.0 } ], "methodIdentifier": "ob_postEvent" }, { "methodIdentifier": "endSession" } ] } }</format>
<args>
<arg evaluator="xml" expression="$ctx:ID"/>
<arg evaluator="xml" expression="$ctx:OFFER_NAME"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_DATA_ID"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_SMS_ID"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_VOICE_ID"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_DATA_QUANTITY"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_SMS_QUANTITY"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_VOICE_QUANTITY"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_DATA_EXPIRY"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_SMS_EXPIRY"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE_VOICE_EXPIRY"/>
<arg evaluator="xml" expression="$ctx:PRICE"/>
<arg evaluator="xml" expression="$ctx:SUCCESS_NOTIFICATION"/>
<arg evaluator="xml" expression="$ctx:MSISDN"/>
<arg evaluator="xml" expression="$ctx:OFFER_CODE"/>
<arg evaluator="xml" expression="$ctx:TREATMENT_CODE"/>
<arg evaluator="xml" expression="$ctx:ACCOUNT_TYPE"/>
<arg evaluator="xml" expression="$ctx:EXPIRY_UNIT"/>
<arg evaluator="xml" expression="$ctx:EXPIRY"/>
<arg evaluator="xml" expression="$ctx:EXPIRY_UNIT_TYPE"/>
<arg evaluator="xml" expression="$ctx:QUANTITY"/>
</args>
</payloadFactory>
<log level="full">
<property expression="$ctx:Msisdn" name="Msisdn"/>
<property name="Before calling" value="Ni Push EP"/>
</log>
<property name="HTTP_METHOD" scope="axis2" type="STRING" value="POST"/>
<property action="remove" name="NO_ENTITY_BODY" scope="axis2"/>
<property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
<property name="FORCE_POST_PUT_NOBODY" scope="axis2" type="BOOLEAN" value="true"/>
<property name="messageType" scope="axis2" type="STRING" value="application/json"/>
<header name="accept" scope="transport" value="application/json"/>
<property name="ContentType" scope="axis2" type="STRING" value="application/json"/>
<call>
<endpoint key="NiPush_EP"/>
</call>
端点代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="NiPush_EP" xmlns="http://ws.apache.org/ns/synapse">
<http method="post" uri-template="10.184.18.142:31258/api/v1/niPush">
<timeout>
<duration>5000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
请指导我该错误背后的原因是什么?
注意:我正在使用此有效负载调解器形成的有效负载,以使用 postman 及其工作正常发送请求。
答:
0赞
ycr
11/8/2023
#1
您的 URL 中缺少协议 part()。请像下面这样更新它。http(s)://
<http method="post" uri-template="http://10.184.18.142:31258/api/v1/niPush">
评论
0赞
Wajih Haider
11/8/2023
谢谢你,它奏效了
评论