Thanx
On Wed, Feb 16, 2011 at 5:47 PM, Daniel Kulp <[email protected]> wrote:
>
> You would need to throw a SOAPFaultException. Somewhat like:
>
> SOAPFactory f = SOAPFactory.newInstance();
> SOAPFault soapFault = f.createFault();
>
> soapFault.setFaultString("Test Fault String ****");
>
> Detail detail = soapFault.addDetail();
> detail = soapFault.getDetail();
>
> QName qName = new QName("http://www.Hello.org/greeter",
> "TestFault", "ns");
> DetailEntry de = detail.addDetailEntry(qName);
>
> qName = new QName("http://www.Hello.org/greeter",
> "ErrorCode", "ns");
> SOAPElement errorElement = de.addChildElement(qName);
> errorElement.setTextContent("errorcode");
>
> throw new SOAPFaultException(soapFault);
>
>
>
> Dan
>
>
> On Wednesday 16 February 2011 2:21:11 AM Peter Mihalik wrote:
> > Correction: i mean provider service of course, not dispatcher. For
> example:
> >
> > @WebServiceProvider
> > @ServiceMode(value = Service.Mode.PAYLOAD)
> > public class XYProvider implements Provider<Source> {
> >
> > ...
> >
> > }
> >
> > --
> > Peter
> >
> > On Tue, Feb 15, 2011 at 8:28 PM, Peter Mihalik <[email protected]>
> wrote:
> > > Hello, is it possible to throw a fault from a payload type JAX-WS
> > > dispatcher service?
> > >
> > > --
> > > Peter
>
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
>