1 / 19

ACE 104

ACE 104. Presenation John Knoepfle. Agenda. Homework 3 PropertySearch Web Service Overview WSDL Sample SOAP Messages WS-I Compliance Testing Thoughts on XML Tools Jdeveloper XMLSpy oXygen Stylus Studio Q&A. PropertySearch Web Service Overview. Created a PropertySearch schema

Download Presentation

ACE 104

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ACE 104 Presenation John Knoepfle

  2. Agenda • Homework 3 • PropertySearch Web Service Overview • WSDL • Sample SOAP Messages • WS-I Compliance Testing • Thoughts on XML Tools • Jdeveloper • XMLSpy • oXygen • Stylus Studio • Q&A

  3. PropertySearch Web Service Overview • Created a PropertySearch schema • Search parameters • Property type (McMansion, Single Family, Loft, Townhouse, etc.) • Number of bedrooms • Number of baths • Garage size (e.g. 1, 2, 3 car) • Pool (boolean) • Price range • Location specifier: <xsd:choice> (either by zip or by city/state) • Search results • List of properties • Including property type, number of bedrooms and baths, garage size, pool, price, and address

  4. WSDL Fragment (from PropertySearch service) … <types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.cccis.com/ace/104/knoepfle/PropertySearchService/"> <s:import namespace="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema" schemaLocation="PropertySearch.xsd"/> <s:import namespace="http://www.cccis.com/ace/104/knoepfle/CurrencySchema" schemaLocation="Currency.xsd"/> </s:schema> </types> <message name="PropertySearchRequest"> <part name="searchParameters" element="ps:propertySearchParameters"/> </message> <message name="PropertySearchResponse"> <part name="searchResults" element="ps:propertySearchResults"/> </message> <portType name="PropertySearchService"> <operation name="PropertySearch"> <input message="pss:PropertySearchRequest"/> <output message="pss:PropertySearchResponse"/> </operation> </portType> …

  5. Sample SOAP Messages • I ended up using both XMLSpy and oXygen to generate SOAP messages • Each tool provided part of what I needed, neither was bug free or complete (more later)

  6. PropertySearch Request Message (zip, doc/literal) <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:propertySearchParameters xmlns:m="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema"> <m:propertyDescription> <m:propertyType>Single Family</m:propertyType> <m:bedrooms>1</m:bedrooms> <m:baths>1</m:baths> <m:garageSize>0</m:garageSize> <m:pool>true</m:pool> </m:propertyDescription> <m:priceRange> <m:low>1.12</m:low> <m:high>1.12</m:high> </m:priceRange> <m:zipCode>00000-0000</m:zipCode> </m:propertySearchParameters> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  7. PropertySearch Request Message (city/st, rpc/encoded) <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" xmlns:m0="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema"> <SOAP-ENV:Body> <m:PropertySearch xmlns:m="http://www.cccis.com/ace/104/knoepfle/PropertySearchService/"> <m:propertySearchParameters xsi:type="m0:propertySearchParametersType"> <m0:propertyDescription xsi:type="m0:propertyDescriptionType"> <m0:propertyType xsi:type="xsd:string">Single Family</m0:propertyType> <m0:bedrooms xsi:type="xsd:positiveInteger">1</m0:bedrooms> <m0:baths xsi:type="xsd:positiveInteger">1</m0:baths> <m0:garageSize xsi:type="xsd:integer">0</m0:garageSize> <m0:pool xsi:type="xsd:boolean">true</m0:pool> </m0:propertyDescription> <m0:priceRange xsi:type="m0:priceRangeType"> <m0:low xsi:type="xsd:decimal">1.12</m0:low> <m0:high xsi:type="xsd:decimal">1.12</m0:high> </m0:priceRange> <m0:city xsi:type="xsd:string">String</m0:city> <m0:state xsi:type="xsd:string">AL</m0:state> </m:propertySearchParameters> </m:PropertySearch> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  8. PropertySearch Response Message (doc/literal) <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:Header/> <SOAP-ENV:Body> <m:propertySearchResults xmlns:m="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema"> <m:property> <m:propertyDescription> <m:propertyType>McMansion</m:propertyType> <m:bedrooms>4</m:bedrooms> <m:baths>2</m:baths> <m:garageSize>3</m:garageSize> <m:pool>true</m:pool> </m:propertyDescription> <m:price>300000.00</m:price> <m:address> <m:street>3807 West Addison</m:street> <m:city>Jackson Hole</m:city> <m:state>WY</m:state> <m:zipCode>60540-1234</m:zipCode> </m:address> </m:property> </m:propertySearchResults> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  9. oXygen Generated PropertySearch Request <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <oxy:PropertySearch> <searchParameters> <propertySearchParameters xmlns="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema"> <propertyDescription> <propertyType>PROPERTYTYPETYPE</propertyType> <bedrooms>NUMBEDROOMSTYPE</bedrooms> <baths>NUMBATHSTYPE</baths> <garageSize>GARAGESIZETYPE</garageSize> <pool>BOOLEAN</pool> </propertyDescription> <priceRange> <low>CURRENCYAMOUNTTYPE</low> <high>CURRENCYAMOUNTTYPE</high> </priceRange> <zipCode>ZIPCODETYPE</zipCode> </propertySearchParameters> </searchParameters> </oxy:PropertySearch> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  10. oXygen Generated PropertySearch Response <!-- Auto generated server sample response. --> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <oxy:PropertySearch> <searchResults> <propertySearchResults xmlns="http://www.cccis.com/ace/104/knoepfle/PropertySearchSchema"> <property> <propertyDescription> <propertyType>PROPERTYTYPETYPE</propertyType> <bedrooms>NUMBEDROOMSTYPE</bedrooms> <baths>NUMBATHSTYPE</baths> <garageSize>GARAGESIZETYPE</garageSize> <pool>BOOLEAN</pool> </propertyDescription> <price>CURRENCYAMOUNTTYPE</price> <address> <street>STRING</street> <city>STRING</city> <state>STATETYPE</state> <zipCode>ZIPCODETYPE</zipCode> </address> </property> </propertySearchResults> </searchResults> </oxy:PropertySearch> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  11. WS-I Compliance Testing • Tool Architecture

  12. WS-I Compliance Testing • Used the WSDL Analyzer component only • Method: • Updated analyzer config to point at appropriate part of WSDL • Ran analyzer • Ran xsltProc on report.xml to product report.html • Fix compliance problems • Rerun analyzer, etc…

  13. WS-I Compliance Testing • Failure sample: • Assertion: BP2202 • Result: failed • Failure Message: The XML declaration statement within the imported XML Schema does not use expected encoding (UTF-8 or UTF-16). • Failure Detail Message: http://www.cccis.com/ace/104/knoepfle/MortgageTable Element Location: lineNumber=4

  14. WS-I Compliance Testing • And another failure sample: • Assertion: BP2013 • Result: failed • Failure Message: soap:binding (in soapbind:body elements) refers to part(s) that do not have the "type" attribute. • Failure Detail Message: Name of operation that failed: getMortgagePayments Operation: name=getMortgagePayments style=REQUEST_RESPONSE Input: name=null Message: name={http://www.cccis.com/ace/104/knoepfle/MortgagePaymentsService/}getMortgagePaymentsSoapIn Part: name=mortgageTable elementName={http://www.cccis.com/ace/104/knoepfle/MortgageTable}mortgageTable Part: name=parameters …

  15. Thoughts on XML Tools

  16. Jdeveloper • Free download • XML support leaves something to be desired • Validation seems to be buggy—it would not validate some of my XML against schema, but other tools said it was valid • Plan to submit a bug report to Oracle on this • Didn’t attempt to use it for Homework 3

  17. XMLSpy • 30 day trial of 2007 Enterprise Edition • My favorite of the XML tools I tried • Good project features (i.e. including external folders, associating files with active project) • SOAP Message Generation • Only generates SOAP Request messages • Did a decent job on both document/literal and rpc/encoded • Allows you to send message to web service • Did not handle <xsd:choice> correctly in generated Request message; included both options • Also seemed to insert price range inside of property description with rpc/encoded • Did anyone find info on the student license? • Enterprise license for 50+ users

  18. oXygen • 30 day trial of Enterprise version • Good UI, but I preferred XMLSpy’s interface • SOAP Message Generation • Generated both SOAP Request and Response messages • For document/literal only • Did not seem to handle rpc/encoded correctly; it looked identical to document/literal • Generated messages only contained string values indicating data type • Handled <xsd:choice> correctly in generated Request message

  19. Stylus Studio • 30 day trial of 2007 XML Enterprise Suite • Very little time spent with this tool • Nice UI, very clear which features are active for active position • XSL support seemed especially good, I liked the graphical view • Built-in source control support, including ClearCase • Does not appear to support WSDL

More Related