Title: Cannot set Content ID in SOAPPart

Hi all,

I am developing an application and my application needs to set the Content ID of the SOAPPart object.
But after I set the value, when I send the SOAPMessage object to the server, the Content ID is always a different value from the value that I set.

When I use the SUN's reference implementation for SAAJ, this problem does not exist at all.
Please advise if this is a bug in AXIS's implementation of SAAJ.
Thanks for all the advice.

Here is a sample of the code:

    // Create a Submit Request SOAP message
    MessageFactory mf = MessageFactory.newInstance();
    SOAPMessage replyMsg = mf.createMessage();

    SOAPPart sp = replyMsg.getSOAPPart();
    sp.setContentId("Test");

Here is the output (the value in start is set by my application but it is different from the content id of the first body part):

    POST /vas_soap HTTP/1.1
    Content-Type: multipart/related; boundary="----=_Part_0_18179071.1111567193399"; type="text/xml"; charset="utf-8"; start="Test"

    Connection: Close
    SOAPAction: ""
    Authorization: Basic NsadsadTAwMDQxOjA3T0NUMTAyNw==
    User-Agent: Jakarta Commons-HttpClient/2.0.2
    Host: x.x.x.x:xxx
    Content-Length: 2059


    ------=_Part_0_18179071.1111567193399
    Content-Type: text/xml; charset=UTF-8
    Content-Transfer-Encoding: binary
    Content-Id: <7181FBDDA0E832D9B89024664F34D579>

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

     <soapenv:Header>
    ….


Regards,
Gilbert Tan

Reply via email to