Thanks Ajith.  I should have read the documentation more thoroughly, including the caveats at the bottom!

Performance is one of my objectives.  I want to use the direct access to the pull parser that axis2/adb provides to efficiently process potentially very large incoming documents passed as parameters to the SOAP messages.  Specifically, I want to grab the characters events and stream them into a reusable nio CharBuffer, rather than having them built into a DOM with freshly consed strings.

Does axis2 with XMLBeans also provide the capability to directly access StAX to custom-parse incoming message parameters?

The main reason for the <choice> options is that I need the service to be accessible from a .Net client, and have read various places (including on this mailing list) that SOAP faults are best avoided for interop, in favor of passing exceptions back within the response messages.  One approach is to design the response messages as <choice>'s that are the real response or an exception.  This is convenient, but obviously not the only approach.  I could use a different representation that doesn't require the <choice> if that is the only way to get direct access to StAX.

I'd appreciate you advice.

Thanks,

Chuck


Ajith Ranabahu <[EMAIL PROTECTED]> wrote on 01/23/2006 11:29:12 PM:

Hi Chuck,
The choice element is not handled in the ADB schema compiler yet (at least we are not sure what is the best way to deal with it). Right now we do not throw any exceptions but silently skip that (that is why the empty class)
Please use XMLBeans if you need the support for choice for  now.

On 1/24/06, Chuck Williams <[EMAIL PROTECTED]> wrote:
I have a complexType that contains a <choice> of two alternative
elements, like this:

<xsd:complexType name="AorB">
    <xsd:choice>
        <xsd:element name="A" type="xsd:string"/>
        <xsd:element name="B" type="xsd:string"/>
    </xsd:choice>
</xsd:complexType>

and a reponse message that contains a value of this type:

<message name="respmessage">
    <part name="resp" type="asxsd:AorB"/>
</message>

and a portType with an operation that returns the response message:

<portType name="FooPortType">
    <operation name="Bar">
        <input .../>
        <output message="as:respmessage"/>
    </operation>
</portType>

WSDL2Java generates a class  AorB and requires it as content of the
respmessage to be returned from the Bar() method in the generated
FooPortTypeSkeleton.  However, AorB has no setters or getters, so there
is no way to give it the A or B element to return.  Also, A and B do not
extend AorB so there is no way to pass either of them directly.

How is this supposed to work?

Thanks for any help,

Chuck




--
Ajith Ranabahu

Reply via email to