File is not a type that can be transferred over WS; it has meaning only on the machine where it is defined. You need to define a method that returns the actual file contents in a way that's compatible with SOAP, e.g. a base-64-encoded String of the byte[] of the file contents.

ashok ballu
Ranch Hand

Joined: Sep 17, 2007
Posts: 30

posted Jul 25, 2008 02:35:00

0

Thank you ,

could please try to give any sample example for sending file, because I am new to SOA

Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958

73

posted Jul 25, 2008 02:42:00

0

If the approach I outlined isn't what you're looking for, you might want to read the articles "Transferring files over a web service" and "Sending SOAP attachments with JAX-RPC" that are linked in the http://faq.javaranch.com/java/WebServicesFaq

Originally posted by pradeep jaladi: If you are using Axis for web services. you can use DataSource.

You need to be more specific. A DataSource class exists in both the javax.sql and javax.activation packages. While only the latter makes sense in this context, the connection to Axis still isn't clear - please provide mode details about the solution you're proposing.