On Jun 4, 2004, at 8:17 AM, Phil Cruz wrote:This works fine but the fault is generic so I can't really be sure if it's because invalid username/password or some other reason. I wonder if it would be better to:
The SOAP Fault should contain your underlying CF exception (but it is a bit fiddly to unpick the data associated with the Fault).
(I tried a quick test and if you do a custom <cfthrow> none of the arguments (errorcode, detail, extendedinfo..) get passed to the soap fault.)
Right, you can only get the message back. That means that you need to handle that mapping inside your web service CFC:
<cftry>
... do stuff ...
<cfcatch type="any">
<cfthrow
message="type=#cfcatch.type#;message=#cfcatch.message#; detail=#cfcatch.detail#;..." />
</cfcatch>
</cftry>
The Axis fault string begins:
AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: [org.apache.axis.AxisFault : ; nested exception is: coldfusion.xml.rpc.CFCInvocationException: [coldfusion.runtime.CustomException : type=WS.EXCEPTION;message=This is the message;detail=Exception Detail;...][];
Sean A Corfield -- http://www.corfield.org/blog/
Interesting. I modified my test webservice to <cfthrow message="test message" > and when I cfinvoke the service from a CF template I can cfdump the cfcatch structure and see the test message in the cfcatch.message and cfcatch.faultstring.
However, when I invoke the webservice from Flash I only get
[object]
{[string] ==> faultcode : Server.Connection
[string] ==> faultstring : Unable to connect to endpoint: http://localhost/cfmx/testCFC5.cfc
[string] ==> faultactor : http://cfmx
}
The docs say there should be a fault.detail
SOAPFault property Description
faultcode String; a short string describing the error.
faultstring String; the human-readable description of the error.
detail String; the application-specific information associated with the error, such as a stack trace or other information returned by the web service engine.
element XML; the XML object representing the XML version of the fault.
faultactor String; the source of the fault (optional if an intermediary is not involved).
but I'm not seeing the fault.detail.
How can I get the custom error message into Flash?
-Phil
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
