I'm still stuck here. But I wanted to remove my app from the equation, so
here is what
I did:
1. Created a new web service, using the VS 2003 IDE.
2. Selected properties on the web services, picked the "WSE Settings 2.0..."
option
and checked both checkmarks on the general page.
3. Verified that the web.config contains the entries for WSE.
4. In the default Service1.asmx.vb file, I uncommented the sample "Hello,
World" webmethod
and modified it so that the entire file contains this (removing the
designer generated code region):
Imports Microsoft.Web.Services2
Imports System.Web.Services
<System.Web.Services.WebService(Namespace :=
"http://tempuri.org/WebService2/Service1")> _
Public Class Service1
Inherits System.Web.Services.WebService
' WEB SERVICE EXAMPLE
' The HelloWorld() example service returns the string Hello World.
' To build, uncomment the following lines then save and build the
project.
' To test this web service, ensure that the .asmx file is the start page
' and press F5.
'
<WebMethod()> _
Public Function HelloWorld() As String
Dim X As SoapContext = ResponseSoapContext.Current
Dim Y As SoapContext = RequestSoapContext.Current
Return "Hello World"
End Function
End Class
I set a breakpoint on the return statement, run the service, then invoke the
method. At
the breakpoint, both X and Y are Nothing.
I have a feeling I am missing something very simple here. I have
re-installed WSE 2.0 SP2 and
also rebooted, but that didn't see to help.
What am I missing?
Thanks,
-- Greg Allen
"Greg Allen" <oe******@attbi.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a web service and am trying to use WSE 2.0 to pass attachments. I
have
enabled both the checkboxes in the WSE properties page in VS.
The problem occurs when I try to get the ResponseSoapContext in my service
to add the attachment.
Dim Context As SoapContext = ResponseSoapContext.Current
Dim Attachment As New DimeAttachment(Type, "text/html", Bytes)
Context.Attachments.Add(Attachment)
My problem is the ResponseSoapContext.Current is Nothing! I have no idea
why, as everything seems to be set up correctly.
And my service class:
Imports Microsoft.Web.Services2.Dime
Imports Microsoft.Web.Services2
Imports System.Net
Imports System.Web.Services
<WebService(Namespace:="http://foobar.com/")> _
Public Class ReportService
Inherits System.Web.Services.WebService
Any ideas? What should I be looking for. It seems like this ought to
work.
Thanks,
-- Greg Allen