• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

File type in xsd

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Your buns are mine! But you can have this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic