While I am trying to deploy a new application into the domain using BW Agent REST API, it requires the ear file to be uploaded first. when I am trying to upload an .ear file generated, but this POST call is failing with HTTP 415 error. This REST API is trying to POST an EAR file for which something is wrong about the headers.
http://localhost:8079/bw/v1/domains/MYDOMAIN/archives?replace=true
Content-type=application/octet-stream
the error in the bwagent log file is
2019-04-01 10:10:37.732 WARN [qtp2022768790-59] o.g.jersey.servlet.WebComponent - A servlet request to the URI http://localhost:8079/bw/v1/domains/Test/archives?file=file%3AC%3A%5CUsers%5Ceilmmpw%5CDocuments%5CProcess.Stub.application_1.0.0.ear contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.
I tried with Content-Type=multipart/form-data and attaching the ear file, but it failed with HTTP 500 error with errors in the agent log file
2019-04-09 10:18:50.819 WARN [qtp1124804249-81] o.e.jetty.servlet.ServletHandler - javax.servlet.ServletException: java.lang.NullPointerException at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:485) ~[jersey-container-servlet-core-2.21.1.jar:na]