473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Urgent Please Dime Across multiple tiers

Stu
Hi,

I have a 3 tier system using web services
I want to attach on the 3rd tier - data access
to the middle tier - business rules

and call the business rule tier from the front end to get the attachment
So the first problem is getting it from the back end tier to the middle tier
The middle tier calls the back end tier to get the attachment whci it then
streams and reattaches for the front end

1) Do I need to stream and reattach to the soap message or can I pass
Straight through to the front end
2) As the schema in 1 ie stream and reattach I can see the attachment added
in the data access tier but there is no attachment when it gets to the middle
tier

The basic code in my data access tier is
<WebMethod(BufferResponse:=True, _
MessageName:="streamServerAttachment", _
Public Sub streamServerAttachment()
..........
.................

' create dime attachment
objBuffer = New MemoryStream(objFile)
objDimeAttach = New Attachment(lcMimeType, objBuffer)

objContext = RequestSoapContext.Current
objContext.Attachments.Add(objDimeAttach)
......
End Sub

where in the debugger the attachment count is 1
When it returns to the business rule tier the count is zero

basic code is

Dim objStream As Stream
Dim objContext As HttpApplication
Dim objSoapContext As SoapContext
Dim ObjDimeAttach As Attachment
Dim lcMimeType As String
Dim arByte() As Byte
Dim objBuffer As MemoryStream

Try
' call attachment routine from data access tier
objAttachment.streamServerAttachment()

If objAttachment.RequestSoapContext.Attachments.Count <> 0 Then

objStream =
objAttachment.ResponseSoapContext.Attachments(0).S tream

objStream.Read(arByte, 0, objStream.Length)
lcMimeType = objCommon.getMimeType(p_nMimeType)

' repack
' create dime attachment
objBuffer = New MemoryStream(arByte)

ObjDimeAttach = New Attachment(lcMimeType, objBuffer)

objSoapContext = RequestSoapContext.Current
objSoapContext.Attachments.Add(ObjDimeAttach)
Any ideas please
TIA

Stu


Nov 21 '05 #1
0 1142

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Levi Wilson | last post by:
I have a web service that adds a DIME attachment: public void GetFile(string filename) { SoapContext sc = HttpSoapContext.ResponseContext; DimeAttachment dimeFile = new...
0
by: LearninGuru | last post by:
Hi, I have a situation where I need to return bulky PDF files from a web service method. The easiest way to do this is return base64 encoded strings. But as the PDF files are bulky this...
2
by: Abhay | last post by:
Hi All, I want to create a webservice which will be used for uploading the file to the server hosting the Web service. I want to use WSE DIME Attachments.. I have seen some sample on that , but...
1
by: Modica82 | last post by:
Hi all, I have been trying to find a way to send a PDF from my web service. I have had the idea of sending back a byte array, but to be honest the efficiency issue is there and i would like to...
5
by: Joseph Geretz | last post by:
Here's my first attempt at DIME (code below signature). I'ts basically straight out of Microsoft's online sample: For some reason, the statement respContext.Attachments.Add(dimeAttach); ...
3
by: Joseph Geretz | last post by:
I'm working on an file transfer gateway using WSE with DIME for file attachments. Our goal is to replace our direct file repository access (via windows network folder sharre) with the Web Service...
1
by: Griff | last post by:
Hi I'm not sure of the best way to go about achieving my goal and would appreciate any advice. What I would like to do is to generate a control that can be dropped onto a web page. For...
4
by: tobin | last post by:
Hi folks, We're looking for a CMS system for our organisation, and we're picking potential solutions. We need something that is scalable cause we're a growing company, so there's potentially...
6
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.