SOAP Format for Fault attribute

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

SOAP Format for Fault attribute

rnaudin-3
Hi all

I try to pass an error throw the SOAP BC but the message I get is like :



<soapenv:faultcode>soap:Server
<soapenv:faultstring>Fault occurred while processing.




If I access to a web service serve by Axis or CXF, the message is like this :



soap:Server
Fault occurred while processing.




The problem is that with my SOAP Client (SCA Tuscany), the first message is not treated.
I can't retreive the code or the string of my fault.

Have you got an idea ?
I use Petals 2.2.1 and BC SOAP 3.1.2




Hervé




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=310#310

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
The fault is generated by the service provider. If you use the BC Soap as consumer, the fault is generated by an other service provided by a component.

This problem is known (bug #310494) and it is fixed in CDK 4.0.2.
As the BC Soap 3.1.2 uses the CDK 4.0.4, I think that you use the BC Soap as consumer. What component are you using as service provider ?




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=311#311

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
Sorry for that, I didn't see the bug.

I use BC EJB for the provider so I will compile it with the CDK 4.0.4 and I think it will work...

I try and let you know.

Thanks




Hervé




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=312#312

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
Thanks a lot, I take the source from SVN and it works.

Just a remarque for the exception management in the ServiceManager class. I don't understand why the original message is not put in the PetalsCDKException throws.
I would prefered this :
Code:
Throwable cause = null;
String message = "Error invoking EJB";
if (e.getCause() != null) {
   cause = e.getCause();
   if (cause.getMessage() != null)
      message = cause.getMessage();
   else
      cause = e;
}
throw new PEtALSCDKException(message, cause);


In an other way, I've got an error when I pass throw a BC SOAP (Consumers) -> My SE <- BC EJB (Provide)
Code:
[petals.container.components.petals-bc-ejb]-SEVERE 2008-11-24 18:08:10,109 Can't send an error acknowledgement to the consumer
javax.jbi.messaging.MessagingException: The Exchange is terminated.

Do you have an explaination ?

Thanks for your help.




Hervé




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=329#329

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
Can you give us more information ? Where do you want to have a such exception throwing ?
hgerard wrote:
Just a remarque for the exception management in the ServiceManager class. I don't understand why the original message is not put in the PetalsCDKException throws.

According to JBI specifications (page 32), a provider must repond with a message or a fault, not with an error status.
hgerard wrote:
In an other way, I've got an error when I pass throw a BC SOAP (Consumers) -> My SE <- BC EJB (Provide)
Code:
[petals.container.components.petals-bc-ejb]-SEVERE 2008-11-24 18:08:10,109 Can't send an error acknowledgement to the consumer
javax.jbi.messaging.MessagingException: The Exchange is terminated.

Do you have an explaination ?




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=330#330

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
In fact, when my EJB throws an exception, this exception have a message that I would like to find in the "faultstring" of the JBI fault message.
But in the "callEJB" method in the ServiceManager class, the EJB's exception is in the cause of the exception.
Finally, I "lose" my original message that could be a code like "T_001" for technical error n° 001. Without this message, the composite application doesn't know what to do with this error.

That's explain my code.

The other error is really a part of this proposition...




Hervé




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=331#331

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
Try to use SOAP11FaultClientException or SOAP11FaultServerExcetion instead of PetalsCDkException. These both exceptions are tranformed into fault by the CDK.




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=332#332

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
Sorry I don't understand your answer.
If I write my question in an other way, my need is :
When an EJB throws an exception with a message in it. If my application consumes through the BC SOAP witch consume through the bC EJB my EJB, how do I retrieved my message ?
I precise that I don't want my EJB to throw a Petals' Exception. The ESB must not be intrusive in my Application Server.
The application might be a VB ou Delphi or whatever, not necessarily java application




Hervé




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=333#333

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SOAP Format for Fault attribute

rnaudin-3
In reply to this post by rnaudin-3
I have located the ServiceManager. I agree with you about exception management.

Please create an issue in the PEtALS forge about this exception problem.

Moreover, I think that you can enter an other issue. Reading the ServiceManager source code, if a exception occurs during the first EJB invocation, an other call is made when catching InvocationTargetException. The application server connection loss must be improved.




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=335#335

-------------------- m2f --------------------

_______________________________________________
Users mailing list
[hidden email]
http://forum-list.petalslink.org/cgi-bin/mailman/listinfo/users