2007/05/30
Link REST versus SOAP
REST versus SOAP - the REST story
http://searchwebservices.techtarget.com/tip/0,289483,sid26_gci1227190,00.html
REST versus SOAP - the SOAP story
http://searchwebservices.techtarget.com/tip/0,289483,sid26_gci1231889,00.html
Chinese Version
http://searchwebservices.techtarget.com.cn/comment/425/2707925_1.shtml
http://searchwebservices.techtarget.com.cn/comment/28/3026028.shtml
http://searchwebservices.techtarget.com/tip/0,289483,sid26_gci1227190,00.html
REST versus SOAP - the SOAP story
http://searchwebservices.techtarget.com/tip/0,289483,sid26_gci1231889,00.html
Chinese Version
http://searchwebservices.techtarget.com.cn/comment/425/2707925_1.shtml
http://searchwebservices.techtarget.com.cn/comment/28/3026028.shtml
Change Smartphone Video Preferences
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\ASFCodecs\Video
Clear Windows Media Player 10 already established history.
Privacy tab of Tools > Options > Clear Cache button
Clear Windows Media Player 10 already established history.
Privacy tab of Tools > Options > Clear Cache button
How to Sync Google Calendar with Outlook and Smartphones Automatically
remotecalendars
http://remotecalendars.sourceforge.net/
http://remotecalendars.sourceforge.net/
java join and split
I did implement it in my many projects. Because of my common library is not a part of the java standard, I have to write it each time. I think many people must have almost the same experience.
for guys who have an old JDK, the split function doesn't exist prior to jdk1.3. The alternative is the following, using the StringTokenizer class
instead of
use
reference:
the enhancement require to sun
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5015163
public static String join( String token, String[] strings )
{
StringBuffer sb = new StringBuffer();
for( int x = 0; x < ( strings.length - 1 ); x++ )
{
sb.append( strings[x] );
sb.append( token );
}
sb.append( strings[ strings.length - 1 ] );
return( sb.toString() );
}
for guys who have an old JDK, the split function doesn't exist prior to jdk1.3. The alternative is the following, using the StringTokenizer class
instead of
String line_fields[]=line_data.split("\\t");
use
StringTokenizer line_fields = new StringTokenizer(line_data,"\t");
reference:
the enhancement require to sun
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5015163
2007/05/29
Link Ajax and REST
Part One
http://www.ibm.com/developerworks/web/library/wa-ajaxarch/?S_TACT=105AGX52&S_CMP=cn-a-web
Part Two
http://www.ibm.com/developerworks/web/library/wa-ajaxarch2.html
http://www.ibm.com/developerworks/web/library/wa-ajaxarch/?S_TACT=105AGX52&S_CMP=cn-a-web
Part Two
http://www.ibm.com/developerworks/web/library/wa-ajaxarch2.html
Link Crossing borders: REST on Rails
Create: HTTP put
Read: HTTP get
Update: HTTP post
Delete: HTTP delete
Listing 6. Rendering HTML for a JavaScript client
def list
# wants is determined by the http Accept header in the request
@people = Person.find_all
respond_to do |wants|
wants.html
wants.js
wants.xml { render :xml => @people.to_xml }
end
end
Listing 8. Invoking the service from Ruby
require 'net/http'
Net::HTTP.start('localhost', 3000) do |http|
response = http.get('/people/list', 'Accept' => 'text/xml')
#Do something with the response.
puts "Code: #{response.code}"
puts "Message: #{response.message}"
puts "Body:\n #{response.body}"
end
Listing 9. Invoking the service with Java code
package com.rapidred.ws;
import java.net.*;
import java.io.*;
public class SimpleGet {
void get() {
try {
URL url = new URL("http://localhost:3000/people/list");
URLConnection urlConnection = url.openConnection();
urlConnection.setRequestProperty("accept", "text/xml");
BufferedReader in =
new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
String str;
while ((str = in.readLine()) != null) {
System.out.println(str);
}
in.close();
}
catch (Exception e) {
System.out.println(e);
}
}
Listing 10. Calling HTTP post with Java code
void post() {
try {
String xmlText = "" + ";
"Maggie " +
"Maggie " +
"maggie@tate.com " +
"
URL url = new URL("http://localhost:3000/people/create");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "text/xml");
OutputStreamWriter wr = new
OutputStreamWriter(conn.getOutputStream());
wr.write(xmlText);
wr.flush();
BufferedReader rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
System.out.println(line);
}
wr.close();
rd.close();
} catch (Exception e) {
System.out.println("Error" + e);
}
}
dbput data transfer 3.1
|
|
Supported databases:
- Oracle 10G, 9i, 8i, 8.0.x and 7.x
- MySQL 5.0, 4.1, 4.0., 3.23 and earlier
- Microsoft SQL Server 2000, 7.0 and 6.5
- IBM DB2 8.1, 7.2, 6.1 and earlier
- Informix 9.3, 7.3 and earlier
- Microsoft Access 2000, 97, 95 and 2.0
- dBase, FoxPro, Excel, Paradox,
- Sybase Adaptive Server Anywhere
- Sybase SQL Anywhere
- Sybase Adaptive Server Enterprise
- Interbase, Pervasive.SQL and any other ODBC-compliant database
- Text file
- HTML file
- Excel spreadsheet
- SYLK (Symbolic Link)
- DIF (Data Interchange Format)
- Lotus 1-2-3 file
- QuattroPro file
- XML file
- Rich Text format
- SPSS format
- Adobe Acrobat Document(pdf)
- LDAP/Lightweight Data Interchange Format
Support different databases and data type.
- Read:Oracle, SYBASE, DB2, SQLServer, Informix, Interbase, Access, MySQL, dbf, Foxpro, Paradox, text file.
- Write:Oracle, SYBASE, DB2, SQLServer, Informix, Interbase, Access, MySQL, dbf, Foxpro, Paradox, Text, HTML, Excel, SYLK, DIF, Lotus 1-2-3, QuattroPro, XML, RTF, SPSS, PDF, LDAP.
- Support many data type: character string, integer, floating-point, bool, and datetime type.
DBPut runs on Microsoft Windows 98/ME/2000/XP/2003
Subscribe to:
Posts (Atom)