Multiple choice technology programming languages

A document-style service defines a document passed to the Web service using xsd:anyType in the WSDL file that describes the service. How should the document be typed in Java

  1. use javax.xml.soap.Element

  2. use javax.xml.soap.Node

  3. use javax.xml.soap.SOAPHeader

  4. use javax.xml.soap.SOAPElement

  5. use javax.xml.soap.SOAPFault

  6. use javax.xml.soap.SOAPBodyElement

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In JAX-RPC/SAAJ, xsd:anyType maps to javax.xml.soap.SOAPElement in Java to represent arbitrary XML content. SOAPElement extends Node and represents an element in a SOAP message. Standard Element or Node interfaces are too generic or not SAAJ-specific, while SOAPHeader or SOAPFault are specialized SOAP components.