Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 96 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
96
Dung lượng
1,58 MB
Nội dung
851 Chapter 36 ✦ Accessing Relational Data via Web Services The SQL command, select AuthorName from Authors, selects all of the values in the AuthorName column of the Authors table. The buildArray class that is used by the GetAuthorList and GetSingleAuthorList classes to build an array from an DB2JDBC result set. An ArrayList is created, which is an implementation of the List interface. The most important feature of ArrayLists for the purposes of this code is that they are automatically resizable, via the add() method. We have explicitly specified java.util.List because the java.awt package also has a List interface. The JDBC specification contains a .toArray() method for result sets, which would be great for this purpose. However, not all JDBC drivers implement a com- plete set of methods for JDBC classes. The code in the buildArray class can be used when the toArray() method is not supported, as is the case with the DB2JDBC driver, or when you want all JDBC result set array output to be the same regardless of driver-specific formatting. A DB2result set is passed from the calling object and an ArrayList is defined called arrayResults. The code loops through the result set and retrieves the cur- rent result set row value as a string. DB2result set values returned by the DB2JDBC driver sometimes contain leading and trailing blanks, so the trim() method is sued to trim spaces off the string as it is created. The string is added to the array Results object using the ArrayList.add() method. Next, a string array called sarray is created, and the value of the ArrayList is passed to the string array using the ArrayList.toArray() method. The buildArray class creates a string array from the JDBC result set, which is passed to the J2EE application that called the Web service via a SOAP envelope (Listing 36-1). Listing 36-1: The XMLPBWSMTServletGetAuthorList Web Service Code import java.util.*; import java.io.*; import java.sql.*; public class XMLPBWSMTServletGetAuthorList { public String [] GetAuthorList() { String authorList [] = null; String sql = “select AuthorName from Authors”; try { Continued Note q538292 ch36.qxd 8/18/03 8:45 AM Page 851 852 Part VIII ✦ Advanced Web Services Listing 36-1 (continued) Class.forName(“com.ibm.db2.jcc.DB2Driver”); Connection conn = DriverManager.getConnection (“jdbc:db2://127.0.0.1:7778/XMLPB, User=jdbcUser,Password=jdbcUser”); Statement s = conn.createStatement(); ResultSet rs = s.executeQuery(sql); authorList = buildArray(rs); rs.close(); conn.close(); }catch(Exception e) { e.printStackTrace(); } return authorList ; } String[] buildArray(ResultSet rs) { java.util.List arrayResults = new ArrayList(); try { int rownumber= 0; String rowvalue = new String(); while(rs.next()) { rownumber++; rowvalue = rs.getString(rownumber++); arrayResults.add(rowvalue.trim()); } }catch(Exception e) {} String[] sarray = (String[]) arrayResults.toArray(new String[arrayResults.size()]); return sarray; } } Next, we’ll show you how the WSDL and WSDD files work together with the Java class to make a Web service. The XMLPBWSMTServletGetAuthorList WSDL and WSDD files Each Web service in the Quote XML Generator – Web Service Edition application has two files associated with it, a Web Services Description Language (WSDL) file and a Web Service Deployment Descriptor (WSDD) file. We’ll explain the files associ- ated with the XMLPBWSMTServletGetAuthorList class as a guide for all four Web services. Each WSDL and WSDD file is virtually the same as its counterparts, q538292 ch36.qxd 8/18/03 8:45 AM Page 852 853 Chapter 36 ✦ Accessing Relational Data via Web Services except for the names of the classes, the names of the methods, and the data types returned. Listing 36-2 shows the WSDD File associated with the XMLPBWSMT ServletGetAuthorList Web service. Deployment descriptors are well-formed XML documents that control Web service deployment, security, and administration. The deployment descriptor declares the name of the Web service and two XML namespaces. Next, the Service data-binding format is defined as Java remote procedure calls (RPC). The RPC router on the server parses incoming SOAP RPC requests and extracts data from a SOAP enve- lope. Responses from the Web service are wrapped in a response SOAP envelope by the same RPC router. Next, the service’s class name is defined as XMLPBWSMTServletGetAuthorList, as shown in Listing 36-2. Access to all methods contained in the Web service is per- mitted by the wildcard character (*) in the allowedMethods parameter. Listing 36-2: The XMLPBWSMTServletGetAuthorList WSDD File <deployment xmlns=”http://xml.apache.org/axis/wsdd/” xmlns:java=”http://xml.apache.org/axis/wsdd/providers/java”> <! Services from XMLPBWSMTServletGetAuthorListService WSDL service > <service name=”XMLPBWSMTServletGetAuthorList” provider=”java:RPC”> <parameter name=”wsdlTargetNamespace” value=”http://www.xmlprogrammingbible.com/wsdl/default/”/> <parameter name=”wsdlServiceElement” value=”XMLPBWSMTServletGetAuthorListService”/> <parameter name=”wsdlServicePort” value=”XMLPBWSMTServletGetAuthorList”/> <parameter name=”className” value=”com.xmlprogrammingbible.www. XMLPBWSMTServletGetAuthorListSoapBindingSkeleton”/> <parameter name=”wsdlPortType” value=”XMLPBWSMTServletGetAuthorList”/> <parameter name=”allowedMethods” value=”*”/> <typeMapping xmlns:ns=”http://www.xmlprogrammingbible.com/wsdl/default/” qname=”ns:ArrayOf_soapenc_string” type=”java:java.lang.String[]” serializer=”org.apache.axis.encoding.ser.ArraySerializerFactory” deserializer=”org.apache.axis.encoding.ser. ArrayDeserializerFactory” encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” /> </service> </deployment> q538292 ch36.qxd 8/18/03 8:45 AM Page 853 854 Part VIII ✦ Advanced Web Services The deployment descriptor describes a Web service from a J2EE server point of view. A WSDL file describes the same Web service from a client point of view. As mentioned in Chapter 25, reading a WSDL file can be a daunting task, but it’s best to keep in mind that if everything goes well, humans should rarely have to read a WSDL file themselves. WSDL files are a way of defining a Web service interface pro- grammatically to another Web service, smart client, or portal. Listing 36-3 shows the WSDL interface for the XMLPBWSMTServletGetAuthorList Web service. The WSDL file declares several XML namespaces, which are used to define WSDL structure and SOAP data types (Listing 36-3). Next, data types are defined as parts of call and response messages. The messages become part of ports, which become part of operations. The Web service is defined of one or more operation. Last, the endpoint address for the Web service is specified in the location attribute of the wsdlsoap:address element. Listing 36-3: The XMLPBWSMTServletGetAuthorList WSDL File <wsdl:definitions xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:apachesoap=”http://xml.apache.org/xml-soap” xmlns:impl=”http://www.xmlprogrammingbible.com/wsdl/default/-impl” xmlns:intf=”http://www.xmlprogrammingbible.com/wsdl/default/” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/” xmlns:wsdlsoap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” targetNamespace=”http://www.xmlprogrammingbible.com/wsdl/default/”> <wsdl:types> <schema targetNamespace=”http://www.xmlprogrammingbible.com /wsdl/default/” xmlns=”http://www.w3.org/2001/XMLSchema”> <import namespace=”http://schemas.xmlsoap.org /soap/encoding/”/> <complexType name=”ArrayOf_soapenc_string”> <complexContent> <restriction base=”soapenc:Array”> <attribute ref= “soapenc:arrayType” wsdl:arrayType=”soapenc:string[]”/> </restriction> </complexContent> </complexType> <element name=”ArrayOf_soapenc_string” nillable=”true” type=”intf:ArrayOf_soapenc_string”/> </schema> </wsdl:types> <wsdl:message name=”GetAuthorListResponse”> <wsdl:part name=”return” type=”intf:ArrayOf_soapenc_string”/> </wsdl:message> <wsdl:message name=”GetAuthorListRequest”> q538292 ch36.qxd 8/18/03 8:45 AM Page 854 855 Chapter 36 ✦ Accessing Relational Data via Web Services </wsdl:message> <wsdl:portType name=”XMLPBWSMTServletGetAuthorList”> <wsdl:operation name=”GetAuthorList”> <wsdl:input name=”GetAuthorListRequest” message=”intf:GetAuthorListRequest”/> <wsdl:output name=”GetAuthorListResponse” message=”intf:GetAuthorListResponse”/> </wsdl:operation> </wsdl:portType> <wsdl:binding name=”XMLPBWSMTServletGetAuthorListSoapBinding” type=”intf:XMLPBWSMTServletGetAuthorList”> <wsdlsoap:binding style=”rpc” transport=”http://schemas.xmlsoap.org/soap/http”/> <wsdl:operation name=”GetAuthorList”> <wsdlsoap:operation/> <wsdl:input> <wsdlsoap:body use=”encoded” encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” namespace=”http://www.xmlprogrammingbible.com/wsdl/default/”/> </wsdl:input> <wsdl:output> <wsdlsoap:body use=”encoded” encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” namespace=”http://www.xmlprogrammingbible.com/wsdl/default/”/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name=”XMLPBWSMTServletGetAuthorListService”> <wsdl:port name=”XMLPBWSMTServletGetAuthorList” binding=”intf:XMLPBWSMTServletGetAuthorListSoapBinding”> <wsdlsoap:address location=”http://127.0.0.1/ XMLPBWSMTServletGetAuthorList”/> </wsdl:port> </wsdl:service> </wsdl:definitions> Putting the WSDD, Class, WSDL, and SOAP together Keep in mind that each interface plays an important role in dividing the labor of each component of the application. This separation of functionality also adds flexi- bility to the application. For example, the deployment descriptor can be used to redirect calls to another Java class file or another platform entirely without having to change the name, location, or functionality of the Web service. As we mentioned earlier, the Web service WSDL file is not important for the day-to- day functionality of the Web service. However, the WSDL file is very useful for speci- fying the format for SOAP call and response related to the Web service. Many Web service clients can read the WSDL file for a Web service and dynamically adapt the calling agent interface to the serving agent. q538292 ch36.qxd 8/18/03 8:45 AM Page 855 856 Part VIII ✦ Advanced Web Services Listing 36-4 shows a sample SOAP envelope contents that is generated by the XMLPBWSMTServletGetAuthorList WSDL file. The Method name in the SOAP call maps directly to the incoming message in the WSDL file. The GetAuthorList method call maps to the WSDL GetAuthorList operation. Listing 36-4: A Sample XMLPBWSMTServletGetAuthorList SOAP Call <SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/ soap/envelope/” xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/ encoding/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <SOAP-ENV:Body> <m:GetAuthorList xmlns:m=”http://www.xmlprogrammingbible.com /wsdl/default/” SOAP- ENV:encodingStyle=”http://schemas.xmlsoap.org/ soap/encoding/”/> </SOAP-ENV:Body> </SOAP-ENV:Envelope> The XMLPBWSMTServletGetSingleAuthorList Web service The XMLPBWSMTServletGetSingleAuthorList Web service is called when a user clicks on a quote author in the J2EE client application. The CategoryName parameter is passed to the Web service in the SOAP request envelope. This triggers a JDBC query on the Authors and Quotations tables in the XMLPB database. The buildArray class builds an array from the JDBC result set. The Web service returns an array of quotes for the author back to the J2EE client application in a SOAP response envelope. The RPC router on the server converts the string array to an XML-based SOAP string array format. Listing 36-5 shows the XMLPBWSMTServletGetSingleAuthorList code. Listing 36-5: The XMLPBWSMTServletGetSingleAuthorList Web Service Code import java.util.*; import java.io.*; import java.sql.*; q538292 ch36.qxd 8/18/03 8:45 AM Page 856 857 Chapter 36 ✦ Accessing Relational Data via Web Services public class XMLPBWSMTServletGetSingleAuthorList { public String [] GetSingleAuthorList(String CategoryName) { String singleauthorList [] = null; String sql = “SELECT Quotations.Quotation FROM Quotations INNER JOIN Authors ON Quotations.AuthorID = Authors.AuthorID INNER JOIN Sources ON Quotations.SourceID = Sources.SourceID WHERE (Authors.AuthorName = ‘“+CategoryName+”’)”; String fromrow=”1”; String torow=”50”; String threshold=”50”; try { Class.forName(“com.ibm.db2.jcc.DB2Driver”); Connection conn = DriverManager.getConnection (“jdbc:db2://127.0.0.1:7778/XMLPB, User=jdbcUser,Password=jdbcUser”); Statement s = conn.createStatement(); ResultSet rs = s.executeQuery(sql); singleauthorList = buildArray(rs); rs.close(); conn.close(); }catch(Exception e) { e.printStackTrace(); } return singleauthorList ; } String[] buildArray(ResultSet rs) { java.util.List arrayResults = new ArrayList(); try { int rownumber= 0; String rowvalue = new String(); while(rs.next()) { rownumber++; rowvalue = rs.getString(rownumber++); arrayResults.add(rowvalue.trim()); } }catch(Exception e) {} String[] sarray = (String[]) arrayResults.toArray(new String[arrayResults.size()]); return sarray; } } q538292 ch36.qxd 8/18/03 8:45 AM Page 857 858 Part VIII ✦ Advanced Web Services The XMLPBMTWSServletDB2Format Web service The code in Listing 36-6 is called when a quote is selected by a user and the output option is set to “DB2 XML”. A string containing the quote formatted as an XML document is passed from the GetSingleQuoteDb2 class back to the Web service as a string. The code is nice and short in this class because AXIS and DB2 do most of the work in retrieving and formatting the XML. Rows of data are returned as children of a GetDB2XMLResult element. The result of a query is always a single row. A single GetDB2XMLRow element contains the DB2 column values. Column values are stored in text data, and column names are repre- sented as element names. These element names are based on the Web service oper- ation name, GetDB2XML (Listing 36-6). Listing 36-6: The XMLPBWSMTServletDB2Format Web Service Code import org.apache.axis.*; import org.apache.axis.client.*; import java.rmi.*; import org.apache.axis.encoding.*; import org.apache.axis.utils.*; public class XMLPBMTWSServletDB2Format { public String GetSingleQuoteDB2(String PassedQuote) { String XMLDoc=null; try { Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(“http://127.0.0.1:8080/ XMLPB/GetDB2XML.dadx/GetDB2XML”) ); call.addParameter( “PassedQuote”, XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN ); call.setReturnType(new javax.xml.namespace.QName (“http://www.xmlprogrammingbible.com/wsdl/default/”, “string”)); XMLDoc = (String ) call.invoke( new Object[] {PassedQuote}); } catch(Exception e) { e.printStackTrace(); } q538292 ch36.qxd 8/18/03 8:45 AM Page 858 859 Chapter 36 ✦ Accessing Relational Data via Web Services return XMLDoc ; } } Listing 36-7 shows the result of the GetDB2XML Operation. Listing 36-7: The XML Returned as a Result of the GetDB2XML Operation <?xml version=”1.0” encoding=”UTF-8”?> <ns1:GetDB2XMLResponse xmlns:ns1=”urn:/XMLPB/GetDB2XML.dadx” xmlns:xsd=”http://www.w3.org/1999/XMLSchema” xmlns:xsi=”http://www.w3.org/1999/XMLSchema-instance”> <return> <xsd1:GetDB2XMLResult xmlns=”http://127.0.0.1:8080/ XMLPB/GetDB2XML.dadx/GetDB2XML/XSD” xmlns:xsd1=”http://127.0.0.1:8080/XMLPB/ GetDB2XML.dadx/GetDB2XML/XSD”> <GetDB2XMLRow> <QUOTATION>When the hurlyburlys done, When the battles lost and won.</QUOTATION> <AUTHORNAME>Shakespeare, William</AUTHORNAME> <SOURCENAME>Macbeth</SOURCENAME> </GetDB2XMLRow> </xsd1:GetDB2XMLResult> </return> </ns1:GetDB2XMLResponse> Inside the XMLPBWSMTApp J2EE Client Application The XMLPBWSMTApp J2EE client application is a fully functional Java Application that uses Swing Classes and AWT events to generate a UI. The J2EE client makes SOAP calls to Web services, which connect to relational data on DB2using JDBC. The Web services manipulate the JDBC query result sets and return responses to the J2EE client application. q538292 ch36.qxd 8/18/03 8:45 AM Page 859 860 Part VIII ✦ Advanced Web Services How the application works When the application window is opened, a Web service is called that retrieves a list of unique quote authors. The Web service retrieves data from the Authors table of the XMLPB database on DB2. The connection from the Web service to the DB2 databases is made via JDBC. The application then draws the various Swing panels on the page and attaches AWT events to the panels. Users can scroll up and down the list of quote authors in the author List panel, and select a single author by click- ing on it in the list. Clicking on an author name triggers another call to another Web service. That Web service query is to retrieve all the quotes attributed to the selected author. The quotes are displayed in the quote list panel on the top right of the screen. When a user clicks on one of the quotes in the quote list panel, another J2EE Web service is called to generate XML document output for the selected quote and dis- play it in the output panel in the lower half of the application window. In the middle of the screen is a combo box that can be used to select output format options. The options are Just the Text, which just returns the quote as text, or DB2 XML, which returns the XML output shown in Listing 36-7, which is generated by the XMLPBWSMTServletDB2Format Web service. Aside from being a good J2EE Web services application prototype, the Quote XML Web service application is also a good example of applying a user interface to DB2 data. It’s also a good prototype from any application that uses Web services, JDBC, and Java GUI classes. The appli- cation contains examples of accessing and displaying DB2 data in several different ways, including strings, arrays, and XML documents. About the example DB2 data In this chapter we’re reusing tables from the XMLPB SQL Server database. Setup instructions for the database can be found in Chapter 20. Creating the Java Application User Interface We have broken down the source code into segments that relate to a specific topic, rather than showing the source code in its entirety on the pages. All of the examples contained in this chapter can be downloaded from the XML ProgrammingBible.com Website, in the Downloads section. Please see the Website for installation Instructions. Defining public variables and the application window Let’s look under the hood of the Java Application by breaking down the Java Application source code into topical sections with detailed explanations of the code, starting with the introductory application setup in Listing 36-8. q538292 ch36.qxd 8/18/03 8:45 AM Page 860 [...]... java.net.URL(“http://127.0.0.1:8080/axis/servlet/AxisServlet”) ); call.setOperationName( new javax .xml. namespace.QName (“XMLPBWSMTServletGetSingleAuthorList”, “GetSingleAuthorList”) ); call.addParameter( “CategoryName”, XMLType.XSD_STRING, javax .xml. rpc.ParameterMode.IN ); call.setReturnType(new javax .xml. namespace.QName(“http://www.xmlprogrammingbible.com/ wsdl/default/”, “ArrayOf_xsd_string”)); singleAuthorList = (String... javax .xml. namespace.QName(“XMLPBWSMTServletDB2Format”, “GetSingleQuoteDB2”) ); call.addParameter( “PassedQuote”, XMLType.XSD_STRING, javax .xml. rpc.ParameterMode.IN ); call.setReturnType(new javax .xml. namespace.QName(“http://www.xmlprogrammingbible.com/ wsdl/default/”, “string”)); XMLDoc = (String ) call.invoke( new Object[] {PassedQuote}); } catch(Exception e) { e.printStackTrace(); } return XMLDoc ; } Chapter 36 ✦ Accessing Relational Data via Web Services... developed two XML specifications for making Web services more secure: XML Signature and XML Encryption As the titles indicate, these recommendations apply to any XML document, though they probably will find their most practical use as part of Web services, when applied to SOAP envelopes Remember, SOAP is just XML, so security that applies to SOAP applies to any XML and vice versa XML Signature and XML Encryption... table, 433, 497–498, 510 511 AmazonListingsSchemaTable.xsd file, 497–498 AmazonListings.xsd file, 443 AmazonMacbethSpanish.dtd file, 49–51 AmazonMacbethSpanishforxsl .xml file, 350–351 AmazonMacbethSpanish1 .xml file, 387 AmazonMacbethSpanishwithDTDref .xml file, 49 AmazonMacbethSpanishwithinternalDTD .xml file, 53 AmazonMacbethSpanishwithXSDref .xml file, 68–71 AmazonMacbethSpanish .xml file, 192–194, 220,... single sign-on capabilities and permits disparate security systems to act as a single unit JSR 105 defines a standard API for XML digital signatures as defined by the W3C XML Signature Recommendation JSR 106 defines a standard set of APIs for XML digital encryption services, also based on the W3C implementation of XML encryption JSR 155 adds Secure Assertion Markup Language (SAML) assertions to Java, including... Apache XML Security Apache has implemented Java reference implementations of the XML- Signature Syntax and Processing and the XML Encryption Syntax and Processing Recommendations By the time this book is in print, they probably will have finished the XML Key Management recommendation implementation in Java as well You can find the Java and C++ code downloads for XML security implementations at http:/ /xml. .. for the W3C XML- Signature Syntax and Processing and XML Encryption Syntax and Processing Recommendations There is also support for XML Access Control functionality, partly supported by the W3C Canonical XML Version 1.0 Working Draft The free XML Security Suite download includes a jar file containing supporting classes and a 879 880 Part VIII ✦ Advanced Web Services number of examples of the XML Security... chapter and the book We hope you’ve found this book educational and occasionally entertaining (In other words, we hope that my occasional jokes weren’t too bad ) Please check the XML Programming Bible Website (http:// www.XMLProgrammingBible.com) for book updates and more information ✦ ✦ ✦ 883 Index SYMBOLS A & (ampersand) entity reference prefix, 22, 24 SQL Server query URL separator, 437 text, including... data, 287–288 ImportXML method, 286–288 overview of XML support, 271–272 version described in this book, 271 XML Spreadsheet Add-In, 282 XSLT export data, formatting using, 273, 274–277, 280, 281–283 import data, formatting using, 287–288 AcExportXMLObjectType constant, 279 ActionListener object, 544, 545–547, 822, 823–825, 862–864 Active Server Page, Access XML export to See ASP, Access XML export to add... call.setTargetEndpointAddress( new java.net.URL(“http://127.0.0.1:8080/axis/servlet/AxisServlet”) ); call.setOperationName( new javax .xml. namespace.QName(“XMLPBWSMTServletGetAuthorList”, “GetAuthorList”) ); call.setReturnType(new javax .xml. namespace.QName(“http://www.xmlprogrammingbible.com/ wsdl/default/”, “ArrayOf_xsd_string”)); AuthorList = (String [] ) call.invoke( new Object[] {}); } catch(Exception e) . The XMLPBWSMTServletGetAuthorList WSDL File <wsdl:definitions xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:apachesoap=”http:/ /xml. apache.org /xml- soap” xmlns:impl=”http://www.xmlprogrammingbible.com/wsdl/default/-impl” xmlns:intf=”http://www.xmlprogrammingbible.com/wsdl/default/” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/” xmlns:wsdlsoap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” targetNamespace=”http://www.xmlprogrammingbible.com/wsdl/default/”> <wsdl:types> <schema. xmlns=”http://schemas.xmlsoap.org/wsdl/” xmlns:apachesoap=”http:/ /xml. apache.org /xml- soap” xmlns:impl=”http://www.xmlprogrammingbible.com/wsdl/default/-impl” xmlns:intf=”http://www.xmlprogrammingbible.com/wsdl/default/” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/” xmlns:wsdlsoap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” targetNamespace=”http://www.xmlprogrammingbible.com/wsdl/default/”> <wsdl:types> <schema. encoding=”UTF-8”?> <ns1:GetDB2XMLResponse xmlns:ns1=”urn:/XMLPB/GetDB 2XML. dadx” xmlns:xsd=”http://www.w3.org/1999/XMLSchema” xmlns:xsi=”http://www.w3.org/1999/XMLSchema-instance”> <return> <xsd1:GetDB2XMLResult