Thanks! 

Sendt fra min iPhone

> Den 23. des. 2014 kl. 21.43 skrev Oleg Kalnichevski <ol...@apache.org>:
> 
>> On Tue, 2014-12-02 at 12:55 +0100, Stefan Magnus Landrø wrote:
>> Hi,
>> 
>> I had a go with 4.4-b1.
>> 
>> I need to generate a header similar the following:
>> 
>> Content-Type: multipart/related; type="application/soap+xml";
>> boundary="----=_Part_2_6825397.1130520599536"
>> 
>> I achieved that by doing a
>> 
>> HttpEntity reqEntity =
>> MultipartEntityBuilder.create().setMimeSubtype("related;
>> type=\"application/soap+xml\"")
>> 
>> It would be nice if one could add parameters (e.g. "type" in my scenario,
>> "start" is another one) in a cleaner way.
> 
> Fixed in r1647648
> 
> http://svn.apache.org/r1647648
> 
> Oleg
> 
>> In addition it would be nice if one could better control the headers at the
>> entity level. For instance, it is necessary to be able to add
>> the Content-ID header in order to create a valid SOAP with attachments
>> request.
>> 
>> Right now I use
>> .addPart("attachment", attachment)
>> 
>> but the "name" parameter (i.e. attachment) makes no sense when it comes to
>> SOAP (Content-Disposition header is not used at all).
>> 
>> It think it would be better with an api that looks something like this:
>> 
>> ContentBody attachment = new InputStreamBody(inputStream,
>> contentType).addHeader("Content-ID", "uuid").addHeader(...);
>> .addPart(attachment)
>> 
>> Cheers,
>> 
>> Stefan
>> 
>> 
>> 2014-12-02 11:03 GMT+01:00 Oleg Kalnichevski <ol...@apache.org>:
>> 
>>>> On Tue, 2014-12-02 at 10:48 +0100, Stefan Magnus Landrø wrote:
>>>> Hi there,
>>>> 
>>>> I see the MultipartEntityBuilder is rather limited in functionality (I'm
>>>> trying to create a soap with attachments request - EBMS style)
>>>> 
>>>> For instance, it is currently impossible to set the subtype.
>>> 
>>> Please have a look at the latest 4.4. It is possible as of 4.4b1.
>>> 
>>>> There are
>>>> other missing features too.
>>>> 
>>>> Is it ok to provide pull request over at github?
>>> 
>>> It always is.
>>> 
>>> Oleg
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
>>> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to