Not able to send attachments by using MTOM/XOP to other application.


I am tring to send attachments thru MTOM/XOP to Service Manager application. I got WSDL with soap 1.2 complaint and created WSD in webMethods and changed the property -Attachment enabled of WSD to true.

And now I am using getFile service to get file and reading it as bytes and passing parameters below to connector to send request to Service Manager-

body - bytes(getFile output as bytes)
contentType - text/xml
name - abcd

I can see on service manager side, reqeust is coming but there is no attachment.

When i m trying to update only some fields, it is updating properly, but when I am giving attachment details it is not updating anything to service manager.

it will be great help if anybody can give any clue and please feel free to ask anything if you need.

Thanks in advance.


I got the catch of it…actually earlier I was not any encoding after reading a file and now I am encoding a content of file thru base64Encode and putting this data to body field and now it is attaching the attachment…that is good thing …

But still have one more issue…I can open text files on service manager which was attached thru MTOP/XOP via webmethods, but when I am attaching pdf or some other format of file, file is got attached, that is good, but not able to open them and when opening, getting a error “The file is damaged and could not be repaired” and now I stuck here…
Any suggestions please…