check if webservice method is called via SOAP in 2005

lamy

Regular
Joined
Dec 12, 2005
Messages
56
Location
under your bed
this is how i would check it in 2003
Visual Basic:
 <WebMethod()> _
Public Function Test() As String
   Dim sc As Microsoft.Web.Services.SoapContext = Microsoft.Web.Services.HttpSoapContext.RequestContext
  
   If sc Is Nothing Then _
        Throw New System.Web.Services.Protocols.SoapException("Only SOAP requests are accepted", _
              New System.Xml.XmlQualifiedName("NotSoapCall"))

   Return "This is a string"
End Function

in 2005 i would then import Microsoft.Web.Services3 so i could use SoapContext, but theres no HttpSoapContext that can be found

anyone?
 
Last edited:
Back
Top