0 Replies Latest reply on Sep 5, 2013 2:08 AM by Allen Sandiego

    Rest - Post using URI instead of Http Header

    Allen Sandiego

      Hi,

       

      I've successfully created a Restful Web Service in SQL Workshop. Added a Post Handerl and has 4 IN URI parameters. Below is my pl/sql block.

       

      declare

        l_id number;

      begin

        select nvl(max(id),0) + 1

          into l_id

          from guest_book;

       

        insert into guest_book ( id, name, email, subject, message)

        values ( l_id, :name, :email, :subject, :message );

       

        :retcode := 201;

        :errbuff := l_id;

      end;

       

      My parameters are as follows:

       

      NameBind Variable NameAccess MethodSource TypeParameter Type
      X-APEX-FORWARDerrbuffOUTHTTP HeaderString
      X-APEX-STATUS-CODEretcodeOUTHTTP HeaderInteger
      emailemailINURIString
      messagemessageINURIString
      namenameINURIString
      subjectsubjectINURIString

      I've created a web service reference for this post handler and have added 4 REST Input Parameters of Input Type: Name Value Paris. Parameters are as follows:

       

      Name / Type

      name / string

      email / string

      subject / string

      message / string

       

      Now I have created an application and a form on a web service reference using this as reference but when I submit the form it adds a record and populates only the ID field and the rest of the field is null.

       

      Is there anything I missed?

       

      Appreaciate any help.

       

      Thanks,

      Allen