D
Doug
I'm trying to set the "code" property on a generated SOAP exception based on
what happened in the webservice....basicly if the client sends in bad data I
need to indicate in the SoapException that it was the "clients" fault not
the server (this will help with debugging)....so I have the following method
that I call and create a SoapException object which I return to the
client...When I inspect the SoapException at the client the
SoapException.Code.Name = "Server" but I raised it as "Client" in the
webservice!!!....
GetSoapException(byval uri as string, webServiceNamespace as string,ErrorMsg
as String,ErrorNumber as string
ErrorSource as string, oFaultCode as
MyEnumSoapFault)
dim oSoapFault as XmlQualifiedName
Dim oSoapEx as SoapException
try
If oFaultCode = MyEnumSoapFault.Client then
oFaultCode = SoapException.ClientFaultCode <----This is what is
being sent into the constructor!!
Else
oFaultCode = SoapException.ServerFaultCode
End if
....other stuff here...creating the node etc...
mynode = new xmlDocument.createnode(....blah..blah
oSoapEx = new
SoapException(ErrorMessage,oFaultCode,Context.Request.Url.AbsoluteUri,mynode
)
Return oSoapEX
....Now in my client when I look at the SoapException...the Code.Name
property is still = "Server" How do I get it to be "Client"????..(basicly
indicating that something that the client sent to the server is incorrect)
what happened in the webservice....basicly if the client sends in bad data I
need to indicate in the SoapException that it was the "clients" fault not
the server (this will help with debugging)....so I have the following method
that I call and create a SoapException object which I return to the
client...When I inspect the SoapException at the client the
SoapException.Code.Name = "Server" but I raised it as "Client" in the
webservice!!!....
GetSoapException(byval uri as string, webServiceNamespace as string,ErrorMsg
as String,ErrorNumber as string
ErrorSource as string, oFaultCode as
MyEnumSoapFault)
dim oSoapFault as XmlQualifiedName
Dim oSoapEx as SoapException
try
If oFaultCode = MyEnumSoapFault.Client then
oFaultCode = SoapException.ClientFaultCode <----This is what is
being sent into the constructor!!
Else
oFaultCode = SoapException.ServerFaultCode
End if
....other stuff here...creating the node etc...
mynode = new xmlDocument.createnode(....blah..blah
oSoapEx = new
SoapException(ErrorMessage,oFaultCode,Context.Request.Url.AbsoluteUri,mynode
)
Return oSoapEX
....Now in my client when I look at the SoapException...the Code.Name
property is still = "Server" How do I get it to be "Client"????..(basicly
indicating that something that the client sent to the server is incorrect)