Ask a Question

How to get a file which is in a tag?

SOLVED
Clawzix
Occasional Contributor

How to get a file which is in a tag?

Hello,

 

Sorry, I don't speak english really well...

 

I made a request based on a wsdl, i was searching for a .zip file and I got it in a tag.

Please can you tell me how to make this file in a directory in my computer?

 

Thank you in advance!

Kind regards Clawzix.

 

@nmraoI know that you are helpfull for SoapUI users please help me if you can.. I need an answer as quick as possible..

16 REPLIES 16
nmrao
Community Hero

Not really sure what type of data inside that tag.
Try changing from
def inStream = new ByteArrayInputStream( zipContent.getBytes( 'UTF-8' ) )

to
def inStream = new ByteArrayInputStream( zipContent)


Regards,
Rao.
Clawzix
Occasional Contributor

@nmrao 

 

Sorry it does not work:

 

Capture.PNG

 

Regards,

Clawzix

nmrao
Community Hero

As you mention that it could save file, revert the change and check with your team why zip is corrupted.


Regards,
Rao.
nmrao
Community Hero

Have you not replaced
assert context.assert with assert context.response in line1 ?


Regards,
Rao.
Clawzix
Occasional Contributor

@nmrao 

 

thanks a lot for your help we will find out why this file is corrupted on our own.

 

Regards,

Clawzix.

Clawzix
Occasional Contributor

@nmrao 

I now know that the message in the tag "MessageZip" is encoded in Basic Binary 64 can you tell me how to write it on this line:

 

def inStream =  new ByteArrayInputStream( zipContent.getBytes( 'UTF-8' ) )

 

Regards,

Clawzix.

nmrao
Community Hero

Does the zip should contain single file or multiple files?


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: