473,405 Members | 2,141 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,405 software developers and data experts.

Returning a PDF in a web service

Hi all,

Is it possible to return a PDF in a web service. I am making the assumption
that it would be the same as sending any other file, such as an image, so i
would return an array of bytes. Is this the case, or are there any other
methods that are appropriate?

Thanks,

Rob

http://www.thatssolastseason.co.uk
Nov 23 '05 #1
4 6000
Take a look at web services with attachement, WSE 2.0 provides a good
framework for this purpose. alternatively you can make you web services
to return url to the pdf file(thoug you might want to implement some
sort of security mecahnism for this), and make your web services
consumer retrieve it form the url.

regards
erymuzuan mustapa

Modica82 wrote:
Hi all,

Is it possible to return a PDF in a web service. I am making the assumption
that it would be the same as sending any other file, such as an image, so i
would return an array of bytes. Is this the case, or are there any other
methods that are appropriate?

Thanks,

Rob

http://www.thatssolastseason.co.uk

Nov 23 '05 #2
Hi erymuzuan,

We are still using the 1.1 framework, and i have to send the physical file
as apposed to a link, are there any tutorials around that would help me find
out how to send an PDF via a web service?

Regards,

Rob

"erymuzuan" wrote:
Take a look at web services with attachement, WSE 2.0 provides a good
framework for this purpose. alternatively you can make you web services
to return url to the pdf file(thoug you might want to implement some
sort of security mecahnism for this), and make your web services
consumer retrieve it form the url.

regards
erymuzuan mustapa

Modica82 wrote:
Hi all,

Is it possible to return a PDF in a web service. I am making the assumption
that it would be the same as sending any other file, such as an image, so i
would return an array of bytes. Is this the case, or are there any other
methods that are appropriate?

Thanks,

Rob

http://www.thatssolastseason.co.uk

Nov 23 '05 #3
I use a string and base64 encode/decode the file into this. The approach
is simply, interopt friendly and wraps naturally into an object
hierachy. The only problem with this as I see it, is that its not the
fastest way, the encoding uses 30% more bandwidth than the raw byte size
of the file. In my case, 20-30Kb PDF files fly through like a breeze though!

Casper
Nov 23 '05 #4
Modica82,

WSE 2.0 works with 1.1 framework.

WSE is WebServiceEnhancement. You can download it form microsoft.

Regards
Homa Wong

Nov 23 '05 #5

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

Similar topics

1
by: Randy | last post by:
Hello, I have a web service in which I'm doing a query to an Access database and returning the resulting XML data when I do the return from the service... public string AOS_Data(string sql) {...
5
by: LS | last post by:
Can a WebMethod return an Interface type? Can we pass an interface parameter ? Example : public interface IEntity { long Id { get; set; } string Name { get; set; } }
1
by: Matthias De Ridder | last post by:
Hello, I really hope that someone will be able to help me, because I'm desperate now! I'm a student, graduating this year, and I'm working on a thesis where C# Web Services are involved. I...
2
by: Anthony Biondo Jr | last post by:
I am trying to figure out the best way to return data through a web service. If the value is a single value I can just set it equal to the web service name. If I am returning a set of data I have...
5
by: Jim Murphy | last post by:
In creating a C# web service, I am having trouble returning a DataTable object as the result of a web method. I have no problem returning native types like string or int, but cannot return a .NET...
2
by: Asim Qazi | last post by:
Hi All public class MyResponse { public bool m_bStatus; public string m_szErrorCode; public string m_szMessage; }
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
0
ntxsoft
by: ntxsoft | last post by:
Hello everybody, I have a small problem while returning array from web service. Firstly I'm new at java web services and I'm using netbeans 6 with glassfish 2. The problem is I have a class, name is...
5
by: Frank Hauptlorenz | last post by:
Hello, I recognized some days ago, that returning a DataTable blocks my WCF-Service. Is this a known bug? If I add this table to a new DataSet() and return this, it works. Thank you, Frank
0
by: kieferzhen | last post by:
I am writing a Windows NT Service based on a MFC EXE with VC++ 6.0. This windows service should use Automation (COM) to read data from a server application every minute. MFC EXE always worked. ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.