0

i'm trying to recover one or multiple rows from database using a DataService. I've written this code in the in-sequence in my proxy.

    <proxy name="RN" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
    <inSequence>          
            <in-sequence>     
              <payloadFactory media-type="xml">
                    <format>
                        <p:_select_with_key_R_RN_operation xmlns:p="http://ws.wso2.org/dataservice">
                            <!--Exactly 1 occurrence-->
                            <p:C_RN_ID>$1</p:C_RN_ID>
                        </p:_select_with_key_R_RN_operation>
                    </format>
                    <args>
                        <arg evaluator="xml" expression="get-property('RNACIDO')"/>
                    </args>
                </payloadFactory>
                                  <property name="Content-Type" value="application/xml" scope="transport" />
                                                    <property name="Action" value="urn:_select_with_key_R_RN_operation" scope="transport" />                    
                <send>
                    <endpoint key="RN_DS_EP"/>
                </send>
               </in-sequence>
               <out-sequence>
                 <send/>
               </out-sequence>
             <faultSequence/>
         </target>
      </proxy>

Endpoint is a AddressPoint to the DataService.

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="RN_DS_EP">
   <address uri="http://localhost:8280/RN_DS">
      <suspendOnFailure>
         <progressionFactor>1.0</progressionFactor>
      </suspendOnFailure>
      <markForSuspension>
         <retriesBeforeSuspension>0</retriesBeforeSuspension>
         <retryDelay>0</retryDelay>
      </markForSuspension>
   </address>
</endpoint>

But nothing happens. The ESB answeres with a empty soap message.

How can i solve that?

Thanks in advance.

Community
  • 1
  • 1
ikedaSan
  • 51
  • 5
  • Any help about this?? – ikedaSan Jan 23 '18 at 09:18
  • https://stackoverflow.com/questions/16263136/wso2-esb-dblookup-mediator-query-multiple-rows. I don't think it changed since then :) – Jan Jan 24 '18 at 08:36
  • I've followed the first option; developing a DSS a call out from a proxy. But when proxy calls to the endpoint, it allways shows INCOMPATIBLE_PARAMETERS_ERROR. The uri-template is like this: http://localhost:8280/services/DS_RN/oc/{uri.var.id} . What we make wrong? – ikedaSan Jan 25 '18 at 07:04
  • So you tested the DSS endpoint using SOAP-UI (or some other testclient) and that works? The error seems to refer to the fact that you are putting an INTEGER where it expects an STRING or something, but it is difficult to say without context. – Jan Jan 25 '18 at 08:57
  • Hi, thank you for your answers. I've tested the DSS and the restful service and both of them work fine. But when i send a soap message to the proxy service, and then it calls to the endpoint, it fails and return me back a error message like "Incompatible Parameters". – ikedaSan Jan 26 '18 at 10:05
  • Have you tried to enable 'apache.wire' logging? I don't see anything showing that you are using REST services. Could it be that you're service is expecting XML and you are sending JSON? – Jan Jan 27 '18 at 11:03

0 Answers0