NullPointerException in WSO2 DSS 3.0.0

1

I'm having problems with a Data Service in WSO2 DSS 3.0.0. If you run the query directly on the database no error happens. The database is a Sybase 12. Could someone help?

DBS

<data name="DSProgram" serviceNamespace="http://myschema.org.br">
<config id="ProgramDS">
  <property name="carbon_datasource_name">ProgramDS</property>
</config>
<query id="updateProgram" useConfig="ProgramDS">
  <sql>update aca..program set name = :name, endingdate = (case when :endingdate = '' then null else :endingdate) where course = :course</sql>
  <param name="name" sqlType="STRING"/>
  <param name="endingdate" sqlType="STRING"/>
  <param name="course" sqlType="INTEGER"/>
</query>
<operation name="updateProgram">
  <call-query href="updateProgram">
     <with-param name="name" query-param="name"/>
     <with-param name="endingdate" query-param="endingdate"/>
     <with-param name="course" query-param="course"/>
  </call-query>
</operation>
</data>

SOAP Envelope

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://myschema.org.br">
<soapenv:Header/>
<soapenv:Body>
  <int:updateProgram>
     <int:name>Course name</int:name>
     <int:endingdate></int:endingdate>
     <int:course>999</int:course>
  </int:updateProgram>
</soapenv:Body>
</soapenv:Envelope>

SOAP Fault

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <soapenv:Fault xmlns:axis2ns1820="http://ws.wso2.org/dataservice">
     <faultcode>axis2ns1820:DATABASE_ERROR</faultcode>
     <faultstring>DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: DSProgram
Location: /DSProgram.dbs
Description: N/A
Default Namespace: http://myschema.org.br
Current Request Name: updateProgram
Current Params: {endingdate=, course=999, name=Course name}
Nested Exception:-
java.lang.NullPointerException</faultstring>
     <detail>
        <axis2ns1819:DataServiceFault xmlns:axis2ns1819="http://ws.wso2.org/dataservice">DS Fault Message: Error in DS non result invoke.
DS Code: DATABASE_ERROR
Nested Exception:-
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'SQLQuery.processNormalQuery'
DS Code: DATABASE_ERROR
Source Data Service:-
Name: DSProgram
Location: /DSProgram.dbs
Description: N/A
Default Namespace: http://myschema.org.br
Current Request Name: updateProgram
Current Params: {endingdate=, course=999, name=Course name}
Nested Exception:-
java.lang.NullPointerException</axis2ns1819:DataServiceFault>
     </detail>
  </soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

* Changed the Web Service data for confidentiality

    
asked by anonymous 12.05.2015 / 19:18

1 answer

0

I already used this query as follows:

   <query id="UPDATE_DEMONSTRATION" useConfig="C_CONFIG">
      <sql>call PR_UPDATE_STATUS(?,?,?,?)</sql>
      <param name="messageid"   ordinal="1"  sqlType="INTEGER"/>
      <param name="status"      ordinal="2"  sqlType="STRING"/>
      <param name="errorCode"   ordinal="3"  sqlType="STRING" type="OUT"/>
      <param name="errorMessage"   ordinal="4"  sqlType="STRING" type="OUT"/>
      <result element="UPDATE_DEMONSTRATIONResponse" rowName="">
         <element column="v_ERRORCOD" name="errorCode" xsdType="string"/>
         <element column="v_ERRORMSG" name="errorMsg"  xsdType="string"/>
     </result>
   </query>  
    
28.12.2015 / 17:52