Code Generation: java2wsdl
Writing WSDL By Hand Is A PITA
  • Map all of the Java data types to their XML Schema equivalents
  • Map Java package names to namespaces
  • Call out the operations and their parameters
  • Groups the class' methods as WSDL operations of the service
  • Specify bindings
A descriptive WSDL has a lot of stuff to specify and we want to make the mapping to our native language implementation in Java reasonable. The Java2WSDL utility comes in the axis.jar - it can save us a lot of rigamarole by introspecting our implementation and generating the WSDL for us.
java org.apache.axis.wsdl.Java2WSDL \ 
    --output build/fogkids.wsdl \ 
    --location http://localhost:8080/fogkids/services/ApparelItem \ 
    --namespace urn:service.fogkids.arachna.com \ 
    --PkgtoNS com.arachna.fogkids.service urn:service.fogkids.arachna.com \ 
    com.arachna.fogkids.biz.ApparelItemBiz
Slide 40 of 58 Contents
  1 |   2 |   3 |   4 |   5 |   6 |   7 |   8 |   9 | 10
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58
www.arachna.com > Educational Resources > Tutorials > O'Reilly Open Source Conference (2002) > Exchanging Objects and Messages With SOAP

spidaman
© 2002-2009 Ian Kallen | Copyright Notice