16.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

376 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>IBM</strong> <strong>Data</strong> <strong>Studio</strong> <strong>for</strong> <strong>DB2</strong><br />

Only the maximum number of result sets returned is known, which <strong>for</strong>ces <strong>Data</strong> <strong>Studio</strong> to<br />

assign a very generic result set definition represented by the<br />

anonymousResultSetType, as shown in Listing E.6.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Listing E.6 – The anonymousResultSetType<br />

You can see the reference to the anonymousResultSetType in the XML schema definition<br />

<strong>for</strong> the PRODUCT_CATALOG stored procedure response message, as shown in Listing E.5.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Listing E.5 – Reference to the anonymousResultSetType<br />

The generic result set in<strong>for</strong>mation can cause problems <strong>with</strong> web service clients that rely on<br />

the message schema provided <strong>with</strong> the WSDL file – as you could see in Chapter 10 <strong>with</strong><br />

the Web Services Explorer, where the result set content was not displayed correctly<br />

(Figure 10.25).<br />

<strong>Data</strong> <strong>Studio</strong> provides a way to circumvent this problem, but your stored procedure must<br />

match the criteria that it always returns the same number of result sets <strong>with</strong> the same<br />

metadata in<strong>for</strong>mation <strong>for</strong> every possible invocation. If this is the case, you can add a<br />

more detailed result set XML schema. Follow these steps to add the additional result set<br />

in<strong>for</strong>mation <strong>for</strong> thePRODUCT_CATALOG procedure:<br />

1. From the <strong>Data</strong> Project Explorer, right-click the PRODUCT_CATALOG operation<br />

and select Edit to open the Edit Operation window.<br />

2. Click Next to open the Generate XML Schema <strong>for</strong> Stored procedure page, then<br />

click Generate, as shown in Figure E.9.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!