[ http://wso2.org/jira/browse/WSAS-636?page=comments#action_13867 ] Charitha Kankanamge commented on WSAS-636: ------------------------------------------
Steps to reproduce: =============== 1. Select 'Define data service" 2. Enter service name and select RDBMS 3. Select a data base type and click ok 4. Click on 'Next' 5. Click on 'New Query' 6. Enter a query id 7. Enter a SQL statement 8. Enter 'Grouped by element' and 'Row name' in 'Result (Output Mapping)' section 9. Click on 'Add New Output mapping' 10. Enter a new output mapping and click ok Now you can see that the SQL statement disappears. > Data service invocation fails due to a NPE at client side (Response soap body > is blank) > --------------------------------------------------------------------------------------- > > Key: WSAS-636 > URL: http://wso2.org/jira/browse/WSAS-636 > Project: WSO2 WSAS > Issue Type: Bug > Components: data-services > Affects Versions: Nightly > Environment: winxp, jdk15, WSAS-2.2-QAbuild1 > Reporter: Charitha Kankanamge > Assigned To: sumedha rubasinghe > Priority: Blocker > > I couldn't invoke a simple data service either with REST or generated stub. > - The sample data service configuration is as follows. > <data name="Employeedataservice"> > <config> > <property > name="org.wso2.ws.dataservice.driver">com.mysql.jdbc.Driver</property> > <property > name="org.wso2.ws.dataservice.protocol">jdbc:mysql://localhost:3306/EmployeeDB</property> > <property name="org.wso2.ws.dataservice.user">root</property> > <property name="org.wso2.ws.dataservice.password">root</property> > </config> > <query id="Mtlaviniaemployees"> > <result element="employees" rowName="employee"> > <element name="name" column="name" /> > <element name="id" column="id" /> > <element name="address" column="address" /> > </result> > </query> > <operation name="getMtLaviniaEmployees"> > <call-query href="Mtlaviniaemployees" /> > </operation> > </data> > - Deploy this service in WSAS and generate ADB client > - Write a client > public class Client { > > public static void main(String[] args) throws AxisFault { > EmployeedataserviceStub stub = new > EmployeedataserviceStub("http://127.0.0.1:9763/services/Employeedataservice"); > EmployeedataserviceStub.GetMtLaviniaEmployees req = new > EmployeedataserviceStub.GetMtLaviniaEmployees(); > > try { > EmployeedataserviceStub.Employees res = > stub.getMtLaviniaEmployees(req); > System.out.println(res.getEmployee()[0]); > } catch (RemoteException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > } > - Run the client > following exception will be thrown at client side. > org.apache.axis2.AxisFault > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > at > org.wso2.wsas.client.EmployeedataserviceStub.fromOM(EmployeedataserviceStub.java:2210) > at > org.wso2.wsas.client.EmployeedataserviceStub.getMtLaviniaEmployees(EmployeedataserviceStub.java:178) > at Client.main(Client.java:14) > Caused by: java.lang.NullPointerException > at > org.wso2.wsas.client.EmployeedataserviceStub.fromOM(EmployeedataserviceStub.java:2204) > ... 2 more > ==================================================================================================================================== > Soap request > ------------------- > <?xml version='1.0' encoding='UTF-8'?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Body> > <ns1:getMtLaviniaEmployees > xmlns:ns1="http://ws.wso2.org/dataservice" /> > </soapenv:Body> > </soapenv:Envelope> > Soap response > ---------------------- > <?xml version='1.0' encoding='UTF-8'?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Body /> > </soapenv:Envelope> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://wso2.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Wsas-java-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
