Errata

Java Web Services

Errata for Java Web Services

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 1
Examples download

In the examples file "JavaWebServices_Examples_README.txt", the steps for setting up
Tomcat 3.2.4, steps 3 and 4 should be switched. You can't call
http://localhost:8080/soap/servlet/rpcrouter until you have the soap.war installed,
which occurs in step 4.

---------------------------------
SETTING UP TOMCAT 3.2.n

3. Test the revised installation.
a. Start tomcat again.
b. Open a browser and enter the address:
http://localhost:8080/soap/servlet/rpcrouter
The response expected is:
"Sorry, I don't speak via HTTP GET- you have to use HTTP POST
to talk to me.".
c. Close the Tomcat window.

4. Set up Tomcat for SOAP.
a. Copy the SOAP webapps file soap.war into the 3.2.n Tomcat webapps directory.
b. Start tomcat again.
c. In a browser, enter "http://localhost:8080/soap"
The expected result is an Apache SOAP page with options to
'Run the admin client' and to access the SOAP RPC router.

{README} SETTING UP TOMCAT 3.2.n;
The following changes need to be made to the README file for the examples and also to
the example directories themselves. These changes are applicable to the
9780596002695_examples.zip whose size is 192693 bytes. After you unzip the above file
make the following changes the to JavaWebServices_Examples_README.txt file.

1) Under the section SETTING UP TOMCAT 3.2.n make the following documentation
changes:
- Step 5c:
Change the value of 'ID Value' from "urn:stockhand" to urn:sotck-onhand"
Change the value of 'Static' from "no" to "false"

(Note that Step 5c is here to show you how to use the web interface to create a
deployment descriptor, you could have just as easily applied Step 5d to the file
%WORK%examplesch4StockQtyDD.xml and had the same result.)

- Step 5d:
Remove the tildes '~' from the java cmd.

Now make the following file/directory changes prior to following the instructions in
Step 5 under the section SETTING UP TOMCAT 3.2.n.

1) Delete the following files: (note that these files exist elsewhere in the example
directory heirarchy so we are only removing them from where they should not be)
- %WORK%examplesch3srcPurchaseOrderAcceptor.*
- %WORK%examplesch3StockQtyDD.xml

2) Move %WORK%examplesch4srcStockQuantity.java to
%WORK%examples omcat_3_webappssrc

3) After modifying the batch file %WORK%examplessetenv_jaws.bat to reflect your
installation environment, execute the batch file.

4) Go to the directory %WORK%examples omcat_3_webappssrc and ...
- execute the command javac *.java
- move the generated *.class files to ..classes

5) Go to the directory %WORK%examplesch3src and ...
- execute the command javac *.java
- move the generated *.class file to ..

6) Go to the directory %WORK%examplesch4src and ...
- execute the command javac *.java
- move the generated *.class file to ..

Now continue with Step 5 under the SETTING UP TOMCAT 3.2.n section.

At this point all the examples in chapter 3 and 4 will work properly except for for
two things.

1) The example on page 54 which for me at least generates the following message:
______________________________________________________
Starting GetBookPrice:
service url = http://services.xmethods.com:80/soap/servlet/rpcrouter
ISBN# = 0596000685
_______________________________________________________

Error opening socket: Connection refused: connect

Though this may be an issue on my side, I just haven't looking into it further.

2) The example on page 55 does generate the output as shown page 55 but in addition
it generates the following error:
______________________________________________________
Starting GetBookPrice:
service url = http://D4893.na.sas.com:8080/examples/servlet/SimpleHTTPReceive
ISBN# = 0596000686
_______________________________________________________

Parsing error, response was:
The root element is required in a well-formed document

(3 print; 1.1.1 online) The Major Web Services Technologies;
http://safari.oreilly.com/main.asp?bookname=9780596002695&snode=11

However, the web service vision of seamless worldwide business integration is not be
feasible unless the core technologies are supported by every major software company
in the world.

typo -> is not be feasible -> will not be feasible

Anonymous   
Printed Page 6
3rd paragraph

Southwest Airlines runs Solaris; Dollar Compaq's OpenVMS together with ACMS
(Application Control and Management System - a TP system).
In other words: the operating systems are reversed.

Anonymous   
Printed Page 40
2nd paragraph

