A command line tool for getting or sending files using URL syntax.
Since cURL uses libcurl, it supports a range of common Internet protocols, currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS, DICT, TELNET, FILE, IMAP. POP3, SMTP and RTSP.
The name of the project is a play on 'Client for URLs', originally with URL spelled in uppercase to make it obvious it deals with URLs. The fact it can also be pronounced 'see URL' also helped; it works as an abbreviation for "Client URL Request Library" or the recursive version: "Curl URL Request Library". Distributed under the MIT License, cURL is free software.
Basic use of cURL involves simply typing curl at the command line, followed by the URL of the output to retrieve.
To retrieve the example.com homepage, type:
curl http://www.google.com.au
cURL defaults to displaying the output it retrieves to the standard output specified on the system (usually the terminal window). So running the command above would display the source-code of the google.com.au homepage.
cURL can write the output it retrieves to a file with the -o flag, thus:
curl -o example.html www.example.com
A practical example is the cURL for testing the twitter api like posting the tweet (status) as below:
curl -u username:password http://api.twitter.com/1/direct_messages.xml
Quickest way to download files:
eg: curl -o j2ee-6.pdf http://java.sun.com/javaee/6/docs/tutorial/doc/JavaEETutorial.pdf
PS: this is indeed a good doc ;)
Wednesday, April 14, 2010
FastInfoset (FI) - 'binary' webservice
The key idea is that the speed of marshalling and unmarshalling content can be improved by moving away from a textual markup language to a binary one. It aims to provide more efficient serialization than the text-based XML format. In short, it adopts concept of Binary XML.
This is done at the expense of human readability or accessibility. No longer can you look at messages through a logging proxy server. No longer can you write normative 'correct' requests and responses to XML files in your SCM repository, run ant's over them and check that your XSD matches expectations.
As such, it is firmly in the camp of XML is a detail end users don't need to care about, which is not far behind WSDL and XSD are things the toolkit handles for you. It is also not XML, not in its classic sense.
One can think of FI as gzip for XML, though FI aims to optimize both document size and processing performance, whereas gzip optimizes only the size. While the original formatting is lost, no information is lost in the conversion from XML to FI and back to XML.
Between nodes that support it, FastInfoset may deliver tangible speedups through improvements in parse time. This may be at the expense of flexibility, but if the endpoint is written in a contract-last form, there is usually little flexibility in there anyway. Few Java methods are set up to deal with arbitrary amounts of incoming XML content, especially in unknown schemas, so will not be any less flexible by adopting FastInfoset.
Concerns & Facts:
There are no intellectual property restrictions on its implementation and use.
A common misconception is that FI requires ASN.1 tool support. Although the formal specification uses ASN.1 formalisms, ASN.1 tools are not required by implementations.
The other issue with FastInfoset is security. Whoever implements the parser had better design it to resist malicious content.
Genuine sacrifice would human readability and xml schema validation.
Reference Implementation
A Java implementation of the FI specification [http://fi.dev.java.net/] is available as part of the GlassFish project. The library is open source and is distributed under the terms of the Apache License 2.0. Several projects use this implementation, including the reference implementation for JAX-RPC and JAX-WS
About Performance
In addition to a significant reduction in document size of Fast Infoset with respect to standard XML 1.0, SAX-type parsing performance of Fast Infoset is much greater than parsing performance of XML 1.0. Typical increases in parsing speed observed for the reference Java implementation are a factor of 10 compared to Java Xerces, and a factor of 4 compared to the Piccolo driver (one of the fastest Java-based XML parsers)
Typical Applications
* Portable Devices - With mobile devices typically having access to low bandwidth data connections, and have slower CPUs. This can make Fast Infoset a better choice, lowering both data transmission and data processing times.
Persisting Large Volumes of Data - When persisting XML either to file or a database, the volume of data your system produces can often get out of hand. This has a number of detrimental effects; the access times go up as you're reading more data, CPU load goes up as XML data takes more effort to process, and your storage costs go up. By persisting your XML data in Fast Infoset format, it is possible to reduce the data volume by up to 80 percent.
Passing XML via the internet - As soon as an application starts passing information over the internet, one of the main bottlenecks is bandwidth. If you send reasonable chunks of data, this bottleneck can seriously degrade the performance of your client applications and limit your server's ability to process requests. Reducing the amount of data moving across the internet reduces the time it takes a message to be sent or received, while increasing the number of transactions a server can process per hour.
Supporting Java WS Stacks:
Metro, Axis2 & CXF
This is done at the expense of human readability or accessibility. No longer can you look at messages through a logging proxy server. No longer can you write normative 'correct' requests and responses to XML files in your SCM repository, run ant's over them and check that your XSD matches expectations.
As such, it is firmly in the camp of XML is a detail end users don't need to care about, which is not far behind WSDL and XSD are things the toolkit handles for you. It is also not XML, not in its classic sense.
One can think of FI as gzip for XML, though FI aims to optimize both document size and processing performance, whereas gzip optimizes only the size. While the original formatting is lost, no information is lost in the conversion from XML to FI and back to XML.
Between nodes that support it, FastInfoset may deliver tangible speedups through improvements in parse time. This may be at the expense of flexibility, but if the endpoint is written in a contract-last form, there is usually little flexibility in there anyway. Few Java methods are set up to deal with arbitrary amounts of incoming XML content, especially in unknown schemas, so will not be any less flexible by adopting FastInfoset.
Concerns & Facts:
There are no intellectual property restrictions on its implementation and use.
A common misconception is that FI requires ASN.1 tool support. Although the formal specification uses ASN.1 formalisms, ASN.1 tools are not required by implementations.
The other issue with FastInfoset is security. Whoever implements the parser had better design it to resist malicious content.
Genuine sacrifice would human readability and xml schema validation.
Reference Implementation
A Java implementation of the FI specification [http://fi.dev.java.net/] is available as part of the GlassFish project. The library is open source and is distributed under the terms of the Apache License 2.0. Several projects use this implementation, including the reference implementation for JAX-RPC and JAX-WS
About Performance
In addition to a significant reduction in document size of Fast Infoset with respect to standard XML 1.0, SAX-type parsing performance of Fast Infoset is much greater than parsing performance of XML 1.0. Typical increases in parsing speed observed for the reference Java implementation are a factor of 10 compared to Java Xerces, and a factor of 4 compared to the Piccolo driver (one of the fastest Java-based XML parsers)
Typical Applications
* Portable Devices - With mobile devices typically having access to low bandwidth data connections, and have slower CPUs. This can make Fast Infoset a better choice, lowering both data transmission and data processing times.
Persisting Large Volumes of Data - When persisting XML either to file or a database, the volume of data your system produces can often get out of hand. This has a number of detrimental effects; the access times go up as you're reading more data, CPU load goes up as XML data takes more effort to process, and your storage costs go up. By persisting your XML data in Fast Infoset format, it is possible to reduce the data volume by up to 80 percent.
Passing XML via the internet - As soon as an application starts passing information over the internet, one of the main bottlenecks is bandwidth. If you send reasonable chunks of data, this bottleneck can seriously degrade the performance of your client applications and limit your server's ability to process requests. Reducing the amount of data moving across the internet reduces the time it takes a message to be sent or received, while increasing the number of transactions a server can process per hour.
Supporting Java WS Stacks:
Metro, Axis2 & CXF
Monday, April 12, 2010
JMS - a quick walk-thru of concepts
Java Message Service is an asynchronous communication mechanism in the distributed system field. JMS API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients. It is very helpful in the situation where the distributed components are loosely coupled. Another popular distributed communication technology is Remote Method Invocation (RMI), which is tightly coupled and requires an application to know a remote application's methods. Java Message Service Specification
Characteristics of JMS
1. Messages can be consumes sync or async
2. Consumers can filter which message they receive
3. Messages are placed in Destination in sent order
4. Message consumption order cannot be guaranteed
2. Consumers can filter which message they receive
3. Messages are placed in Destination in sent order
4. Message consumption order cannot be guaranteed
Elements
· Connection
· Session
· Message Producer & Message Consumer
· Destination
· Message
Message Models
- Point-to-Point or P2P (Queuing Model) &
- Publisher-Subscriber or Pub-Sub (eg: Topic)
Programming
Queue vs Topic
JMS as Administered Object
It is recommended to use JNDI lookups. This promotes loose-coupling - an important aspect of SOA.
Steps involved:
Reliable Messaging done thru use of:
- Persistent Message Store and
- Acknowledgement or Transaction
Open source JMS Providers
Java Message Service is an asynchronous communication mechanism in the distributed system field. It is very helpful in the situation where the distributed components are loosely coupled. Another popular distributed communication technology is Remote Method Invocation (RMI), which is tightly coupled and requires an application to know a remote application's methods.
Java Message Service Specification
Java Message Service Specification
Technical Expectations:
1. Provision for Routing and delivery service
2. Support for Point-to-Point or P2P (Queue) & Publisher-Subscriber or Pub-Sub (Topics) patterns
3. Sync & Async message receipt
4. Reliability assurance
5. Built in support for common existing message formats
There are many open source JMS providers in market and they normally fulfill the above. So decision is difficult.
I'm planning for a JMS implementation and the following are my choices. Finally, I went with ActiveMQ as reviews shows it is faster and reliable compared to the peers. Similarly good one, which I keep as alternative, is OpenMQ. Anyway, lets walk thru the list.
1. Provision for Routing and delivery service
2. Support for Point-to-Point or P2P (Queue) & Publisher-Subscriber or Pub-Sub (Topics) patterns
3. Sync & Async message receipt
4. Reliability assurance
5. Built in support for common existing message formats
There are many open source JMS providers in market and they normally fulfill the above. So decision is difficult.
I'm planning for a JMS implementation and the following are my choices. Finally, I went with ActiveMQ as reviews shows it is faster and reliable compared to the peers. Similarly good one, which I keep as alternative, is OpenMQ. Anyway, lets walk thru the list.
Apache ActiveMQ
An open source (Apache 2.0 licensed) message broker which fully implements the Java Message Service 1.1 (JMS). It provides "Enterprise Features" like clustering, multiple message stores, and ability to use any database as a JMS persistence provider besides VM, cache, and journal persistency.
Used in ESBs like Mule and often used with Apache CXF in SOA infrastructure projects.
Integrates seamlessly into Geronimo, light weight containers and any Java application.
Apache ActiveMQ - Features
License: Apache 2.0
Open Message Queue
OpenMQ is an open source message-oriented middleware project by Sun Microsystems that implements the Java Message Service 1.1 API (JMS). In addition to support for the JMS API, OpenMQ provides additional enterprise features including clustering for scalability and high availability, a C API, and a full JMX administration API. It also includes an implementation of the Java EE Connector Architecture (JCA) called the JMSRA, that allows OpenMQ to be used by a Java EE compliant application server. OpenMQ is the default JMS provider integrated into GlassFish.
License: CCDL & GPL
Developer tips
Latest release
JBoss Messaging
JBoss/Messaging is a re-implementation of JBossMQ. Fully compatible JMS1.1 implementation. Performance characteristics to exceed JBossMQ's. One of the project tasks is to build a benchmarking infrastructure that will allow tracking of the performance metrics evolution in time, between versions, as well as comparison with equivalent metrics of similar products. High availability features, such as distributed destinations, in-memory replication of the messages and transparent client fail over. Standard JMS API to JGroups. Serverless JMS design.
On 24 August 2008, HornetQ was launched, based on the JBoss Messaging 2.0 code-base, and the JBoss Messaging project was put into bug fix mode only by JBoss.
License: LGPL
UberMQ
is a clean-room implementation of the JMS 1.1 API (topics and queues), based on Java NIO for speed and scalability. It supports TCP, SSL and LRMP multicast connectivity, and is highly pluggable so you can customize various aspects to your needs.
Download
MantaRay
is an Open Source serverless messaging fabric, based on peer-2-peer technology, and 100% pure Java. Features include: - Publish/subscribe (topic) and Point-to-point (queue) messaging services - Support for JMS 1.1 and 1.02 - Automatic discovery - Guaranteed message delivery - Persistent/non-persistent and durable messages - Security - Transactions support - Message filtering using selectors - Integration with WebLogic and WebSphere - TCP, UDP and HTTP transport protocols
License: GPL
Somnifugi
is an implementation of JMS that works inside a single JVM to send JMS Messages between Threads.
License: BSD License
HermesJMS
is an extensible console that helps you interact with JMS providers making it easy to browse or seach queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found.
An open source (Apache 2.0 licensed) message broker which fully implements the Java Message Service 1.1 (JMS). It provides "Enterprise Features" like clustering, multiple message stores, and ability to use any database as a JMS persistence provider besides VM, cache, and journal persistency.
Used in ESBs like Mule and often used with Apache CXF in SOA infrastructure projects.
Integrates seamlessly into Geronimo, light weight containers and any Java application.
Apache ActiveMQ - Features
License: Apache 2.0
Open Message Queue
OpenMQ is an open source message-oriented middleware project by Sun Microsystems that implements the Java Message Service 1.1 API (JMS). In addition to support for the JMS API, OpenMQ provides additional enterprise features including clustering for scalability and high availability, a C API, and a full JMX administration API. It also includes an implementation of the Java EE Connector Architecture (JCA) called the JMSRA, that allows OpenMQ to be used by a Java EE compliant application server. OpenMQ is the default JMS provider integrated into GlassFish.
License: CCDL & GPL
Developer tips
Latest release
JBoss Messaging
JBoss/Messaging is a re-implementation of JBossMQ. Fully compatible JMS1.1 implementation. Performance characteristics to exceed JBossMQ's. One of the project tasks is to build a benchmarking infrastructure that will allow tracking of the performance metrics evolution in time, between versions, as well as comparison with equivalent metrics of similar products. High availability features, such as distributed destinations, in-memory replication of the messages and transparent client fail over. Standard JMS API to JGroups. Serverless JMS design.
On 24 August 2008, HornetQ was launched, based on the JBoss Messaging 2.0 code-base, and the JBoss Messaging project was put into bug fix mode only by JBoss.
License: LGPL
UberMQ
is a clean-room implementation of the JMS 1.1 API (topics and queues), based on Java NIO for speed and scalability. It supports TCP, SSL and LRMP multicast connectivity, and is highly pluggable so you can customize various aspects to your needs.
Download
MantaRay
is an Open Source serverless messaging fabric, based on peer-2-peer technology, and 100% pure Java. Features include: - Publish/subscribe (topic) and Point-to-point (queue) messaging services - Support for JMS 1.1 and 1.02 - Automatic discovery - Guaranteed message delivery - Persistent/non-persistent and durable messages - Security - Transactions support - Message filtering using selectors - Integration with WebLogic and WebSphere - TCP, UDP and HTTP transport protocols
License: GPL
Somnifugi
is an implementation of JMS that works inside a single JVM to send JMS Messages between Threads.
License: BSD License
HermesJMS
is an extensible console that helps you interact with JMS providers making it easy to browse or seach queues and topics, copy messages around and delete them. It fully integrates with JNDI letting you discover administered objects stored, create JMS sessions from the connection factories and use any destinations found.
License: Apache Software License
JORAM
JORAM incorporates a 100% pure Java implementation of JMS 1.1 (Java Message Service API released by Sun Microsystem, Inc.) specification.
It provides access to a really distributed MOM (Message Oriented Middleware), built on top of the ScalAgent D.T. agents based platform.
License: LGPL license
Open JMS
OpenJMS is an open source implementation of Sun Microsystems's Java Message Service API 1.0.2 Specification. Features include:
* Point-to-Point and publish-subscribe messaging models
* Guaranteed delivery of messages
* Synchronous and asynchronous message delivery
* Persistence using JDBC
* Local transactions
* Message filtering using SQL92-like selectors
* Authentication
* Administration GUI
* XML-based configuration files
* In-memory and database garbage collection
* Automatic client disconnection detection
* Applet support
* Integrates with Servlet containers such as Jakarta Tomcat
* Support for RMI, TCP, HTTP and SSL protocol stacks
* Support for large numbers of destinations and subscribers
OpenJMS is not dependent on any given application server and therefore can be a common interface between users of different vendors.
Issue: License & still in beta phase
Reasons for my Choice with Tomcat based app: (reason from googl-ing, yet to implement)
Its generally the easiest to embed in a JVM/Tomcat, has the most features and is the fastest open source JMS server.
ActiveMQ integrates cleanly with Tomcat, JNDI and Spring.
Useful resources:
http://activemq.org/Tomcat
http://activemq.org/JNDI+Support
http://activemq.org/Spring+Support
JORAM
JORAM incorporates a 100% pure Java implementation of JMS 1.1 (Java Message Service API released by Sun Microsystem, Inc.) specification.
It provides access to a really distributed MOM (Message Oriented Middleware), built on top of the ScalAgent D.T. agents based platform.
License: LGPL license
Open JMS
OpenJMS is an open source implementation of Sun Microsystems's Java Message Service API 1.0.2 Specification. Features include:
* Point-to-Point and publish-subscribe messaging models
* Guaranteed delivery of messages
* Synchronous and asynchronous message delivery
* Persistence using JDBC
* Local transactions
* Message filtering using SQL92-like selectors
* Authentication
* Administration GUI
* XML-based configuration files
* In-memory and database garbage collection
* Automatic client disconnection detection
* Applet support
* Integrates with Servlet containers such as Jakarta Tomcat
* Support for RMI, TCP, HTTP and SSL protocol stacks
* Support for large numbers of destinations and subscribers
OpenJMS is not dependent on any given application server and therefore can be a common interface between users of different vendors.
Issue: License & still in beta phase
Reasons for my Choice with Tomcat based app: (reason from googl-ing, yet to implement)
Its generally the easiest to embed in a JVM/Tomcat, has the most features and is the fastest open source JMS server.
ActiveMQ integrates cleanly with Tomcat, JNDI and Spring.
Useful resources:
http://activemq.org/Tomcat
http://activemq.org/JNDI+Support
http://activemq.org/Spring+Support
Vanilla flavour-ed Project - using Maven
Like the "generic" flavour of yummy vanilla in foods (especiallly ice-creams), the Maven creates you "generic" project structure. The 'recipe' is hereunder:
Step1:
mvn archetype:create \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.test \
-DartifactId=VanillaProject
This creates a project "VanillaProject" with pom.xml (as below) and class App.java in package com.test & a JUnit testcase for the class.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.test
VanillaProject
jar
1.0-SNAPSHOT
VanillaProject
http://maven.apache.org
junit
junit
3.8.1
test
With Project Folder structure:
Step 2:
App.java (modified with System.out.println):
package com.test;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
if(args!=null)
System.out.println( args[0]+"::"+args[1] );
}
}
2. Run the pom.xml to compile & test
mvn install
3. This compiles to get App.class. Now, run the class file
mvn exec:java -Dexec.mainClass="com.test.App" -Dexec.args="Arg0 Arg1"
Step1:
mvn archetype:create \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.test \
-DartifactId=VanillaProject
This creates a project "VanillaProject" with pom.xml (as below) and class App.java in package com.test & a JUnit testcase for the class.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
With Project Folder structure:
Step 2:
App.java (modified with System.out.println):
package com.test;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
if(args!=null)
System.out.println( args[0]+"::"+args[1] );
}
}
2. Run the pom.xml to compile & test
mvn install
3. This compiles to get App.class. Now, run the class file
mvn exec:java -Dexec.mainClass="com.test.App" -Dexec.args="Arg0 Arg1"
Friday, April 9, 2010
While creating Metro client for a basic authenticated webservice
I was facing with an issue creating the Metro client for a webservice - secured with plain text username & password.
Issue:
Header was not appearing the Soap Request
Error logged:
Apr 9, 2010 3:49:57 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection
WARNING: WSP0075: Policy assertion "{http://www.bea.com/wls90/security/policy}Identity" was evaluated as "UNKNOWN".
Apr 9, 2010 3:49:57 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection
WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
..
..
javax.xml.ws.soap.SOAPFaultException: No Security header in message but required by policy.
..
The Workarounds:
1. Adding the Username & Password in BindingProvider.USERNAME_PROPERTY in RequestContext. It sets value for "javax.xml.ws.security.auth.username(password)". The BindingProvider interface provides access to the protocol binding and associated context objects for request and response message processing. Eventually, the username and password has to be added in the form of an HTTP Basic Authentication header. (List of javax.xml constants)
Result: didn't work
2. XWSSConstants.USERNAME_PROPERTY in RequestContext
Result: didn't work (for my app)
3. Programmatically added the header ;)
Result: it worked :)
Here is how I did it - explained:
Click here to Enlarge
Code - For copy & paste
try {
SOAPFactory soapFactory = SOAPFactory.newInstance();
String SECURITY_NAMESPACE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
QName securityQName = new QName(SECURITY_NAMESPACE, "Security");
SOAPElement security = soapFactory.createElement(securityQName);
QName usernameTokenQName = new QName(SECURITY_NAMESPACE, "UsernameToken");
SOAPElement usernameToken = soapFactory.createElement(usernameTokenQName);
QName usernameQName = new QName(SECURITY_NAMESPACE, "Username");
SOAPElement username = soapFactory.createElement(usernameQName);
username.addTextNode("username");
QName passwordQName = new QName(SECURITY_NAMESPACE, "Password");
SOAPElement password = soapFactory.createElement(passwordQName);
password.addTextNode("password");
usernameToken.addChildElement(username);
usernameToken.addChildElement(password);
security.addChildElement(usernameToken);
Header header = Headers.create(security);
((WSBindingProvider) port).setOutboundHeaders(header);
} catch (SOAPException e) {
System.out.println("Failed adding the security token to header");
e.printStackTrace();
}
Misc:
Issue:
Header was not appearing the Soap Request
Error logged:
Apr 9, 2010 3:49:57 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection
WARNING: WSP0075: Policy assertion "{http://www.bea.com/wls90/security/policy}Identity" was evaluated as "UNKNOWN".
Apr 9, 2010 3:49:57 PM [com.sun.xml.ws.policy.EffectiveAlternativeSelector] doSelection
WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
..
..
javax.xml.ws.soap.SOAPFaultException: No Security header in message but required by policy.
..
The Workarounds:
1. Adding the Username & Password in BindingProvider.USERNAME_PROPERTY in RequestContext. It sets value for "javax.xml.ws.security.auth.username(password)". The BindingProvider interface provides access to the protocol binding and associated context objects for request and response message processing. Eventually, the username and password has to be added in the form of an HTTP Basic Authentication header. (List of javax.xml constants)
Result: didn't work
2. XWSSConstants.USERNAME_PROPERTY in RequestContext
Result: didn't work (for my app)
3. Programmatically added the header ;)
Result: it worked :)
Here is how I did it - explained:
Click here to Enlarge
Code - For copy & paste
try {
SOAPFactory soapFactory = SOAPFactory.newInstance();
String SECURITY_NAMESPACE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
QName securityQName = new QName(SECURITY_NAMESPACE, "Security");
SOAPElement security = soapFactory.createElement(securityQName);
QName usernameTokenQName = new QName(SECURITY_NAMESPACE, "UsernameToken");
SOAPElement usernameToken = soapFactory.createElement(usernameTokenQName);
QName usernameQName = new QName(SECURITY_NAMESPACE, "Username");
SOAPElement username = soapFactory.createElement(usernameQName);
username.addTextNode("username");
QName passwordQName = new QName(SECURITY_NAMESPACE, "Password");
SOAPElement password = soapFactory.createElement(passwordQName);
password.addTextNode("password");
usernameToken.addChildElement(username);
usernameToken.addChildElement(password);
security.addChildElement(usernameToken);
Header header = Headers.create(security);
((WSBindingProvider) port).setOutboundHeaders(header);
} catch (SOAPException e) {
System.out.println("Failed adding the security token to header");
e.printStackTrace();
}
Misc:
Beyond Compare for Linux - Wow!
Comparing file in Linux wasn't so easy (compared to the softwares available in Windows). Guys used to simulate the software like BeyondCompare using wine. Now, no longer do so...
The BeyondCompare for Linux is released in its version 3.
Available for download
Another good tool is KDiff - it is free!
The BeyondCompare for Linux is released in its version 3.
Available for download
Another good tool is KDiff - it is free!
Subscribe to:
Posts (Atom)


