Programming Web Services with SOAP By Doug Tidwell, James Snell, Pavel Kulchenko This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was updated April 2, 2004 Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification Confirmed errors: Subheading "Paul" should read "Pavel" (12) first paragraph of "RPC and EDI"; "Electronic Document Interchange (EDI) is basis" should be "Electronic Document Interchange (EDI) is the basis". (24) Example 2-12; B.com should be b.com C.com should be c.com [paul] it may or may not be. Host names in URLs are case insensitive, but we can make them lowercase just to be consistent. See RFC 2396 [http://www.ietf.org/rfc/rfc2396.txt], URI Normalization and Equivalence (24) Example 2-17; missing /> at end of the address elements with href attributes [paul] yes (28) Example 2-17; missing /> at end of the address elements with href attributes [paul] yes [33] Example 2.28; Shouldn't the 2 in "SOAP-ENC:offset="[2]" be 3? [paul] yes. Should be SOAP-ENC:offset="[3]" {40} Example 3-6. hw_client.pl; if the example should work with the hello server line 8 and 9 must be -> uri('urn:Demo') -> proxy('http://localhost/cgi-bin/hello.cgi') [paul] actually it must be: -> uri('urn:Hello') -> proxy('http://localhost/cgi-bin/hello.cgi') There also must be additional newline in result: code uses two new lines ("\n\n"), but result shows only one. {42} Perl demo It would seem that the uri in the perl example client should correspond with the name of the pm, as opposed to urn:Example1. It didn't work until I changed it to urn:Hello, then it was fine. The vbscript example on page 43 is also affected. [paul] yes. Same as above. VB examples are also affected. Code in appendix must be updated as well. (45-46) "Installing Apache SOAP" section; The text says "...Or, in the Unix Bourne shell (/bin/sh): CLASSPATH = $CLASSPATH;$SOAP_LIB/soap.jar CLASSPATH = $CLASSPATH;$SOAP_LIB/mail.jar CLASSPATH = $CLASSPATH;$SOAP_LIB/activation.jar " There should be no spaces around the equals signs and the semicolons have to be colons instead. As written, the statements produce errors and the CLASSPATH environment variable can't be properly set. Ironically, a few paragraphs later the text says "The vast majority of problems encountered by new Apache SOAP users are related to incorrect classpaths. If you encounter problems writing web services with Apache SOAP, be sure to start your debugging by checking your classpath!" [paul] yes. should be changed to: CLASSPATH=$CLASSPATH:$SOAP_LIB/soap.jar CLASSPATH=$CLASSPATH:$SOAP_LIB/mail.jar CLASSPATH=$CLASSPATH:$SOAP_LIB/activation.jar [49] Hello Client Code List; The line reading: call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC;); should read: call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); (remove the first semicolon or the java compiler will complain) [paul] yes [50] example 3-16. hw_jclient.pl ->proxy('....router James') must be ->proxy('....router') URL with 'James' in the end generates an error. (63) 2nd paragraph; It says "in Chapter 5, we will discuss several much more secure and robust security mechanisms for web services." it should be: "in Chapter 7, we will discuss several much more secure and robust security mechanisms for web services." [88, 183] all; The telephone number example is US specific! My work number has the following format 020 123 1234, and my home number 01234 123456, both of which will not fit into the schema d efined. Also many country codes exceed 2 digits, and it is common to prefix the code with '+'. This raises an important point about XML schemas and the use of XML within SOAP which the book does not address at all, viz. how do you handle i18n / l10n ? Ideally XML schemas would permit a specification to define different formats for different locales (ie. using a 'switch' type const ruct). An alternative might be to use the locale information of the sender to define an appropriate schema to be incorporated into any WDSL file returned (eg. , )[this then raises the issue of support for i18n by the various SOAP toolkits as message validation would need to use the correct handler for the sender's locale]. (It is suprising how many web sites still require US telephone numbers, postal addresses, etc so this topic is of high importance i f web services are to enable global commerce). [paul] I would agree with that, but I don't think i18n is applicable here. It's more about schema definition/usage rather than globalization issue. (100) 1st paragraph in "The Publisher Interface; Says "defines sixteen operations" but only eleven are listed after that. [paul] yes. Change sixteen to eleven? (102) The Inquiry Interface; find_ltservice should be find_service [paul] yes. (106) last line of code; O'reilly and Associates Should be - "O'Reilly" [paul] yes. (120) 5th paragraph; JAXP is the Java API for XML Processing (http://xml.apache.org/xercesj). It's actually "xerces-j" at the end of this web address. [paul] yes. I also prefer to use trailing slash if URL ends with a directory: http://xml.apache.org/xerces-j/ (Chapter 3 Examples) Both Example 3-5 and 3-6 reference to the WRONG proxy and have the WRONG uri value (uri== urn:Example1 this should be urn:Hello) and the proxy address should be http://localhost/cgi-bin/hello.cgi helloworld.cgi is never discussed in this chapter! The URI error continues throughout the chapter, example 3-10, 3-15, 3-16. [paul] yes. was mentioned before (pp40, 42) (158) second paragraph; Currently, only IBMs Web Services ToolKit and Microsofts .NET web services impl ementations include support for digitally signing and encrypting SOAP messages. "IBM's Web Services Toolkit" and "Microsoft's .NET web services" [paul] yes. (183) Complex Types; A complex type is a collection of other data types. It's not restricted to "primitive data types" as the text reads. [paul] yes.