0

I have this existing web service develop in C# (https://www.myCompanyDomain.com.ph/ProjectName/lfsapi/loanapplication) it returns json format for both Get and Post.

Here is my controller code:

    public class LoanApplicationController : ApiController
    {
        // GET: api/LoanApplication
        //public IEnumerable<string> Get()
        //{
        //    return new string[] { "value1", "value2" };
        //}

        // GET: api/LoanApplication/5
        public ArrayList Get()
        {
            LoanApplicationDAO appDAO = new LoanApplicationDAO();
            ArrayList arrObj = new ArrayList();
            arrObj = appDAO.LoanApplicationFields();
            if (arrObj == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound));
            }

            return arrObj;
        }

        // POST: api/LoanApplication
        public LFSResponse Post([FromBody]LoanApplication value)
        {
            LoanApplicationDAO appDAO = new LoanApplicationDAO();
            LFSResponse response = new LFSResponse();
            //string res = "";

            ...some code here, to make code shorter

            return response;
        }
}

In my WSO2 ESB Management Console I created proxy service then PASS THROUGH SERVICE, please see attached image.

Proxy Service Configuration

And when the service create, it returns error

PLEASE SEE IMAGE FROM LINK

i.stack.imgur.com/XEF3O.png

How can I possibly fix this issue? Am I missing something?

Any help will do, THANK YOU!

Community
  • 1
  • 1
sdu9
  • 3
  • 3

1 Answers1

0

Since this is not a SOAP service and it is a REST service you should use the HTTPEndpoint

<endpoint>
    <http uri-template="URI Template" method="GET" />
</endpoint>
Asitha
  • 51
  • 3