HTTPReceive.class in examples/tomcat_3_webapps/classes does not seem to be compiled
from HTTPReceive.java that is found in examples/tomcat_3_webapps/src.

Here is a decompled code of HTTPReceive.class:

--------------------------------
// Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name: HTTPReceive.java

import java.io.*;
import java.util.Enumeration;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.http.*;

public class HTTPReceive extends HttpServlet
{

public HTTPReceive()
{
}

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
System.out.println("Received GET request");
response.setStatus(400);
}

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
System.out.println("____________________________");
System.out.println("JAXM Servlet received POST request.");
System.out.println("-----------------------");
String header;
String value;
for(Enumeration enum = request.getHeaderNames(); enum.hasMoreElements();
System.out.println(" " + header + " = " + value))
{
header = (String)enum.nextElement();
value = request.getHeader(header);
}

System.out.println("-----------------------");
if(request.getContentLength() > 0)
try
{
BufferedReader reader = request.getReader();
for(String line = null; (line = reader.readLine()) != null;)
System.out.println(line);

}
catch(Exception e)
{
System.out.println(e);
}
System.out.println("____________________________");
}
}
--------------------------------

Anonymous   
Printed Page 41
2nd paragraph

we get the Vector of BodyEntrys from the Envelope and get the Body from the Vector:

should be:

we get the Body from the Envelope and get the Vector of BodyEntrys from the Body:

Anonymous   
Printed Page 42
code listing

The last line of the method is listed as:
response.setContentType("text/xml");

but the compiled class does not have this line. So, class has to be recompiled,
otherwise an error is thrown when HTTPReceive is used as the -url parameter.

Anonymous   
Printed Page 55
4th paragraph

The output is correct in the servlet window, but (at least on my install) the
response from the execution (command window) is:

______________________________________________________
Starting GetBookPrice:
service url = http://localhost:8080/examples/servlet/SimpleHTTPReceive
ISBN# = 0596000685
_______________________________________________________

Parsing error, response was:
Document root element is missing.

Anonymous   
Printed Page 56
SOAP XML code, center of the page

Currently Reads:
<title xsi:type="xsd:string">Java And Web Services</isbn>
Should read:
<title xsi:type="xsd:string">Java And Web Services</title>

Anonymous   
Printed Page 71
2nd last line

protocal -> protocol

Anonymous   
Printed Page 72
3rd paragraph

The word "discreet" should instead be "discrete"

Anonymous   
Printed Page 74
WSDL example, center of page

The WSDL example that shows the major elements forget to close the import tag. It has
<import> but it should be <import/> . Minor mistake but in XML it is illegal to omit
a closing tag and this would cause an error from an XML parser.

Anonymous   
Printed Page 76
2nd Paragraph

Last line of this paragraph states that that the target name space in the example
wsdl definitions element is "http://asf.gils.net/xer". It's not. The target name
space shown is "urn:3950".

Anonymous   
Printed Page 83
Code sample at bottom of page

In the code sample at the bottom of page 83 on to page 84, a namespace of "xer" is referred to. That namespace does not appear to be defined. Furthermore, the types references are defined in the xsd namespace on pp 78-79. I find myself wondering if the "er" was a typo, and should perhaps be "sd" -- those two letter sets being one row apart on a keyboard. (thus the namespace would be xsd). This error may be related to the reference to http://asf.gils.net/xer that occurs on page 76, cited in other user-submitted errata.

Anonymous  Dec 04, 2008 
Printed Page 87
last paragraph of chapter

"The value assigned to the name attribute of each <operation> element must be unique
within the scope of the <portType>."

The value of the name attribute of each <operation> doesn't have to be
unique. "Operation overloading" is allowed. In case of operation overloading the
correct operation in the corresponding binding section must be identified by
providing the name attributes in the corresponding input and output elements.

See: http://www.w3.org/TR/wsdl#_bindings

Anonymous   
Printed Page 101
First line

... nodes that has their.... -> ... nodes that have their....

Anonymous   
Printed Page 102
first paragraph, last url

http://www.opensorcerer.org is a bad link!

Anonymous   
Printed Page 143
Table 7-1

The description for SOAPBody and SOAPBodyElement are reversed.

Anonymous   
Printed Page 193
First line, second paragraph

specificationss -> specifications

Anonymous