ERRATTA

 

Although I have requested that AW post the latest errata several times, they have failed to do it. Here is the official (according to me) partial errata for this book its not done yet, but it should help you with the errors I've recorded so far. If you want to send me more errors, please e-mail me at Richard@Monson-Haefel.com

 

 

Page 48, Section 3.1.4.4, 1st Paragraph (1st Printing only)

 

CHANGE:

 

    "In other words, minOccurs is always "0" and maxOccurs is always "1""

  

TO:

   

     "In othere words, minOccurs is either "0" or "1" (the default is "1") and maxOccurs is always "1"".

 

Page 57, Section 3.1.7, Listing 3-20

 

CHANGE:

 

<?xml version="1.0" encoding="UTF-8"?>

<purchaseOrder orderDate="2003-09-22"

   xmlns="http://www.Monson-Haefel.com/jwsbook"

 

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

   xsi:schemaLocation="http://www.Monson-Haefel.com/jwsbook

                       po.xsd">

 <accountName>Amazon.com</accountName>

 <accountNumber>923</accountNumber>

 

TO:

 

<?xml version="1.0" encoding="UTF-8"?>

<purchaseOrder orderDate="2003-09-22"

   xmlns="file://./monsonhaefel/jwsbook"

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

   xsi:schemaLocation="http://www.Monson-Haefel.com/jwsbook

                       po.xsd">

 <accountName>Amazon.com</accountName>

 <accountNumber>923</accountNumber>

 

Page 643, Section 21.2,  Listing 21-9 (1st and 2nd Printing)

 

CHANGE

 

// Add the getBookPrice and isbn elements.

Element getBookPrice = xmlDoc.createElementNS(

  MH_NS, "mh:getBookPrice");

body.appendChild(getBookPrice);

 

Element isbn = xmlDoc.createElementNS(MH_NS, "isbn");

body.appendChild(isbn);

 

// Add the xsi:type attribute to the isbn element.

Attr typeAttr = xmlDoc.createAttributeNS(XSI_NS, "xsi:type");

typeAttr.setValue("xsd:string");

isbn.setAttributeNodeNS(typeAttr);

 

// Add the text contained by the isbn element.

Text text = xmlDoc.createTextNode("0321146182");

body.appendChild(text);

 

TO:

 

// Add the getBookPrice and isbn elements.

Element getBookPrice = xmlDoc.createElementNS(

  MH_NS, "mh:getBookPrice");

getBookPrice.appendChild(getBookPrice);

 

Element isbn = xmlDoc.createElementNS(MH_NS, "isbn");

body.appendChild(isbn);

 

// Add the xsi:type attribute to the isbn element.

Attr typeAttr = xmlDoc.createAttributeNS(XSI_NS, "xsi:type");

typeAttr.setValue("xsd:string");

isbn.setAttributeNodeNS(typeAttr);

 

// Add the text contained by the isbn element.

Text text = xmlDoc.createTextNode("0321146182");

isbn.appendChild(text);

 

Page 699, Section 23.4, Listing 23-5 (1st Printing only)

 

CHANGE

 

<wsdl-file>/WEB-INF/wsdl/bookquote.wsdl</wsdl-file>

<jaxrpc-mapping-file>/WEB-INF/bookquote.map</jaxrpc-mapping-file>

 

TO

 

<wsdl-file>/META-INF/wsdl/bookquote.wsdl</wsdl-file>

<jaxrpc-mapping-file>/META-INF/bookquote.map</jaxrpc-mapping-file>

 

Page 711, Section 24.2, Listing 24-1 (1st & 2nd Printings)

 

In Listing 24-1, the soap:body elements are incorrect. The following shows the listing as it appears in the book with the incorrect elements highlighted in gray.

 

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="BookQuote"

 ...

 

  <binding name="BookQuoteBinding" type="mh:BookQuote">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"

                       style="rpc"/>

    <operation name="getBookPrice">

      <soap:operation soapAction=""/>

      <input>

        <soap:body use="literal"

          namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote/BookQuote"/>

      </input>

      <output>

        <soap:body use="literal"

          namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote/BookQuote"/>

      </output>

      <fault name="InvalidIsbnFault" >

        <soap:fault name="InvalidIsbnFault" use="literal" />

      </fault>

    </operation>

  </binding>

  ...

</definitions>

 

The soap:body elements should indicate that the Web service uses RPC/Encoded messaging in the book it shows RPC/Literal binding which is not correct for a lightweight mapping.  I had expected IBM to change the lightweight to using RPC/Literal per the WS-I BP, but they never did.  At any rate, the following shows the correct soap:body lements for Listing 24-1 (changes are shown in bold)

 

      <input>

        <soap:body use="encoded"

          namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote"

          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

      </input>

      <output>

        <soap:body use="encoded"

          namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote"

          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

      </output>

 

Page 728, Section 24.4.5, Listing 24-16 (1st and 2nd Printings)

 

 

CHANGE

 

public BookQuote getDocListPort();

 

TO:

 

public BookQuote getDocLitPort();

 

 

Page 729, Section 24.4.6, Listing 24-7

 

CHANGE:

 

 

namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote/BookQuote" />

 

TO

 

namespace="http://www.Monson-Haefel.com/jwsbook/BookQuote" />

 

Page 729, Section 24.4.6, Listing 24-7

 

CHANGE:

 

 

<soap:fault

  use="literal"

 

 

TO

 

<soap:fault name="InvalidIsbnFault" use="literal" />