File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception not getting displayed in the SOAP response

 
Sat Nar
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
iam trying to throw an exception using SOAPFaultException.My requirement is that the exception should be the part of the SOAP response.But even after throwing the explicitly,iam not getting the error message in my SOAP response.Below is the code.

//Code
detail = SOAPFactory.newInstance().createDetail();
detail.addChildElement( "MyDetails" ).addTextNode( "failed" );

QName qname = new QName("Test Fault Exception");
throw new SOAPFaultException(qname,"SOAP Method failed",null,detail);

//SOAP Response

Service Response
Submitted at Tuesday, April 4, 2006 11:44:23 AM IST
<ns:ArrayOfTestVO xmlns:ns="http://www.openuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></ns:ArrayOfTestVO>


Kindly help me out.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Web Services FAQ links to 2 articles about generating and handling exceptions. Those should be a good starting point.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic