(A) doStuff parameter is a simple type
<message name="doStuff"> <part name="param" type="xsd:sting"/> </message>
(B) doStuff parameter references a schema element
<message name="doStuff"> <part name="param" element="tns:foo"/> </message>
(C) doStuff parameter references a schema complex type
<message name="doStuff"> <part name="param" type="tns:FooType"/> </message>
Of those three, I am not sure if (C) is even allowed. In any case, how do the messages look like?
<doStuff> <param>Hello world</param> </doStuff>
<doStuff> <tns:foo> ... </tns:foo> </doStuff>
Jason T. Greene:
Yes WSDL 1.1 allows it, as well ws the WS Basic Profile 1.1. From the
profile: "When a wsdl:part element is defined using the type attribute, the serialization of that part in a message is equivalent to an implicit (XML Schema) qualification of a minOccurs attribute with the value "1", a maxOccurs attribute with the value "1" and a nillable attribute with the value "false".
So we can support this by on-the-fly generating the above mentioned schema defintion.
I believe (C) should look identical to a complex type that was exposed as an element, but with the message param name instead.
Yes, I think we should still consider passing an XMLStreamWriter on marshalling and an XMLStreamReader on unmarshalling. The advantage here is that we can place the position of the stream at the exact tag that JAXB should operate on.