DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `nillTest`(IN p_Id VARCHAR(20))
BEGIN
if(p_Id is null) then
select "null=" as durum;
else
select p_Id as durum;
end if;
END $$
<body>
<p:getNil xmlns:p="http://ws.wso2.org/dataservice">
<!--0 to 1 occurrence-->
<xs:deger xmlns:xs="http://ws.wso2.org/dataservice">NULL</xs:deger>
</p:getNil>
</body>
instead of message body use like below message body;
<body>
<p:getNil xmlns:p="http://ws.wso2.org/dataservice">
</p:getNil>
</body>
CREATE DEFINER=`root`@`%` PROCEDURE `nillTest`(IN p_Id VARCHAR(20))
BEGIN
if(p_Id is null) then
select "null=" as durum;
else
select p_Id as durum;
end if;
END $$
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http:///org/wso2/carbonstudio/eclipse/ds" name="NilTest">
<config id="ConfigName">
<property name="org.wso2.ws.dataservice.driver">com.mysql.jdbc.Driver</property>
<property name="org.wso2.ws.dataservice.protocol">jdbc:mysql://localhost:3306/myDBName?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8</property>
<property name="org.wso2.ws.dataservice.user">root</property>
<property name="org.wso2.ws.dataservice.password">12345</property>
<property name="org.wso2.ws.dataservice.minpoolsize">10</property>
<property name="org.wso2.ws.dataservice.maxpoolsize">100</property>
<property name="org.wso2.ws.dataservice.autocommit">false</property>
<property name="org.wso2.ws.dataservice.validationquery">SELECT 1</property>
</config>
<query id="QRY_NIL" useConfig="ConfigName">
<sql>call nillTest(?)</sql>
<result element="TESTS" rowName="TEST" defaultNamespace="">
<attribute name="inParameter" column="inParameter" xsdType="xs:string"/>
</result>
<param name="deger" sqlType="STRING" defaultValue="#{NULL}" ordinal="1" paramType="SCALAR"/>
</query>
<operation name="getNil">
<call-query href="QRY_NIL">
<with-param name="outParameter" query-param="outParameter"/>
</call-query>
</operation>
</data>
<body>
<p:getNil xmlns:p="http://ws.wso2.org/dataservice">
<!--0 to 1 occurrence-->
<xs:deger xmlns:xs="http://ws.wso2.org/dataservice">NULL</xs:deger>
</p:getNil>
</body>
instead of message body use like below message body;
<body>
<p:getNil xmlns:p="http://ws.wso2.org/dataservice">
</p:getNil>
</body>
Comments
Post a Comment