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.
– William Pereira
I thought I was in the American Stack. Now yes, translated.
– Andre Borgonovo