Data Service not running when deployed with ESB

I have a data service that works great when deployed in a DSS-only environment. Accurate data service when deployed in an environment with dss and esb will fail the operation with a simple input parameter.

It would be very helpful to evaluate any pointers as to what is happening with the error.

The data service has two operations:

  • Easy access to information without input parameters, GetLastRequest
  • A more complex operation that passes one datetime parameter, GetNewRequests

When deployed in a DSS-only environment, both operations work as expected using TryIT

When deployed in a DSS / ESB environment, the first operation works as expected. The second operation does not work 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&#13;FROM            provinces, regions, locations, requests, languages&#13;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 &gt; :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 while 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>

      

+3


source to share


2 answers


The following actually solves the problem stated above, however the real solution looks like it will require a hotfix from WSO2. I'll write JIRA for this.

Please note that the following instructions do not cause problems with installation or further updates. Changes are pure configuration and fully supported.

The problem was reported. Running DSS and ESB in the same instance crashes some DSS with input parameters.

Solution -> workaround To put it simply, until the defect is fixed, you won't be able to run DSS and ESB on the same Carbon instance. However, you can run DSS and ESB on two machines, or, as described below, run two instances on the same machine.



Uhhh, gee Rob, if the solution was only to get to the DSS operation, why go through all this effort? Why not just install dss and forget about esb? The answer is from wanting to use both dss and esb functions together on the same machine. If you only want a basic dss function, you can stop reading. But if you need functions like on the same computer, please continue.

Running ESB and DSS on the same machine

  • Install both DSS and ESB yourself.
  • Make sure none of them work
  • The ESB must be started with port offset 1. The port offset can be set in the /repository/conf/carbon.xml file where the ESB binary folder is located. Set the offset value as 1
  • Start both instances
  • The ESB now needs a proxy for the DSS service we are having problems with. Create a Passthrough proxy in esb for dss using the following instructions https://docs.wso2.com/display/ESB470/Pass+Through+Proxy+Template
  • Now use TRYIT from esb. Success!

I hope you find it helpful.

+2


source


I had the same problem but managed to find a workaround: Replace $ CARBON_HOME / repository / conf / axis2.xml file with $ CARBON_HOME / repository / conf / axis2_nhttp.xml

This will replace Passthrough with the NHTTP implementation for HTTP (s) transport, which is the same as in standalone DSS.



Note that this has a negative impact on proxies, so you might prefer to use two carbon instances.

0


source







All Articles