RE: SoapContext for dim in web service call

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Dan Rogers (danro_at_microsoft.com)
Date: 12/02/04


Date: Thu, 02 Dec 2004 21:14:23 GMT

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



Relevant Pages

  • SoapContext for dim in web service call
    ... My Front tier calls a webservice ... I cannot access the context of the webservice so I can read the stream ... "When a one-way Web service method is hosted by ASP.NET, ... access to the SoapContext for one-way methods, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Whats finally keyword good for?
    ... yours ever made it into a DNA solution in the tiers. ... service or a WFC Web service and the Web service blows? ... the UI, Web service calls the BL tier, the BL makes a call to another Web ... I have my way of doing things with exception ...
    (microsoft.public.dotnet.languages.csharp)
  • Architecture question
    ... I have to develop an accounting soft solution. ... to use a three tier architecture. ... The logical tier is composed of logical ... components and a web service facade that delegate to the logical components. ...
    (microsoft.public.dotnet.framework.webservices)
  • Architecture question
    ... I have to develop an accounting soft solution. ... to use a three tier architecture. ... The logical tier is composed of logical ... components and a web service facade that delegate to the logical components. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Data Tier Optimization
    ... > If it's all on one form having a seperate dataset ... > serialize one set if you need to, pass it to/from a web service or use ... > encapsulate that in any tier although the presentation tier is usually a ... If you use stored procs you cna keep it all in the ...
    (microsoft.public.dotnet.framework.adonet)