aspose file tools*
The moose likes Web Services and the fly likes soap fault return empty <detail> element. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "soap fault return empty <detail> element." Watch "soap fault return empty <detail> element." New topic
Author

soap fault return empty <detail> element.

Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
Hello All,

I have designed a web service in a top down manner. I am working with Axis2 stack.

Below is the WSDL for a simple web service with only one operation 'concat'



I generate the server side code using wsdl2java tool.

Concat method implementation.


When I send the request to web service using SOAP-UI, It does return anything for <detail> element of soap fault.


Did I miss anything?
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
Based on the SOAP schema at Schema for the SOAP/1.1 envelope, what you posted seems to be valid -




William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
I agree the schema is valid.

I was looking for soap fault like below.



At present I am getting empty <detail/> element. How I can get the message part in <detail>?
Reason being the tool in which I will be using this WSDL, will be accessing the <detail> element, if its empty it would not work.
Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
I figured it out.

The concat function should be like.

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
Many thanks for the update.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
Ravinderjit Singh wrote:

I was looking for soap fault like below.





I wonder, where does this sim namespace come from?

Regards,
Dan
Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
That was a dummy soap-fault I posted.
Here is exact soap-fault I am getting.

Anuj Kabra
Greenhorn

Joined: Apr 10, 2012
Posts: 1
I am facing a similar issue in which i am not getting the user defined exception for fault case in detail section , rather getting it in fault string section. I dont understand what is ConcatFault in the fix suggested by you and did you write an implementation class for this ConcatFault which is described as an element of type string in xml schema.
Ravinderjit Singh
Ranch Hand

Joined: Jan 13, 2010
Posts: 78
ContactFault is an auto generated class from the WSDL you can check in my very first post. You don't have to do anything with this class. Below is the code which I used to set the fault.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: soap fault return empty <detail> element.