views:

279

answers:

3

Hi,

I want to read file from client system, I have path of client system where our file is generated,

I want to use WSDL to do this functionality ... I am new to WSDL if any body already did please guide me how to read file from client system with WSDL ....

Any Help Appreciated ...

EDIT :- The requirement is like ... We have client code in client system which will generate xml file when client run the code. that xml file location we know like C://client/abc.xml I want to read that file from our web application. so for that I want to know that is WSDL is usefull or I can use simple FTP file read.

A: 

Does your client system publish its interface as a WSDL file ? If so, check out Apache Axis. wsdl2java can be used to generate your Java bindings.

Brian Agnew
If you do so, use AXIS1.X ! The version 2.X is broken and full of bugs. Apache CXF and Spring webservices are a lot better. Use axis only if you must.
Martin K.
We have one software which will generate files in client system. we know the location of the generated file in client system. We want to read that file from our running web-apps, and after every 10 mins we have to check client system to read newly generated file... So in given condition how to interface created file as a wsdl ... please provide some code ... I am new to WSDL ...
Bihag Raval
A: 

Provide more information. What kind of client system? With user interaction?

There are a lot different ways to "read it".

  • AMF
  • JMS
  • Webservices
  • Named Pipes (if client and server are deployed on the same logical os)
  • Files
  • Mail
  • HTTP (post/put)
  • Binary (Java RMI ...)

.....

So: What kind of system?

Martin K.
We have one software which will generate files in client system. we know the location of the generated file in client system. We want to read that file from our running web-apps, and after every 10 mins we have to check client system to read newly generated file. We want to use WSDL ( Webservices ).
Bihag Raval
+1  A: 

Well, you certainly do seem in need of some direction. WSDL isn't a technology you'll use to 'read a file', or anything else for that matter.

A WSDL, Web Service Definition Language, is a file that defines a service provided. Where it's located, the methods available, what they accept as input, what the return is, how to encode the data exchanged, what protocols to use as transport, and possibly alot more.

Moreover, I think that if all you want to do is read a file remotely, SOAP isn't the way to go. Were you to go SOAP, you would most likely use HTTP as transport, why not go directly with a simple GET? You're just trying to read a file here. REST is what you want.

Nevertheless, you do insist on using WSDL, SOAP or another overly complex scheme to read a remote file, here are a few links that will prove helpful.

  1. W3 Schools Soap tutorial
  2. W3 Schools WSDL tutorial
  3. W3 Schools XML Schema tutorial
  4. PHP's Soap extension
  5. Apache's Axis 2
  6. Wikipedia's page on SOAP
  7. W3's SOAP Specification page, fun fun!
  8. Google!
Leprechaun
Thanks for explaining ... do you have any code how to implement rest to read file from client system ...
Bihag Raval
<?php$Return = file_get_contents( "http://hostname.domain.tld/path/to/your/ressource" );?>HTTP/1.1 GET /path/to/your/ressourceThat's as simple as it gets :) Don't get me wrong, I'm a fan of SOAP, and don't actually use REST often, there are much better ways to go RESTful than just doing a simple GET, i'm sure. Frameworks that will parse your URIs, evaluate responses etc ...
Leprechaun
JAX i believe does REST for java.
Leprechaun