I’m working with an Aggregate API configuration. I have defined query parameters oc and cid in my API definition, but when I make requests, these parameters seem to be empty or not populated correctly. This issue leads to errors like INCOMPATIBLE_PARAMETERS_ERROR and NumberFormatException.
Here is my API configuration:
`
-1
1
0
<property expression="get-property('response')" name="userResponse" scope="default" type="STRING"/>
</sequence>
</target>
<target>
<sequence>
<call>
<endpoint>
<http method="get" uri-template="http://localhost:8290/services/officesDS/getOffice?OfficeCode={oc}">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
<log level="full" separator=",">
<property expression="get-property('response')" name="Office Service Response"/>
</log>
<property expression="get-property('response')" name="officeResponse" scope="default" type="STRING"/>
</sequence>
</target>
<target>
<sequence>
<call>
<endpoint>
<http method="get" uri-template="http://localhost:8290/services/productsDS/getProduct?category_id={cid}">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
<log level="full" separator=",">
<property expression="get-property('response')" name="Product Service Response"/>
</log>
<property expression="get-property('response')" name="productResponse" scope="default" type="STRING"/>
</sequence>
</target>
</clone>
<aggregate>
<completeCondition>
<messageCount max="-1" min="3"/>
</completeCondition>
<onComplete aggregateElementType="root" expression="json-eval($)">
<log level="full" separator=",">
<property expression="json-eval($)" name="Aggregated Response"/>
</log>
<property expression="json-eval($)" name="aggregatedResponse" scope="default" type="STRING"/>
<log level="full" separator=",">
<property expression="get-property('aggregatedResponse')" name="Final Aggregated Response"/>
</log>
<respond/>
</onComplete>
</aggregate>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
`
and the error i am encoutering :
<DataServiceFault>
<current_params>{category_id=}</current_params>
<source_data_service>
<data_service_name>productsDS</data_service_name>
<description>Service to expose product data</description>
<location>C:IntegrationStudioruntimemicroesbtmpcarbonapps-12341718856451086TestCompositeApplication_1.0.0.carproductsDS_1.0.0productsDS-1.0.0.dbs</location>
<default_namespace>http://ws.wso2.org/dataservice</default_namespace>
</source_data_service>
<ds_code>INCOMPATIBLE_PARAMETERS_ERROR</ds_code>
<nested_exception>java.lang.NumberFormatException: For input string: ""</nested_exception>
<current_request_name>_getgetproduct</current_request_name>
</DataServiceFault>
For some reason the parameters are not being populated correctly.
New contributor
Mohammed Khammeri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.