pascalSoap
12 years agoOccasional Contributor
Pbe when attaching file in a groovy program
Hello,
I need to attach a file to a soap request and need it to be written in a groovy function (in order to parametrize it)
I've written this :
....
def attachment = request.attachFile( filetostore, false )
attachment.contentType = "application/octet-stream"
attachment.setPart( "1243918435607" )
....
It doesn't work ; more precisely, the attachment seems to have worked but not the request : see the "Attachments.doc", it's all OK :
But the error I'm getting when running the request is :
"....
Unexpected error during document transfer Content is not allowed in prolog
...."
Can someone help me to solve the problem ?
I need to attach a file to a soap request and need it to be written in a groovy function (in order to parametrize it)
I've written this :
....
def attachment = request.attachFile( filetostore, false )
attachment.contentType = "application/octet-stream"
attachment.setPart( "1243918435607" )
....
It doesn't work ; more precisely, the attachment seems to have worked but not the request : see the "Attachments.doc", it's all OK :
But the error I'm getting when running the request is :
"....
Unexpected error during document transfer Content is not allowed in prolog
...."
Can someone help me to solve the problem ?