------=_NextPart_0001_CD60ED3C
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi Stu,
I'm not sure I understand what you're attempting exactly. It seems to me
that a one-way call cannot satisfy your requirement to return data in an
attachement because a one way call cannot return data.
Am I missing something?
Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: SoapContext for dim in web service call
thread-index: AcTSD5Vu1CNUkdxXTxGX5gmIMcGrxw==
X-WBNR-Posting-Host: 82.69.14.192
From: =?Utf-8?B?U3R1?= <Stu@discussions.microsoft.com>
Subject: SoapContext for dim in web service call
Date: Wed, 24 Nov 2004 02:23:04 -0800
Lines: 40
Message-ID: <CD472EED-CBB7-4007-A17F-8070B0115E1D@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices.enhancements:4930
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
Hi,
I have a 3 tier architecture
My Front tier calls a webservice
ObjGeneral.getAttachment(p_cFileName)
Which calls the business rule tier and then fires off the code in the
dataAccess tier to
attach the file using WSE Dime and send to the front end.
However my problem seems to be
I cannot access the context of the webservice so I can read the stream
In the MS Article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wseref/html
/T_Microsoft_Web_Services2_RequestSoapContext.asp
"When a one-way Web service method is hosted by ASP.NET, the Web service
method cannot access the SoapContext using the Current property. To gain
access to the SoapContext for one-way methods, the class implementing the
Web
service should inherit from the System.Web.Services.WebService class and
include code in the one-way method to get the
System.Web.Services.WebService.Context property."
how do you do this ie access the context
my code is as follows
objGeneral.streamServerAttachment(p_nIdClient, _
p_cReportFile, _
lnMimeType, _
p_lTaxReport)
objStream = SoapContext.Current.Attachments(0).Stream
objBinaryStream = New BinaryReader(objStream)
lnStreamlength = CInt(objBinaryStream.BaseStream.Length)
objBinaryStream.BaseStream.Read(objData, 0, lnStreamlength)
TIA
Stu
------=_NextPart_0001_CD60ED3C
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Hi Stu,
\par
\par I'm not sure I understand what you're attempting exactly. It seems to me that a one-way call cannot satisfy your requirement to return data in an attachement because a one way call cannot return data.
\par
\par Am I missing something?
\par
\par Dan Rogers
\par Microsoft Corporation
\par \pard\li720 --------------------
\par Thread-Topic: SoapContext for dim in web service call
\par thread-index: AcTSD5Vu1CNUkdxXTxGX5gmIMcGrxw==
\par X-WBNR-Posting-Host: 82.69.14.192
\par From: =?Utf-8?B?U3R1?= <Stu@discussions.microsoft.com>
\par Subject: SoapContext for dim in web service call
\par Date: Wed, 24 Nov 2004 02:23:04 -0800
\par Lines: 40
\par Message-ID: <CD472EED-CBB7-4007-A17F-8070B0115E1D@microsoft.com>
\par MIME-Version: 1.0
\par Content-Type: text/plain;
\par \tab charset="Utf-8"
\par Content-Transfer-Encoding: 7bit
\par X-Newsreader: Microsoft CDO for Windows 2000
\par Content-Class: urn:content-classes:message
\par Importance: normal
\par Priority: normal
\par X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
\par Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
\par NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
\par Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
\par Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices.enhancements:4930
\par X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
\par
\par Hi,
\par
\par I have a 3 tier architecture
\par My Front tier calls a webservice
\par ObjGeneral.getAttachment(p_cFileName)
\par Which calls the business rule tier and then fires off the code in the
\par dataAccess tier to
\par attach the file using WSE Dime and send to the front end.
\par However my problem seems to be
\par I cannot access the context of the webservice so I can read the stream
\par In the MS Article
\par
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wseref/html/T_Microsoft_Web_Services2_RequestSoapContext.asp
\par
\par "When a one-way Web service method is hosted by ASP.NET, the Web service
\par method cannot access the SoapContext using the Current property. To gain
\par access to the SoapContext for one-way methods, the class implementing the Web
\par service should inherit from the System.Web.Services.WebService class and
\par include code in the one-way method to get the
\par System.Web.Services.WebService.Context property."
\par
\par how do you do this ie access the context
\par
\par my code is as follows
\par
\par objGeneral.streamServerAttachment(p_nIdClient, _
\par p_cReportFile, _
\par lnMimeType, _
\par p_lTaxReport)
\par
\par objStream = SoapContext.Current.Attachments(0).Stream
\par
\par objBinaryStream = New BinaryReader(objStream)
\par lnStreamlength = CInt(objBinaryStream.BaseStream.Length)
\par objBinaryStream.BaseStream.Read(objData, 0, lnStreamlength)
\par
\par
\par TIA
\par
\par Stu
\par \pard
\par
\par
\par }
------=_NextPart_0001_CD60ED3C--