Hat Tip 1 3 – Http Web Services Client Access

A client accesses a resource by exchanging messages with a Web service. Businesses and Web services. Businesses use Web services because they. However, in this tutorial you just make note of the access token value and manually create a HTTP request with the access token included, as explained in the next major step. The value of the access token (which in the preceding example is -iOws8j7JYu0p07jOFMEA.) will change on every approval. Note that the access token expires.

Documentation
Supported Platforms
What's New in Java WSDP 2.0?
Redistributables
Environment Variables
Using Ant That Comes with Java WSDP on Linux
Uninstalling Java WSDP 2.0
Known Issues

Documentation

The JavaTM Web Services Developer Pack (Java WSDP) is an all-in-one download containing key technologies to simplify building of web services using the Java 2 Platform. For release notes for these technologies see:

  • Fast Infoset 1.0.1
  • Java API for XML Web Services Addressing 1.0 EA Release Notes
  • Sun Java Streaming XML Parser 1.0 EA Release Notes
  • XML Digital Signature 1.0.1 Release Notes
  • XML and Web Services Security 2.0 EA2 Release Notes
  • JAX-WS 2.0 EA Release Notes
  • JAXB 2.0 EA Release Notes
  • JAXP 1.3.1_01 Release Notes
  • JAXR 1.0.8_01 EA Release Notes
  • JAX-RPC 1.1.3_01 EA Release Notes
  • SAAJ 1.3 EA Release Notes

Go to the Java Web Services Developer Pack 2.0 index page and visit the links to the API documentation and reference documentation for all the technologies.

Supported Platforms

