• Post Reply Bookmark Topic Watch Topic
  • New Topic

File type in xsd

 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Sorry if this is not the right forum.

Need to pass a file from one system to another using XML. How will I declare the type for file in xsd?

We tried base64Binary as below



But the overhead of using base64 encoding is an over kill for our application.

Thanks for any help.

Jiju
 
Tim Moores
Saloon Keeper
Posts: 3261
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOAP is not a good way to transfer files; why do you want to go that route? You could transfer the file by any number of ways specifically geared towards file transfer, and if needed send a SOAP message with a reference to the file upload.

How big are the files? base64 is computationally not that expensive, if that causes problems then something else may be amiss.
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could transfer the file by any number of ways specifically geared towards file transfer,

We are using REST web services. We are passing some other data along with the file. Hence it will be an HTTP POST method rather than an HTTP PUT.

How big are the files?

File size is arbitrary and is based on user volume. At present we are expecting it to be between 500KB and 50MB.

and if needed send a SOAP message with a reference to the file upload.

How will the xsd look like in this case? Can you please elaborate on various options in representing the File?

Thanks for the reply.
 
Tim Moores
Saloon Keeper
Posts: 3261
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XSD is used for SOAP WS, not RESTful WS. Are you using the SOAP message format merely for encapsulating data? Then there are indeed better approaches, not least a straight HTTP file upload (along with which you can send other parameters).

and if needed send a SOAP message with a reference to the file upload.
How will the xsd look like in this case? Can you please elaborate on various options in representing the File?

If the file was uploaded by some other means (FTP, SCP, HTTP file upload, WebDAV, ...) the SOAP would just contain the name of the file and where and when it was uploaded, so that the receiving end would know where to look for it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!