Forum Discussion

pascalSoap's avatar
pascalSoap
Occasional Contributor
12 years ago

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 ?

1 Reply

  • pascalSoap's avatar
    pascalSoap
    Occasional Contributor
    The problem seems to occur systematically with Soap UI 3.6.1. But it doesn't occur at all with Soap UI 4.5
    (these versions are the only ones I can install on my PC in my company)

    -> So I will use Soap UI 4.5 (but still interested to have an explanation to the problem with Soap UI 3.6.1)