[JBossWS] - [EJB3 WebService] How handle SOAPException better?
by Marco.Pehla
Hello everybody,
I've some problems with the SOAPException handling. I wrote a EJB3 with @WebMethods and JBoss generates automatically the corresponding WSDL catalogue. In order to get a declaration of a fault message inside the WSDL, I have to throw a SOAPException in my @WebMethod.
e.g.
| @WebMethod
| public String doSomething(String input) throws SOAPException {
|
| String result = "Hello World!";
|
| if(input.equals("")) {
| throw new SOAPException("No input specified.");
| }//if
|
| return result;
| }//doSomething()
|
My client is written in PHP and able to handle SOAPExceptions like desired. If I send an empty request to my Web Service then JBoss sends a SOAPException back to the PHP client which handles this exception.
Everytime the Web Service creates a SOAPException, I get a really huge output on my JBoss console.
How could I avoid this? I mean, is it possible to handle this exceptions by myself? Or is this the normal behaviour of a SOAPException?
PS: I know, I could put this "throw new SOAPException" inside of a try-catch block, but as everybody know the client of the Web Service gets then no SOAPException message. So I need to let the exception be handled by the EJB container. Or have I to do it in the catch block?)
with kind regards,
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026262#4026262
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026262
19Â years, 1Â month
[JBoss Seam] - Newbie: why em.persist() not writing (flush) to DB until ano
by lisaanm
Hi.,
May a silly question but i'm new to Seam.
I have a Seam CRUD application with very limited annotations (left to default in most cases). Problem with Entity beans (EB with only @Entitiy annotation).
I'm using a plain POJO and wrapping Entity Bean like this
In StateSessionBean:
WorkOnEntityBean workOnEntityBean = new WorkOnEntityBean(new SeamEntityBean());
and then using this workOnEntityBean on XTHML page like StateSessionBean.workOnEntityBean.seamEntityBean.someField
now user clicks a save action method
where
em.persist(StateSessionBean.workOnEntityBean.seamEntityBean);
Now I could see only some select statements (some sequence stms.) in my console and no INSERT/UPDATE.
But then after render/response phase, on other page if i click someother action method (of same bean) then I could see INSERT/UPDATE statements.
I don't know why its happening. I think i'm missing something.
Any help would be highly appreciated.
Thanks
Lisa
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026247#4026247
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026247
19Â years, 1Â month