561
Index
Aad hoc paths, 371adaptive serializers, 509–512addPort method (Service), 102, 104, 110Ajax, 463–480
front end to SOAShopper case study, 470–479
Java EE 5 Web services with, 468–470algorithmic type mappings, 15Amazon.com SOAP-based services,
434–444annotations, 14, 37, 61, 74, 273–278
dependency injection, 82–83, 317, 330creating proxy instances, 279–280
external annotation files, 197JAXB annotations
implementing type mappings with, 224–235
for XML messaging, 289–292mapping annotations, 59–62
WSDL/Java mapping and, 78processing, 366–367SEI (service endpoint interface),
273–278anonymous complex types,
mapping, 201Apache Ant 1.7.x
configuring, 530–531installing, 527
Apache Maven 2.0.xconfiguring, 528–530installing, 527
application frameworks, 6–7
ASF (Adaptive Serializer Framework), 198
AsyncHandler class (javax.xml.ws), 297, 301–302
asynchronous invocation, 50, 297–304callback, 50, 301–304polling, 50, 297–299with proxies, 299–301
AttachmentMarshaller class, 73AttachmentUnmarshaller class, 73auto-deployment, 365automatic (“drag-and-drop”)
deployment, 80, 402–404AXIOM object model, 67
BBASIC-AUTH authentication, 405–406BigInteger class, 201, 208binary data encoding, 72–73Binder class (javax.xml.bind), 71–72binding
mapping vs., 195–199standard WSDL/Java mapping, 38, 78,
267–273binding declarations, 62–63binding language (JAXB 2.0),
62–65, 235–245asynchronous invocation with SEI
proxies, 300binding runtime framework, 65–69BindingProvider interface
(javax.xml.ws), 113@BindingType annotation, 132body, SOAP messages, 146
562 Index
book example codeconfiguring environment for, 84installing, 528
Bridge Pattern, 450
Ccallback, asynchronous, 50, 301–304callbacks, marshal events, 71Castor utility, 198
client-side invocation with custom Java/XML mappings, 292–296
server-side invocation with custom Java/XML mappings, 325–329
client-side invocation, 9–11, 265–310asynchronous, 50, 297–304
callback, 50, 301–304polling, 50, 297–299with proxies, 299–301
custom Java/XML mappings, 292–296
JAX-WS proxies, 46, 265–285asynchronous invocation, 299–301creating and using, 267fault handling with, 282–285invoking Web service with, 279–282WSDL/Java mapping, 267–273
SOAP message handlers, 304–309steps of, 34–36XML messaging, 285–292
client-side JWS support, 34–36client-side message handlers, 304–309client-side thread management, 50component scope for binding
declarations, 63configuration files (handler chain files),
47, 388–389connect method (HttpURLConnection),
99, 106create method (Service), 280createDispatch method (Service),
46, 102, 104, 110, 288
Ddata transformation
JAXB 2.0 specification for, 256–261XSLT for. See XSLT
DatatypeConverter class (javax.xml.bind), 241
definition scope for binding declarations, 63
dependency injection, 82–83, 317, 330creating proxy instances, 279–280
deployment, 16–18, 359–375automatic (“drag-and-drop”),
80, 402–404with custom Java/XML mappings,
325–329with deployment descriptors, 384–402
ejb-jar.xml descriptor, 372, 390–394platform-specific descriptors,
397–402webservices.xml descriptor,
357–358, 372, 395–397web.xml descriptor,
384–389, 398, 430EJB endpoints (WSEE), 371–375with Endpoint class, 347–355REST services, 125–135
with JWS, 131–135without JWS, 126–131
SOA-J application framework, 514–519without deployment descriptors,
376–384WSEE 1.2 and. See WSEE 1.2
specificationdeserialization, 11. See also serialization
during invocation, 12–14, 67using schema generated beans,
186–188deserializers. See serializersdetails element (SOAP fault
messages), 283development modes, 40–42, 44Dispatch interface (javax.xml.ws), 46
asynchronous polling with, 297–299
Index 563
creating Dispatches from Service instances, 46, 102, 104, 110, 288
pull messaging (HTTP GET), 101push messaging (HTTP POST),
110–112for XML messaging, 287–291, 296
dispatching, 8, 151–166document/literal style, 156–159document/literal wrapped style,
51, 159–162EJB endpoints (WSEE), 371–375JAX-WS 2.0 WSDL/Java mapping
workarounds, 166–175rpc/literal style, 51, 154–156
document/literal styles vs., 159SOAP messages for, 155
summary of process, 162–164WSDL port, determining, 151–153
document/literal style, 156–159document/literal wrapped style,
51, 159–162Dojo widget. See AjaxDOM, implement Web service
processing with, 323–325drag-and-drop (automatic) deployment,
80, 402–404dynamic JAX-WS clients, 45–46dynamic proxies, 265–266. See also
proxies, JAX-WS (SEI)
Eease-of-use features in JWS, 36–43eBay SOAP-based services, 434–444EIS (Enterprise Information Systems)
getting records from REST with JWS, 101–105
getting records from REST without JWS, 98–100
sending records to REST with JWS, 110–114
sending records to REST without JWS, 105–109
XML documents and schema for, 88–97
EJB 3.0 specification, POJO support, 83EJB-JAR, packaging servlet endpoints
with, 363–365EJB endpoints (WSEE), 82
deployment and dispatching, 371–375ejb-jar.xml for, 390–394
ejb-jar.xml descriptor, 372, 390–394encoding binary data, 72–73encryption with WSEE-deployed
services, 407Endpoint API (javax.xml.ws), 52–53
Java SE deployment with, 347–355endpoint listeners, 152, 311–312endpoint publishing at runtime, 52–53Enterprise Information Systems.
See EISexample code
configuring environment for, 84installing, 528
exceptions (Java)asynchronous callback, 303–304converting to SOAP fault messages, 49
ExecutionException exception (java.util.concurrent), 304
Executor interface (java.util.concurrent), 50, 298
external annotation files, 197external bindings files (JAXB),
63–64, 244–245external mapping files (Castor), 292–295
Ffail-fast validation, 70fault bean, 334–337fault processing, 329, 332–343
with SEI proxies, 282–285flexible unmarshalling mode. See
validationFuture interface (java.util.concurrent),
297, 302
564 Index
GGET requests (HTTP), 29–30, 32
Dispatch interface (javax.xml.ws), 101–102
HttpURLConnection class (javax.net), 98–100
getContext method (Response), 298getPort method (Service), 280
asynchronous callback, 301getRequestContext method
(BindingProvider interface), 48getResponseContext method
(BindingProvider interface), 48, 113
GlassFish server. See also deploymentautomatic (“drag-and-drop”)
deployment, 80, 402–404EJB endpoint deployment and
dispatching, 372–375servlet endpoint deployment, 366–368wsimport utility, 171, 266, 270–271, 435
GlassFish server, starting and stopping, 532
global scope for binding declarations, 62–63
granularity constraints, 45
Hhandler annotations (WS-Metadata), 79handler chains, 47
configuration files, 47, 388–389packaging SIBs for deployment,
362, 365handler programming model
(WSEE), 82@HandlerChain annotation, 47, 79.
See also EJB endpoints (WSEE)client-side handlers, 305server-side handlers, 343–345
handleResponse method (AsyncHandler), 302–303
HandlerResolver interface (javax.xml.ws.handler), 305–306
handlers, JAX-WS, 47, 340–342client-side message handlers, 304–309server-side message handlers, 343–347
header blocks, SOAP, 146HTTP binding, 49, 132HTTP transport for SOAP messages,
29–30HttpServlet class, deploying RESTful
services, 127–128HttpURLConnection class (javax.net)
pull messaging (HTTP GET), 98–100push messaging (HTTP POST),
105–107
Iinterceptors, 83invocation, 8–11
asynchronous, 50, 297–304callback, 50, 301–304polling, 50, 297–299with proxies, 299–301
with Java proxies, 279–282. See alsoproxies, JAX-WS (SEI)
JAXB binding runtime framework and, 66–67
mapping WSDL/SOAP to. Seedispatching
SEI proxies, 46, 265–285asynchronous invocation, 299–301creating and using, 267fault handling with, 282–285invoking Web service with, 279–282WSDL/Java mapping, 267–273
serialization during, 12–14, 67server-side, 8–9, 11, 311–356
deployment with custom Java/XML mappings, 325–329
deployment with Endpoint class, 347–355
fault processing, 329, 332–343JAX-WS architecture, 311–316providers and XML processing
without JAXB, 320–325
Index 565
server-side handlers, 343–347“Start from WSDL” with SEI,
316–320steps of, 30–34, 312–315validation, 329–332
SOA-J application framework, 493–503with XML, 46
invocation, client-side, 9–11, 265–310asynchronous, 50, 297–304
callback, 50, 301–304polling, 50, 297–299with proxies, 299–301
custom Java/XML mappings, 292–296JAX-WS proxies. See proxies,
JAX-WS (SEI)SOAP message handlers, 304–309steps of, 34–36XML messaging, 285–292
InvocationHandler class (java.lang.reflect), 266
invoke method (Dispatch), 102, 110, 112for XML messaging, 289
invoke method (Provider), 133, 320–321invokeAsync method (Dispatch), 298
JJ2EE programming model, 357Java, starting with (development mode),
40–42Java EE 5 platform, 82–84
Ajax with, 468–470JWS standards. See JSRsSDK installation, 526–527
Java exceptionsasynchronous callback, 303–304converting to SOAP fault messages, 49
Java Interface Proxies, 46Java RMI, 265Java SE 6 platform, installing, 535Java value classes, 57–58, 205–206Java/WSDL mapping, 38, 267–273
mapping annotations and, 78
Java/XML binding or mapping, 54–59, 137
binding versus mapping, 196–197Castor for. See Castor utilitycustom, client-side invocation with,
292–296custom, server-side invocation with,
325–329JAX-WS 2.0 limitations, 180–181JAXB standard for, overview of,
199–209limitations, working around, 182–194
dispatching, 166–175using schema compiler, 182–189using schema generator, 189–194
mapping annotations, 59–62, 78role of, 178–179
java.lang.reflect.InvocationHandlerclass, 266
java.math.BigInteger class, 201, 208java.net.URL class
pull messaging (HTTP GET), 98–100push messaging (HTTP POST),
105–107java.util.concurrent.ExecutionException
exception, 304java.util.concurrent.Executor class,
50, 298java.util.concurrent.Future interface,
297, 302java.util.concurrent.Response
interface, 297javax.jws.soap package, 78javax.jws.SOAPBinding annotation, 51java.xml.bind.JAXBElement class,
180, 222–223javax.net.HttpURLConnection class
pull messaging (HTTP GET), 98–100push messaging (HTTP POST),
105–107javax.wms package, 78javax.xml.bind.annotation.XmlAdapter
class, 245–256javax.xml.bind.Binder class, 71–72
566 Index
javax.xml.bind.DatatypeConverterclass, 241
javax.xml.soap.SOAPFault class, 284, 338–339
javax.xml.transform.Transformer class, 216
javax.xml.validation.Schema class, 216javax.xml.ws.AsyncHandler class,
297, 301–302javax.xml.ws.BindingProvider
interface, 113javax.xml.ws.Dispatch class, 46
asynchronous polling with, 297–299creating Dispatches from Service
instances, 46, 102, 104, 110, 288pull messaging (HTTP GET), 101push messaging (HTTP POST),
110–112for XML messaging, 287–291, 296
javax.xml.ws.Endpoint API, 52–53Java SE deployment with, 347–355
javax.xml.ws.handler.HandlerResolver interface, 305–306
javax.xml.ws.MessageContext class, 48javax.xml.ws.Provider interface,
46–47, 131–133server-side invocation, 320–325
javax.xml.ws.Service class, 34, 45creating Dispatches,
46, 102, 104, 110, 288pull messaging (HTTP GET), 101–102push messaging (HTTP POST),
110–112javax.xml.ws.soap.SOAPFaultException
exception, 282, 337–338javax.xml.ws.WebServiceContext
interface, 317, 330javax.xml.ws.WebServiceException
exception, 340–342JAX-RPC 1.1 specification, 40
JAX-WS 2.0 improvements over, 5, 54JAX-WS 2.0, 524JAX-WS 2.0 specification, 5, 43–53
annotations. See also source code annotations
asynchronous, 50, 297–304callback, 50, 301–304polling, 50, 297–299with proxies, 299–301
client-side development, 9–11, 265–310
asynchronous. See asynchronous invocation
custom Java/XML mappings, 292–296
proxies. See proxies, JAX-WS (SEI)SOAP message handlers, 304–309steps of, 34–36XML messaging, 285–292
dispatching, 151–166determining WSDL port, 151–153document/literal style, 156–159document/literal wrapped style,
159–162rpc/literal style, 154–156shortcomings of, 165–166working around limitations of,
166–175WS-I Basic Profile, 153–154
dynamic and static clients, 45–46feature map, 43SEI proxies, 46, 265–285
asynchronous invocation, 299–301creating and using, 267fault handling with, 282–285invoking Web service with, 279–282WSDL/Java mapping, 267–273
server-side development, 8–9, 11, 311–356
deployment with custom Java/XML mappings, 325–329
deployment with Endpoint class, 347–355
fault processing, 329, 332–343JAX-WS architecture, 311–316providers and XML processing
without JAXB, 320–325
Index 567
server-side handlers, 343–347“Start from WSDL” with SEI,
316–320steps of, 30–34, 312–315validation, 329–332
WSDL/Java mapping, 38, 267–273mapping annotations and, 78
JAX-WS Service Endpoints, 360JAXB 2.0 specification,
54–73, 195–263, 524annotations. See also source code
annotationsbinding versus mapping, 195–199bypassing serialization process, 46for data transformation, 256–261feature map, 57implementing type mappings, 209–217
with annotations, 224–235with binding language, 235–245recursively, 217–224with XmlAdapter class, 245–256
serialization rules, 39standard Java/XML binding, 199–209.
See also Java/XML bindingjaxb:class declaration, 237–238JAXBElement class (java.xml.bind),
180, 222–223jaxb:globalBindings declaration, 236–237jaxb:javaType declaration, 239–240jaxb:package declarations, 201jaxb:property declarations, 207jaxb:schemaBindings declaration,
236–237jax:dom declarations, 65JAXP (Java API of XML Processing),
121–125JAXWSServlet class, 367–368JSR-181 processor, 79JSRs (Java Web Services standards),
30–36client-side support, 34–36server-side support, 30–34
JWS (Java Web Services), 25–84ease-of-use features, 36–43
Java EE 5 platform, impact of, 82–84JAX-WS 2.0. See JAX-WS 2.0
specificationJAXB. See JAXB 2.0 specificationin SOA development, 26–36WS-Metadata, 31, 73–80, 357, 358
annotations, 37, 74–75, 78–79. Seealso source code annotations
auto-deployment, 365feature map, 76
WSEE 1.2 specification, 31, 80–82, 357–358
encryption with, 407feature map, 81
Llocal element declarations, 201logical handlers, 47, 344–345
Mmapping annotations, 59–62
WSDL/Java mapping and, 78mapping, binding vs., 195–199Mapping class (Castor), 295mapping strategies, 14–15. See also type
mappingsmapping WSDL to/from Java,
38, 267–273mapping annotations and, 78
marshalling (unmarshalling), JAXB, 65–69
annotated classes, 233–234event callbacks, 71with schema generated beans, 187–188validation and, 69
Mavenconfiguring, 528–530installing, 527
message context, 48message handlers (SOAP), 304–309Message mode (Provider interface), 321Message Payload mode (Provider
interface), 321
568 Index
MessageContext class (javax.xml.ws), 48MTOM standard, 66, 67, 72–73multivariate type mappings, 245. See also
XmlAdapter class
Nnamed complex types, mapping, 208namespace prefix definitions, 537
OOASIS XML Catalogs 1.1 specification,
51, 407–409one-way operations (WSDL), 50openConnection method (URL), 99, 105Order Management Service (example),
26–29
Ppackaging Web services, 359–375. See
also deploymentparameter style (WSDL style), 152–153parseMethod attribute (jaxb:javaType),
240–242partial binding of XML documents,
71–72PAYLOAD service mode, 288platform-specific deployment
descriptors, 397–402POJO support, 83POJOs, annotating, 225polling, 50, 297–299port components, 30–31, 81, 359port, WSDL, 151–153portability, JAXB, 70POST requests (HTTP), 29–30
HttpURLConnection class (javax.net), 105–107
printMethod attribute (jaxb:javaType), 240–242
protocol handlers, 47, 344–345Provider interface (javax.xml.ws),
46–47, 131–133
server-side invocation, 320–325proxies, JAX-WS (SEI), 46, 265–285
asynchronous invocation, 299–301creating and using, 267fault handling with, 282–285invoking Web service with, 279–282WSDL/Java mapping, 267–273
pseudo reference passing, 52publish method (Endpoint), 349publishing endpoints and runtime, 52–53publishing WSDL, 16–17
Rraw XML for messaging, 286–289recursive framework for type mappings,
217–224reference passing, 52Representational State Transfer. See
REST paradigmrequest handlers, JAX-WS, 47request message (SOAP), example of,
146–147in document/literal style, 158–159in document/literal wrapped style, 162in rpc/literal style, 156
@RequestWrapper annotation, 173, 273–275, 277
@Resource annotation, 317response handlers, JAX-WS, 47Response interface
(java.util.concurrent), 297response message (SOAP), example of,
147–148@ResponseWrapper annotation,
173, 275, 278REST paradigm, 85–136
client-side services consumption, 98–114
getting EIS records with JWS, 101–105
getting EIS records without JWS, 98–100
Index 569
sending EIS records with JWS, 110–114
sending EIS records without JWS, 105–109
deployment of, 125–135with JWS, 131–135without JWS, 126–131
IDL for XML over HTTP without SOAP, 139
server-side invocation, 315SOAP vs., 87, 145–146, 259SOAShopper services,
423–431, 444–449roles, security, 406rpc/literal style, 51, 154–156
document/literal styles vs., 159SOAP messages for, 155
RPC messages, RESTful services vs., 86rule-based type mappings, 15run-time architecture for endpoint,
311–312runtime endpoint publishing, 52–53
SSAAJ interface, 67
fault processing, 337–339SAX (Simple API for XML), 36Schema class (javax.xml.validation), 216schema compiler, 57, 182–189, 196schema generator,
59, 59–60, 189–194, 196schema scope for binding declarations, 63scope, binding declarations, 62–63security, 405–407
SOAP message handlers, 304–305SEI (service endpoint interface),
9, 34–35, 45, 265, 359–360annotations, 273–278deploying SIB without descriptors,
378–381with Endpoint class, 347–348proxies, 46, 265–285
asynchronous invocation, 299–301
creating and using, 267fault handling with, 282–285invoking Web service with, 279–282WSDL/Java mapping, 267–273
server-side invocation, 316–320separation of concerns, 256serialization, 11–16, 195
binary data encoding, 72–73during invocation, 12–14, 67mapping annotations for, 60recursive, 217–224SOA-J application framework, 503–514validation and. See validation
serialization context, 14, 16, 39–40SOA-J application framework, 485
Serializer interface, 219–220serializers, 218–224server-side invocation, 8–9, 11, 311–356
deployment with custom Java/XML mappings, 325–329
deployment with Endpoint class, 347–355
fault processing, 329, 332–343JAX-WS architecture, 311–316providers and XML processing without
JAXB, 320–325server-side handlers, 343–347“Start from WSDL” with SEI, 316–320steps of, 30–34, 312–315validation, 329–332
Service class (java.xml.ws), 34, 45creating Dispatches,
46, 102, 104, 110, 288pull messaging (HTTP GET), 101–102push messaging (HTTP POST), 110–112
service-oriented architecture. See SOAservice endpoint interface. See SEIservice implementation bean. See SIBServiceDeployment class, 139@ServiceMode annotation, 322servlet endpoints (WSEE), 32, 81
deployment, 367packaging using WARs, 361–363web.xml for, 384–389
570 Index
setAttachmentMarshaller method (Marshaller), 73
SetAttachmentUnmarshaller method (Unmarshaller), 73
setContentType method (HttpServletResponse), 129
setHandlerResolver method (Service), 305
setMapping method (Mapping), 295setMetadata method (Endpoint API),
53, 349setSchema method (Marshaller or
Unmarshaller), 208–209SFJ. See “Start from Java” development
modeSFWJ. See “Start from WSDL and Java”
development modeSIB (service implementation bean),
38, 79, 169–170, 359deploying without descriptors,
376–378packaging SIBs for deployment,
361–364Provider usage modes, 321–322validation. See validation
simplified packaging, WSEE, 82SOA
data transformation, 115example of, 26–29need for SOAP, 145–146need for WSDL, 108–109, 138–139role of XML Schema, 91–97schema libraries, 139–141suitability of JAXB, 195–199type mappings, 178–179WSDL-centric framework, 481–482
SOA-J application framework, 7, 481–521
architecture, 483–486building and deploying, 535deployment subsystem, 514–519invocation subsystem, 493–503serialization subsystem, 503–514
WSDL-centric development with, 486–493
SOA Integrationdefinition, 137SOAShopper example architecture,
412–415start from WSDL and Java,
56, 175–177using the Bridge pattern, 450–459
SOAP, 145–151binary data encoding of messages,
72–73dispatching messages. See dispatchingfault messages
converting Java exceptions to, 49examples of, 148–150handling with proxies, 282–285
mapping to Java invocation. Seedispatching
message handlers, 304–309REST vs., 145–146, 259SOAShopper services,
417–423, 434–444Version 1.1 standard, 524
SOAP binding annotations (WS-Metadata), 78
SOAP binding for message processing, 48
SOAP/JMS deployment, 315SOAP messages, 29
examples of, 146–150fault. See SOAP, fault messagestransport protocols for, 29–30validating. See validation
SOAP services, REST services vs., 87soap:address element, 151–152, 377,
380, 382, 386–387identifying (dispatching process), 163
@SOAPBinding annotation, 51, 76, 78SOAPFault class (javax.xml.soap),
284, 338–339SOAPFaultException exception
(javax.xml.ws.soap), 282, 337–338@SOAPMessageHandlers annotation, 79
Index 571
SOAShopper case study, 411–461Ajax front-end, 470–479API and Integration Layer, 450–460building and deploying, 534–535eBay and Amazon Services (SOAP),
434–444overview of, 411–416RESTful services and standard XML
schema, 423–431service implementation, 431–434SOAP services, 417–423Yahoo! Services (REST), 444–449
source code annotations, 14, 37, 61, 74dependency injection, 82–83, 317, 330
creating proxy instances, 279–280external annotation files, 197JAXB annotations
implementing type mappings with, 224–235
for XML messaging, 289–292mapping annotations, 59–62, 78
WSDL/Java mapping and, 78processing, 366–367SEI (service endpoint interface),
273–278standard binding, 14standard serialization context,
14, 16, 39–40SOA-J application framework, 485
standard WSDL/Java mapping, 38, 267–273
mapping annotations and, 78“Start from Java” development mode,
40, 42, 44, 74implementing type mappings, 224–235Java/XML binding and, 59Java/XML bindings and, 56
“Start from WSDL” development mode, 40–42, 44
server-side invocation, 316–320“Start from WSDL and Java”
development mode, 41–42, 175–181
annotation-centric design and, 61, 74–75
Java/XML binding and, 58–59JAX-WS 2.0 limitations, 175role of Java/XML mapping, 175–181SOAShopper case study, 417WS-Metadata annotations and, 79–80
“Start from XML and Java” development mode, 56
“Start from XML Schema” development mode
implementing type mappings, 235–245Java/XML bindings and, 56
@Stateless annotation, 83, 360stateless session bean. See EJB
endpoints (WSEE)static JAX-WS clients, 45–46static WSDL, 45style attribute (WSDL style), 152–153sun-ejb-jar.xml descriptor, 372, 400–402sun-web.xml descriptor, 398–399Symmetric HTTPS, 405, 407
Tthread control, client-side, 50tools, JWS as, 6–7trade-offs, JWS, 36–43Transformer class
(javax.xml.transform), 216type mappings, 14–15, 54
binding tools and, 196implementing with JAXB.
See JAXB 2.0 specificationJava/XML. See Java/XML bindingrecursive framework for, 217–224schema compiler, 57, 182–189, 196schema generator,
59, 59–60, 189–194, 196SFWJ development and, 61WSDL/Java mapping, 38, 78, 267–273XML/HTTP, 49, 132
572 Index
Uunmarshal method (XmlAdapter), 250unmarshalling. See marshalling
(unmarshalling), JAXBURL class (java.net)
pull messaging (HTTP GET), 98–100push messaging (HTTP POST),
105–107use attribute (WSDL style), 152–153
Vvalidation, 69–70, 329–332
server-side handlers for, 345–347value classes, 57–58, 205–206
Wwaitfor task, 404WARs, packaging servlet endpoints with,
361–363Web Services, as hard to learn, 2–7Web Services Addressing (WS-
ADDRESSING), 152Web services deployment descriptors,
360, 384–402Web Services Platform Architecture.
See WSPAWeb services security, 405–407
SOAP message handlers, 304–305@WebFault annotation, 49@WebMethod annotation, 173, 277
operationName element, 77, 79@WebParam annotation, 275, 278
name element, 78@WebResult annotation, 173, 275, 277
name element, 78@WebService annotation, 40, 41, 76,
173, 277, 316–318, 348WebServiceContext interface
(javax.xml.ws), 317, 330WebServiceException exception
(javax.xml.ws), 340–342@WebServiceProvider annotation,
131–132, 321–323
@WebServiceRef annotation, 83, 279–280
webservices.xml descriptor, 357–358, 372, 395–397
web.xml descriptor, 384–389, 398SOAShopper REST endpoint
deployment, 430wrappers
document/literal wrapped style, 51, 159–162
for JAXB-generated code, 39“Start from WSDL and Java”
development and, 75writeTo method (SOAPMessage), 309WS-ADDRESSING 1.0
specification, 152WS-I Basic Profile, 153–154WS-Metadata 2.0 specification,
31, 73–80, 357, 358annotations, 37, 74–75, 78–79. See also
source code annotationsauto-deployment, 365feature map, 76
WS-Security standard, 407WSDL, 138–145, 360, 523
example of, 141–145mapping to Java invocation. See
dispatchingmapping to Java targets, 44–45one-way operations, 50publishing, 16–17SOA-J application framework,
7, 481–521architecture, 483–486building and deploying, 535deployment subsystem, 514–519invocation subsystem, 493–503serialization subsystem, 503–514WSDL-centric development with,
486–493starting with (as development mode),
40–42static, 45
Index 573
WSDL artifacts, deploying with, 381–384
WSDL documents, 29WSDL faults
converting Java exceptions to, 49inputMessageValidationFault fault,
143, 149WSDL/Java mapping, 38, 267–273
mapping annotations and, 78WSDL Mapping Annotations
(WS-Metadata), 78WSDL port, determining, 151–153WSDL styles, 50–51, 152–153
document/literal style, 156–159document/literal wrapped style,
51, 159–162rpc/literal style, 51, 154–156
document/literal styles vs., 159SOAP messages for, 155
wsdl:binding element, 143–144wsdl:fault element, 332–334, 340
fault handling with proxies, 282–285JAX-WS WSDL/Java mapping,
271–273wsdl:input element, 271wsdl:message element, 142–143
in document/literal style, 157–158in document/literal wrapped style,
160–161JAX-WS WSDL/Java mapping,
271–273in rpc/literal style, 155–156
wsdl:operation, 157wsdl:operation element, 152, 276
asynchronous invocation. Seeasynchronous invocation
identifying (dispatching process), 163JAX-WS WSDL/Java mapping, 271
wsdl:output element, 271wsdl:port element, 151–152
deploying SIB without descriptors, 377, 380
obtaining (dispatching process), 163wsdl:portType element, 142–143
deploying SIB without descriptors, 376, 379
JAX-WS WSDL/Java mapping, 267–273
obtaining (dispatching process), 163shortcomings of JAX-WS 2.0
dispatching, 165–175wsdl:service element, 144–145wsdl:serviceName element, 376, 380wsdl:types element, 141–142
in document/literal style, 157–158in document/literal wrapped style,
160–161JAX-WS WSDL/Java mapping,
271, 273in rpc/literal style, 155–156
WSEE 1.2 specification, 31, 80–82, 357–358
encryption with, 407feature map, 81
WSIAP standard, 72–73wsimport utility, 171, 266, 270–271, 435WSPA (Web Services Platform
Architecture), 8–18
XXML, invocation with, 46XML annotations. See binding language
(JAXB 2.0)XML Catalogs, 51–52XML documents
with REST services, 97–114getting EIS records with JWS,
101–105getting EIS records without JWS,
98–100sending EIS records with JWS,
110–114sending EIS records without JWS,
105–109XML/HTTP binding, 49, 132XML/Java mappings. See Java/XML
binding
574 Index
XML messaging, 285–292with custom annotated JAXB classes,
289–292with raw XML, 286–289
XML Schema Version 1.0, 524XML schemas, extracting, 330–332XML service providers, 46–47@XmlAccessorType annotation, 183,
204, 228–229, 230XmlAdapter class
(javax.xml.bind.annotation),245–256
@XmlAttachmentRef annotation, 73@XmlAttribute annotation, 208, 233@XmlElement annotation,
201, 204, 227, 231@XmlElementWrapper annotation, 228@XmlJavaTypeAdapter annotation,
61–62, 241, 245, 247–250, 255–256@XmlMimeType annotation, 72
@XmlRootElement annotation, 55, 204, 227
@XmlSchema annotation, 229–230namespace element, 201
@XmlType annotation, 204, 231, 233XPath
for external bindings files, 64for XSLT data transformations, 117
xsl:apply-templates instructions, 119–120XSLT (Extensible Stylesheet Language
Transformations), 114–125versus JAXB 2.0, for data
transformation, 256processing in Java. See JAXPschema generator and, 189–194Version 1.0 standard, 524
xs:positiveInteger mapping, 201xs:schema nodes, extracting, 330–332
YYahoo! RESTful services, 444–449