This release of the Java WSDP has been tested in various configurations with J2SE 5.0 on the following platforms with the containers Sun Java System Application Server Platform Edition 8.1 Update 2, and Glassfish (Application Server Platform Edition 9.0 Beta (JAX-WSA only), and Tomcat 5.0 for JWSDP:

  • SolarisTM 9 Operating System on Sparc and x86
  • SolarisTM 10 Operating System on Sparc and Opteron
  • Windows 2003 Server Professional Edition
  • Windows XP Professional Edition
  • Windows 2000 Professional Edition
  • Red Hat Linux 9.0
  • Red Hat Linux AS 3.0 (including Update 4)

What's New in Java WSDP 2.0?

  • JAX-WS 2.0 early access (Java API for XML Web Services)
  • JAXB 2.0 early access
  • SAAJ 1.3 early access
  • JAX-WSA 1.0 early access (Java API for XML Web Services Addressing) and an experimental version of JAX-WS
  • Fast Infoset 1.0.1 FCS release acceleration technology built on ASN.1 standards
  • XML Web Services Security 2.0 early access
  • Sun Java Streaming XML Parser 1.0 early access, a high performance implementation of JSR 173
  • JAXP 1.3.1_01 FCS release
  • XML Digital Signatures 1.0.1 FCS release, with significant performance enhancements
  • Bug fixes, refreshed core components (JAX-RPC early access, JAXR early access, and more)
  • Ant Version 1.6.5
  • WS-I Sample Application has been removed
  • Service Registry has been removed
  • Sun Java System Web Server is no longer a supported container

Redistributables

DISTRIBUTION BY DEVELOPERS. Subject to the terms and conditions of the Software License Agreement and the obligations, restrictions, and exceptions set forth below, You may reproduce and distribute the portions of Software identified below ('Redistributable'), provided that:

  1. you distribute the Redistributable complete and unmodified and only bundled as part of Your applets and applications ('Programs'),
  2. your Programs add significant and primary functionality to the Software,
  3. you distribute Redistributable for the sole purpose of running your Programs,
  4. you do not distribute additional software intended to replace any component(s) of the Redistributable,
  5. you do not remove or alter any proprietary legends or notices contained in or on the Redistributable,
  6. you only distribute the Redistributable subject to a license agreement that protects Sun's interests consistent with the terms contained in the Software License Agreement, and
  7. you agree to defend and indemnify Sun and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Redistributable.

The following files are Redistributables:

Redistributable ComponentRedistributable Files
JAXPjaxp-api.jar, dom.jar, sax.jar, xalan.jar, xercesImpl.jar
XML Digital Signaturexmldsig.jar, xmlsec.jar
Fast InfosetFastInfoset.jar, dom.jar, sax.jar, jsr173_api.jar

Using JAXP 1.3.1_01 in Java WSDP 2.0 with J2SE 5.0

If you are using Java WSDP 2.0 with J2SE 5.0, you should be using the JAXP 1.3.1_01 JAR files from JWSDP 2.0, not the JAXP 1.3 JAR files from J2SE 5.0. Since the JAXP classes have been renamed to 'com.sun...' in both JDK 5 and Java WSDP 2.0, we need to override the built-in classes. The APIs are the same (both are version 1.3) but version 1.3.1_01 implementation classes that ship with Java WSDP 2.0 include some bug fixes that are not included in the version 1.3 implementation classes that ship with J2SE 5.0.

Using Ant That Comes with Java WSDP on Linux

On Linux systems, even if you set your ANT_HOME and PATH environment variables to point to the version of Ant that is installed with the Java WSDP 2.0, when you run the Java WSDP's Ant scripts, your system will look in the /etc/ant.conf configuration file and execute the version of Ant that is configured there. In this case, the default entry is /usr/share/ant. If you want to use the version of ANT that is shipped with Java WSDP, comment out the line that configures Ant in the /etc/ant.conf configuration file and your ANT_HOME and PATH environment variable settings will be used.

Fast Infoset Is Turned Off By Default

Fast Infoset is turned off (content negotiation is set to none) by default in Java WSDP 2.0. See the Fast Infoset User's Manual for information about turning on content negotiation.

Environment Variables

The JAVA_HOME environment variable is set to point to the version of the J2SE SDK you specify during installation. If you change your J2SE SDK installation, you will need to edit your <JWSDP_HOME>jwsdp-sharedbinsetenv.bat batch file or <JWSDP_HOME>/jwsdp-shared/bin/setenv.sh and reset the JAVA_HOME environment variable.

All other custom system properties can be set in the file <JWSDP_HOME>/conf/jwsdp.properties as follows:

You can override any of the properties in your file <JWSDP_HOME>/conf/jwsdp.properties by using the -D... argument to any of the start scripts. For example,

Unix: catalina.sh -Dhttp.proxyHost=webcache -Dhttp.proxyPort=8080

Microsoft Windows: catalina -Dhttp.proxyHost=webcache -Dhttp.proxyPort=8080

Console Installation on J2SE 5.0.

If you are running a console installation on a remote system with J2SE 5.0, the installation will exit if the DISPLAY variable hasn't been set. Make sure that you set the DISPLAY variable before you start the console installation on a remote system.

Uninstalling Java WSDP 2.0

At some point, you may need to uninstall Java WSDP 2.0:

  • On Microsoft Windows, select Start --> Programs --> Java(TM) Web Services Developer Pack 2.0 --> Uninstall.
  • On Solaris and Linux, run the <JWSDP_HOME>/uninstall.sh script.

If you ran one of the integration scripts after you installed the Java WSDP, you must rerun the script using the revert.<container>.changes target before you uninstall the Java WSDP.

Known Issues

UDDI Registries Unavailable After January 12, 2006

The IBM, Microsoft and SAP public UDDI registries are shutting down asof January 12, 2006. The consequences for Java WSDP 2.0 are as follows:

  • The JAXR examples <JWSDP_HOME>/jaxr/samples/jaxr-publish and <JWSDP_HOME>/jaxr/samples/jaxr-query will not work. Other JAXR programs that use the public UDDI registries will not work, either.
  • The SAAJ example <JWSDP_HOME>/saaj/samples/uddiping will not work.

The Registry Server that was provided with Java WSDP 1.5 is a UDDI registry, and you can install this registry and run programs against it. Because Java WSDP 1.5 requires JDK 1.4.2, while Java WSDP 2.0 requires JDK 1.5 or above, you must install the Registry Server on a system other than the one where you install JWSDP 2.0.

To install the Registry Server, perform these steps:

  1. Download Java WSDP 1.5 from the following URL:
  2. Download JDK 1.4.2 from the following URL:
  3. Download Tomcat 5 for Java WSDP 1.5 from the following URL:
  4. Install JDK 1.4.2.
  5. Install Tomcat.
  6. Install a 'Custom' Java WSDP 1.5 installation, specifying Tomcat as the container and Registry Server as the only component. (Several other components will also be installed: JAXB, JAXP, JAXR, and SAAJ.)
  7. Start Tomcat.

When you run programs against the Registry Server, specify the following values for the publish URL, the query URL, the username, and the password, wherever you set these properties:

FastInfoset Documentation Doesn't Describe How to Set the ContentNegotiation Property for JAX-WS

Content negotiation can be enabled in two different ways:

  • Set a system property on the VM used to run the client
  • Set a property on the client object.

In either case, both the property name and its value are identical. However, and in order to reflect the corresponding package structures, the property's name is not the same for JAX-RPC and JAX-WS. For JAX-RPC, the name of the property is com.sun.xml.rpc.client.ContentNegotiation and for JAX-WS it is com.sun.xml.ws.client.ContentNegotiation. In either case, the accepted property values are 'none' (the default) and 'pessimistic'. See the Using Fast Infoset section in the FatsInfoset Users Manual for more information.

Problem with JPEG File Causes JAX-WS mime and mtom Examples to Fail

If the java.jpg files in the <jwsdp.home/jaxws/samples/mime/common_resources, <jwsdp.home/jaxws/samples/mime/common_resources, and <jwsdp.home/jaxws/samples/mtom-soap12/common_resources directories does not display, the examples will fail. Right-click on the following JPEG file and save it as java.jpg in the three directories.

FastInfoset Does Not Improve Performance in Some Cases

FastInfoset makes little or no impactwhen:

  • There is no binding, using the wscompileoption -f:nodatabinding
  • Complex schema that results in the use of SOAPElement for non-supported schema features, such as xsd:choice

FastInfoset and EJB Web Services Endpoints Using Authentication in Application Server 8.1 2005Q2 UR2

There is a problem with authenticationwhen FastInfoset is enabled and EJBs areused as WebService endpoints. This isbecause 'EJBWebServiceDispatcher' is rejecting all themessages that are not of type 'text/xml'. As a result,applications using 'EJB Webservices endpoints' may fail when FastInfoset is used.

Hat Tip 1 3 – Http Web Services Client Access

Please send feedback on the Java Web Services Developer Pack to users@jwsdp.dev.java.net.

The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.

Hat Tip 1 3 – Http Web Services Client Access Portal

Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn’t provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.

Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.

Documentation

  1. Quick Start - contains simple, complete examples of request execution with the classic, fluent and async APIs.
  2. Examples demonstrating some common as well as more complex use cases
  3. Javadocs

  4. API compatibility reports

Features

  • Standards based, pure Java, implementation of HTTP versions 1.0, 1.1, 2.0
  • Supports encryption with HTTPS (HTTP over SSL) protocol.
  • Pluggable socket factories and TLS strategies.
  • Transparent message exchanges through HTTP/1.1 and HTTP/1.0 proxies.
  • Tunneled HTTPS connections through HTTP/1.1 and HTTP/1.0 proxies, via the CONNECT method.
  • Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, SNPNEGO, Kerberos authentication schemes.
  • HTTP state management and cookie support.
  • Flexible connection management and pooling.
  • Support for HTTP response caching.
  • Source code is freely available under the Apache License.

Standards Compliance

HttpClient strives to conform to the following specifications endorsed by the Internet Engineering Task Force (IETF) and the internet at large:

Hat Tip 1 3 – Http Web Services Client Access Login

  • RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
  • RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
  • RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication
  • RFC 1945 - Hypertext Transfer Protocol – HTTP/1.0
  • RFC 2817 - Upgrading to TLS Within HTTP/1.1
  • RFC 2818 - HTTP Over TLS
  • RFC 6265 - HTTP State Management Mechanism (Cookies)
  • RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax