Can you create a small testcase with this and a simple client or similar and
attach it to a JIRA?
Thanks!
Dan
On Tue June 16 2009 1:01:43 am xinxinwang wrote:
> My service implements Provider<SAXSource> in PAYLOAD service mode. The
> following is my invoke method:
>
> public SAXSource invoke(SAXSource request) throws WebServiceException {
>
> try {
> SAXSource response1 = (SAXSource)operationImpl.invoke(request);
> StreamResult output = new StreamResult(new
> OutputStreamWriter(System.out));
> TransformerFactory xformFactory =
> TransformerFactory.newInstance();
> Transformer idTransform = xformFactory.newTransformer();
> idTransform.transform(response1, output);
>
> SAXSource response2 = (SAXSource)operationImpl.invoke(request);
> XMLInputFactory factory = XMLInputFactory.newInstance();
> XMLStreamReader reader =
> factory.createXMLStreamReader(response2);
> while (reader.hasNext()) {
> int eventType = reader.next();
> System.out.println("**** event type="+eventType);
> if (reader.isStartElement()) {
> System.out.println("****
> name="+reader.getName());
> }
> }
>
> SAXSource response3 = (SAXSource)operationImpl.invoke(request);
> return response3;
>
> } catch (WebServiceException e){
> throw e;
> } catch (Exception e) {
> String errorMsg = "Retrieve operation failed -
> "+helper.getDataServiceName();
> throw createInternalErrorFault(e, errorMsg);
> }
> }
>
> response1, response2 and response3 are the same SAXSource. The output of
> response1 and response2 on my console are not empty. However, I got an
> empty Outbound Message for response3. Based on the trace, I noticed that
> the SAX parser was invoked after the response3 was returned.
>
> Does anybody know what causes this problem?
>
> Xinxin Wang
> Associate
>
> Booz | Allen | Hamilton
> ________________________________
>
> 151 Industrial Way, Rm. 129
> Eatontown, NJ 07724
>
> (732) 935-5315 (office)
> (732) 935-5220 (fax)
> [email protected]
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog