hi,
Which version of CXF are you using?
I thought it should automatically switch to a pseudo oneway mode and
return an empty http 202 response and this should be handled witout
throwing an NPE.
regards, aki
p.s. moved this to users@cxf


2012/10/25 viola lu <[email protected]>:
> Hi, Dev:
>
>  I wrote a sample DOMSource payload provider as below:
>
> @WebServiceProvider()
> public class GreeterDOMSourcePayloadProvider implements Provider<DOMSource>
> {
>
>     public GreeterDOMSourcePayloadProvider() {
>         //Complete
>     }
>
>     public DOMSource invoke(DOMSource request) {
>         DOMSource response = new DOMSource();
>         return null;
>     }
> }
>
> and run client against it:
>
>  QName serviceName3 = new QName("http://apache.org/hello_world_soap_http";,
> "SOAPService3");
>         QName portName3 = new QName("http://apache.org/hello_world_soap_http";,
> "SoapPort3");
>
>         SOAPService3 service3 = new SOAPService3(wsdlURL, serviceName3);
>         InputStream is3 =
>  Client.class.getResourceAsStream("GreetMeDocLiteralReq3.xml");
>         if (is3 == null) {
>             System.err.println("Failed to create input stream from file "
>                                + "GreetMeDocLiteralReq3.xml, please check");
>             System.exit(-1);
>         }
>
>         SOAPMessage soapReq3 =
> MessageFactory.newInstance().createMessage(null, is3);
>         DOMSource domReqPayload = new
> DOMSource(soapReq3.getSOAPBody().extractContentAsDocument());
>
>         Dispatch<DOMSource> dispDOMSrcPayload =
> service3.createDispatch(portName3,
>
> DOMSource.class, Mode.PAYLOAD);
>         System.out.println("Invoking server through Dispatch interface
> using DOMSource in PAYLOAD Mode");
>         DOMSource domRespPayload = dispDOMSrcPayload.invoke(domReqPayload);
>
>
> but got an null pointer exception in BareOutputInterceptor.
>
> CXF doesn't support null return response in payload mode? I tried it in
> message mode, it returns an empty <soap-env:body></soap-env:body>, but not
> in payload mode.
>
> I think it should keep same in both mode. Is this a defect of cxf?
>
> You can reproduce it by reusing cxf sample : jaxws_dispatch_provider
>
> Appreciate your comments.
> --
> viola
>
> Apache Geronimo

Reply via email to