I have a soap response which is RPC style, so it has ‘multiref’s. The response was passed to me as a String. Can I use StAX parser to parse it? Can StaX resolve mutirefs automatically?
Thanks,
Sarah
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately not, multi-refs are a feature of the SOAP encoding model, and not a feature of xml itself. You’ll have to decode the multi-refs yourself either after you’ve finished xml parsing (easier but requires you to save a lot of state), or as you go (which can be more efficient, but still require a lot of state, and a lot of work). Unless you’re dealing with large documents you may just be better giving up on streaming parse and use a DOM style parer. then at least you can fairly easily xpath through the doc to resolve the references.
The other option of course, it to find a soap toolkit that can parse it for you.