Nullpointerexception in WSO2 DSS 3.0.0

Asked

Viewed 52 times

1

I am having problems in a Data Service in WSO2 DSS 3.0.0. If I execute the query directly in 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>

* I changed the Web Service data for confidentiality

  • this is the Stackoverflow in English, please translate your question.

  • 1

    I thought I was in the American Stack. Now yes, translated.

1 answer

0

I’ve 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>  

Browser other questions tagged

You are not signed in. Login or sign up in order to post.