Pergunta

I have a Data Service created in WSO2 DSS, this DS inserts a new register into a table from a DataBase(Oracle DB) and everything is fine until then; but in that table some of the fields are declared as nullable, so when I try to insert null values from the DSS "try it" tool, it doesn't allow me to do so.

How can I set those fields as nullable in the Data Service?

Foi útil?

Solução 2

thanks for answering @Chris, i found a solution wich is calling a PROCEDURE from Oracle DB

Outras dicas

Try adding the nil attribute to the element you wish to null in the "try it" request. An example would be:

<body>
   <p:Test xmlns:p="http://ws.wso2.org/dataservice" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <p:ID>1</p:ID>
      <p:EmptyField xsi:nil="true"/>
   </p:Test>
</body>

In this case I am setting the EmptyField value to nil="true" and the service is inserting a NULL value for me in the database. It is working this way with an MS SQL server I have. Unfortunately, I don't have access to an Oracle DB server.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top