DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15575>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15575

cid: prefix on returned attachments confuses MS SOAP Toolkit 3.0

           Summary: cid: prefix on returned attachments confuses MS SOAP
                    Toolkit 3.0
           Product: Axis
           Version: 1.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


cid: prefix on returned attachments confuses MS SOAP Toolkit 3.0

My attempts to communicate with AXIS (server) using MS SOAP Toolkit 3.0 
(client) using attachments were unsuccessful.  I could successfully send an 
attachment (DIME) to AXIS but the client would never successfully accept a 
returned attachment.

The referenced attachment that AXIS sends back (say, with the 
urn:EchoAttachmentsService) to the client has an "href" attribute in the body 
that looks something like...

cid:987623414253512151413145151

The actual DIME attachment has an ID that does *not* have the "cid:"; prefix.  
It appears that the MS SOAP Toolkit 3.0 is confused by this since it is 
expecting a "more proper" match (not sure exactly what matching algorithm it 
uses here).

In order to get this to work, I had to change...

org\apache\axis\attachments\AttachmentPart.java

as follows...

    public String getContentIdRef() {
      // Original version.
      //return Attachments.CIDprefix + getContentId();

      // The below version allows MSSOAP Tookit 3.0 to work.  They get confused 
because
      // the href attribute has something like "cid:1234...."; but the 
attachment itself
      // just has 1234... *without* the cid: prefix.
      return getContentId();
    }


I compiled just this file and placed its .class file in...

<axis-install>\webapps\axis\WEB-INF\classes\org\apache\axis\attachments

After restarting Tomcat, this altered .class file kicked in and produced 
responses without the "cid:"; prefix.

This allowed me to write "MS SOAP Toolkit 3.0" clients that could read 
referenced attachments in a SOAP response from AXIS.

Microsoft seems to use a prefix of "uuid:" but they use it both in the href 
attribute and in the attachment id whereas AXIS uses "cid:"; in the href 
attribute but not in the attachment id.

I don't know much about the meaning of the "cid:"; prefix but, if you want 
outgoing attachments to work with "MS SOAP Toolkit 3.0", I think the only 
options are to remove the "cid:"; prefix in the href attribute OR include 
the "cid:"; prefix in the attachment id.

Reply via email to