- if (p.httpMethod == HttpMethod.POST) {
- response = invocationBuilder.post(Entity.entity(data, tt));
- } else if (p.httpMethod == HttpMethod.PUT) {
- response = invocationBuilder.put(Entity.entity(data, tt));
- } else {
- throw new SvcLogicException("Http operation" + p.httpMethod + "not supported");
- }
- } catch (ProcessingException e) {
- throw new SvcLogicException(requestPostingException + e.getLocalizedMessage(), e);
- }
-
- r.code = response.getStatus();
- r.headers = response.getStringHeaders();
- EntityTag etag = response.getEntityTag();
- if (etag != null) {
- r.message = etag.getValue();
- }
- if (response.hasEntity() && r.code != 204) {
- r.body = response.readEntity(String.class);
+ OutputStream os = con.getOutputStream();
+ os.write(data);
+ os.flush();
+ os.close();
+ } catch (ProtocolException e) {
+ continue100failed = true;