I have a data service that works perfectly when deployed in a DSS only environment. The exact data service when deployed in an environment with both dss and esb will fail an operation that has a simple input parameter.
Any pointers as to what is failing would be greatly appreciated.
The Data service has two operations;
- Simple get of information with no input parameters, GetLastRequest
- More complex get operation in which a single datetime parameter is passed in, GetNewRequests
When deployed in DSS only environment, both operations work as expected using TryIT
When deployed in the DSS/ESB environment then the first operation works as expected. The second operation fails when using TryIt
Operation 2: GetNewRequests
DSS configuration
<data name="ServiceMagnetRequestMonitor" transports="http">
<config id="ServiceMagnetStaging">
<property name="driverClassName">com.mysql.jdbc.Driver</property>
<property name="url">jdbc:mysql://localhost:3307/servicem_staging_engine</property>
<property name="username">root</property>
<property name="password">password</property>
</config>
<config id="ServiceMagnetRulesConfig">
<property name="driverClassName">com.mysql.jdbc.Driver</property>
<property name="url">jdbc:mysql://localhost:3307/servicemagnetrulesconfig</property>
<property name="username">root</property>
<property name="password">password</property>
</config>
<query id="GetLastRequest_SQL" useConfig="ServiceMagnetRulesConfig">
<sql>SELECT datevalue, NOW() as currenttime FROM dateconfigurations WHERE (configname = 'LastInspectionRequest')</sql>
<result element="Configurations" rowName="Configuration">
<element column="datevalue" name="datevalue" xsdType="dateTime"/>
<element column="currenttime" name="currenttime" xsdType="dateTime"/>
</result>
</query>
<query id="GetNewRequests_SQL" useConfig="ServiceMagnetStaging">
<sql>SELECT requests.id, requests.name, requests.telephone, requests.email, languages.name AS preflanguage, locations.name AS location, regions.name AS region, provinces.name AS province, requests.timeframe_date, requests.timeframe, requests.created_at FROM provinces, regions, locations, requests, languages WHERE provinces.id = regions.province_id AND regions.id = locations.region_id AND locations.id = requests.location_id AND requests.language_id = languages.id AND (requests.created_at > :LastRequest_IN)</sql>
<result element="Requests" rowName="Request">
<element column="id" name="id" xsdType="string"/>
<element column="name" name="name" xsdType="string"/>
<element column="telephone" name="telephone" xsdType="string"/>
<element column="email" name="email" xsdType="string"/>
<element column="preflanguage" name="preflanguage" xsdType="string"/>
<element column="location" name="location" xsdType="string"/>
<element column="region" name="region" xsdType="string"/>
<element column="province" name="province" xsdType="string"/>
<element column="timeframe_date" name="timeframe_date" xsdType="date"/>
<element column="timeframe" name="timeframe" xsdType="string"/>
<element column="created_at" name="created_at" xsdType="dateTime"/>
</result>
<param name="LastRequest_IN" sqlType="TIMESTAMP"/>
</query>
<operation name="GetLastRequest">
<call-query href="GetLastRequest_SQL"/>
</operation>
<operation name="GetNewRequests">
<call-query href="GetNewRequests_SQL">
<with-param name="LastRequest_IN" query-param="LastRequest_IN"/>
</call-query>
</operation>
</data>
Error returned using TryIT
<soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:axis2ns5336="http://ws.wso2.org/dataservice">
<soapenv:Code>
<soapenv:Value>axis2ns5336:INCOMPATIBLE_PARAMETERS_ERROR</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:LastRequest_IN
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: ServiceMagnetRequestMonitor
Location: \ServiceMagnetRequestMonitor.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: GetNewRequests
Current Params: {}
</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail>
<axis2ns5335:DataServiceFault xmlns:axis2ns5335="http://ws.wso2.org/dataservice">DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:LastRequest_IN
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: ServiceMagnetRequestMonitor
Location: \ServiceMagnetRequestMonitor.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: GetNewRequests
Current Params: {}
</axis2ns5335:DataServiceFault>
</soapenv:Detail>
</soapenv:Fault>