Cant upload image image using apache cxf rs client
up vote
0
down vote
favorite
I am trying to upload an image to a webserver, the request requirements are as follows:
POST /assets/image/content
Content-Type: multipart/form-data; boundary=ExampleFormBoundary
Request Body
--ExampleFormBoundary
Content-Disposition: form-data; name="file"; filename="test.png"
Content-Type: image/png
{image file data bytes}
--ExampleFormBoundary--
I am using apache cxf rs client for my calls:
The client attachment-serializer adds Content-Transfer-Encoding: binary to my request body.
This additional header if failing my request could you please let me know how to remove This
header from the request body or override the serializer or use another serializer so that i
do not have this header in the request body. I can use another client but cxf is the requirement.
Request Body for my call:
Http-Method: POST
Content-Type: multipart/form-data; boundary="uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a"
Headers: {Authorization=[Basic ], Content-Encoding=[utf-8], Accept-Encoding=[utf-8], Accept=[application/json]}
Payload: --uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID:
Content-Disposition: form-data; filename=image.jpg
--uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a--
2018-11-14 17:32:44 INFO LoggingInInterceptor:253 - Inbound Message
ID: 1
Response-Code: 400
Encoding: ISO-8859-1
Thanks
apache cxf image-uploading eloqua eloqua-bulk-api
add a comment |
up vote
0
down vote
favorite
I am trying to upload an image to a webserver, the request requirements are as follows:
POST /assets/image/content
Content-Type: multipart/form-data; boundary=ExampleFormBoundary
Request Body
--ExampleFormBoundary
Content-Disposition: form-data; name="file"; filename="test.png"
Content-Type: image/png
{image file data bytes}
--ExampleFormBoundary--
I am using apache cxf rs client for my calls:
The client attachment-serializer adds Content-Transfer-Encoding: binary to my request body.
This additional header if failing my request could you please let me know how to remove This
header from the request body or override the serializer or use another serializer so that i
do not have this header in the request body. I can use another client but cxf is the requirement.
Request Body for my call:
Http-Method: POST
Content-Type: multipart/form-data; boundary="uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a"
Headers: {Authorization=[Basic ], Content-Encoding=[utf-8], Accept-Encoding=[utf-8], Accept=[application/json]}
Payload: --uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID:
Content-Disposition: form-data; filename=image.jpg
--uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a--
2018-11-14 17:32:44 INFO LoggingInInterceptor:253 - Inbound Message
ID: 1
Response-Code: 400
Encoding: ISO-8859-1
Thanks
apache cxf image-uploading eloqua eloqua-bulk-api
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to upload an image to a webserver, the request requirements are as follows:
POST /assets/image/content
Content-Type: multipart/form-data; boundary=ExampleFormBoundary
Request Body
--ExampleFormBoundary
Content-Disposition: form-data; name="file"; filename="test.png"
Content-Type: image/png
{image file data bytes}
--ExampleFormBoundary--
I am using apache cxf rs client for my calls:
The client attachment-serializer adds Content-Transfer-Encoding: binary to my request body.
This additional header if failing my request could you please let me know how to remove This
header from the request body or override the serializer or use another serializer so that i
do not have this header in the request body. I can use another client but cxf is the requirement.
Request Body for my call:
Http-Method: POST
Content-Type: multipart/form-data; boundary="uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a"
Headers: {Authorization=[Basic ], Content-Encoding=[utf-8], Accept-Encoding=[utf-8], Accept=[application/json]}
Payload: --uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID:
Content-Disposition: form-data; filename=image.jpg
--uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a--
2018-11-14 17:32:44 INFO LoggingInInterceptor:253 - Inbound Message
ID: 1
Response-Code: 400
Encoding: ISO-8859-1
Thanks
apache cxf image-uploading eloqua eloqua-bulk-api
I am trying to upload an image to a webserver, the request requirements are as follows:
POST /assets/image/content
Content-Type: multipart/form-data; boundary=ExampleFormBoundary
Request Body
--ExampleFormBoundary
Content-Disposition: form-data; name="file"; filename="test.png"
Content-Type: image/png
{image file data bytes}
--ExampleFormBoundary--
I am using apache cxf rs client for my calls:
The client attachment-serializer adds Content-Transfer-Encoding: binary to my request body.
This additional header if failing my request could you please let me know how to remove This
header from the request body or override the serializer or use another serializer so that i
do not have this header in the request body. I can use another client but cxf is the requirement.
Request Body for my call:
Http-Method: POST
Content-Type: multipart/form-data; boundary="uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a"
Headers: {Authorization=[Basic ], Content-Encoding=[utf-8], Accept-Encoding=[utf-8], Accept=[application/json]}
Payload: --uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID:
Content-Disposition: form-data; filename=image.jpg
--uuid:3a0341f0-584a-4f54-8e8e-bbe92048c96a--
2018-11-14 17:32:44 INFO LoggingInInterceptor:253 - Inbound Message
ID: 1
Response-Code: 400
Encoding: ISO-8859-1
Thanks
apache cxf image-uploading eloqua eloqua-bulk-api
apache cxf image-uploading eloqua eloqua-bulk-api
edited yesterday
Devon Guerrero
1515
1515
asked Nov 19 at 19:06
Sara
338
338
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Hassan, please delete this question. You left your credentials in the clear.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Hassan, please delete this question. You left your credentials in the clear.
add a comment |
up vote
0
down vote
Hassan, please delete this question. You left your credentials in the clear.
add a comment |
up vote
0
down vote
up vote
0
down vote
Hassan, please delete this question. You left your credentials in the clear.
Hassan, please delete this question. You left your credentials in the clear.
answered yesterday
Devon Guerrero
1515
1515
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381085%2fcant-upload-image-image-using-apache-cxf-rs-client%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown