xml stream from client to xml web service

  1. I'm trying to send a serialized object based of an xsd to an xml web service by an xml stream.
I've serialized it into a MemoryStream and trying to sent it to the service that I've made.
The service should except this xml stream and create a serialized class of his own.
 
  1. Giving the fact that I need to pass the Object as an xml stream, is it a good choisse to take a MemoryStream class for me?
  2. Trying to pass the MemoryStream instance made at the client side I get a compilation error as the instance made at the client side is recognized as a System.Io.MemoryStream while the argument for the [WebMethod] public void getStream(MemoryStream strm) is recognized with the namespace of the WebService "Appliction1.service1.MemoryStream". the arror then point to the fact that it cann't cast one type to the other.
Any Idea what should I do?
In the cliente side I can create an instance of an  "Appliction1.service1.MemoryStream" but it doesn't help me as i need it to be of a System.IO.MemoryStream for the serialize method.
 
Any article or/and excample code at the subject will be appritiated.
 
Thanks.
 
0
dan2003
3/5/2006 4:13:13 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

2 Replies
741 Views

Similar Articles

[PageSpeed] 53

I believe that the problem that I have with MemoryStream is that it is not a supported argument for an xml web service.
That leads me to an xmlNode / DOM.
Can any one leads me to an example or note of the way to send a class (as an Xml) at that way (or a better way)?
 
Thanks.
0
dan2003
3/6/2006 8:02:52 AM
Well it's still me talking to myself....
It seems to work now using MemoryStream as a pass through from the class to the serializer method and then creating xmlDocument. Loading the MemoryStream to the XmlDocument (with method load ) and then it's possible to send it to the webService.
If any one needs more details fill free to ask.
If any one think thear is a better way, I would be happy to get a note for that.
 
 
0
dan2003
3/6/2006 9:41:57 AM
Reply:

Similar Artilces:

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

XML vs XML Web Services
I'm getting up to speed with XML and have the following questions: 1) Knowing XML means knowing how to design and create XML Web Services? 2) I found the amount of details on XML/XML Web services overwhelming, harder to digest than HTML or a new language. What's the best approach to learn and use it? Thanks.Please mark the post(s) that have helped you as "Answer" 1. No. They are different things 2. I'd start with a basic XML foundation (basic XML, XPath, and XSD), then review the basic WS things: soap, WSDL, and then from there on move to the WS-specs.Tomas Restrepo ...

creating XML or XML Web Services?
Hi, I know XML is basically creating a file that allowed multiple applications to get data from the XML file ... and I am wondering .. why there is XML Web Services? What are the differences between these two? I am trying to create a Session that will keep update the value whenever it navigate to any page ... and get the Session value in multiple applications. In my guess, stores Session[] in XML file should work for what I am trying to do ... but what exactly is this XML Web Services? In what kind of situation we use XML or vice versa? All developers, even novices and hobbyists, must be a...

create valid xml to send to web service based on the schema provided by web service
Problem: I have a web page which is being populated from a dataset containing multiple tables.  I now need to call a web service and send the majority of this data to be incorporate into a mainframe system.  I have been supplied with the schema that the web service will be using to validate the data.  I am new to web services and I am not sure how to take my existing dataset and transform it into an xml document that matches the schema I was provided with. There is a main schema with an element which is a custom complex type.  This custom type consists of an element whi...

Passing an XML string as part of an XML Web Service
Hi there I am not too sure how to explain this but here goes..... I have a Web Service and I need to pass an XML page in the form of a string to a web service. My web service takes in 5 fields and one of those 5 fields is a string which is an xml page in the form of a string. I need to pass that string onto a COM object.Is it possible to pass XML in the form of a string to a web service or will that cause the web service to error?The web service is normally called from a PL/SQL stored procedure. If thats of any use.  Hi You can pass that XML string to the web method as a parameter.See...

XML Web service , Web form
hi i hope if u could help me in what i am making so i have a web form that does the collection of the information from the user when he hits the button this data must be sent to the xml web service but this service must deliver this data in xml then i read the information and insert it to the sql serevr Database could you help me becouse iam soo confused about where to start and what is the stuff to search in it iam new in the xml stuff help me pleaseeeeee“To be incredible you must produce great work”Visit My Bloghttp://www.dotnetjunkies.com/WebLog/hussein My first question is why are yo...

SQLDataAdapter writes different XML than the XML Web Service returns
I have an XML Web Service written in VB.Net 2.0  I use a SQL data adapter to return read only data from a database. If I use the writexml method of the data adapter it writes an xml file to disk which seems to be formatted perfectly. When I return the XML data from the service with (dataadapter.writexml(dataset)) it appends the anytype element, which is giving me trouble transforming with XSL. Is there a way to return the XML looking the same as what gets written to a file? Or am I not understanding what the anytype node is for or how to deal with it? Thank you for any help Writt...

How to send an XML file to a Web Service (that records the XML file to HD)
I did this because I wanted to send an XML file to another computer, whether it be next to the one I’m using  or in another country. You will need to adapt my example in order for it to work as you want it. All I demonstrate here is that it is possible to send an XML file to another computer using XML Web Services. Let me know if it works for you. The code assumes you can use Visual Studio. Make the Web Service 1. Make a new project, choosing to make a Web Service. 2. In the code behind-page, place the code below. 3. Build the Web Service. Code: <WebMethod()>...

XML Web Service as Admin of a Store Web site
I have created an XML Web Service (WebShopManager) with the IBS Store that will serve as an Admin program. I download the Store data tables to a local client where I read, edit and then return data to the Store. The program can function as a logistic centre. Does anyone have experience with this kind of solution? Can this work in reality when we have lots of data in the tables to download? What could be a problem? I imagine this method much more flexible than the ordinary web based admin solutions. Bo Wiklund...

Hi All, Can anbody tell me about invoking a XML web service directly thruogh XML via http POST
I have developed a web service,in which user will send XML Request via http POST.Can anybody tell me how to invoke it without any user interface.My Web Sercie will uploaded in client server,and the user will send the requset to that url .Can it possible to workout,without consuming web service.Please help me outNote:I have done web service in VB.NET/SP.NET v2.0. I'm not sure that I understand your question. Do you know that you can consume a web service in a program that has no user interface? You don't need a user interface, but if you do not consume the web service in something...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

XML Documentation for a VS2005 Web Site or Web Services site
Using Visual Studio 2005, for a web site or a web services site, where is the XML Documentation out put to as there is no Bin directory now?  Is it possible to get the web / web services projects to compile to a bin directory and so get an EXE for NDOC to analyse?I am have turned code analysis on.My other projects in the solution produce XML documentation which the beta of NDOC 2.0 will produce documentation for.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all kno...

.NET vs Java XML Web Services
Does anyone know out of .NET and Java, which one performs better via XML web services? I think that it would really just depend on where you are wanting to deploy your web service. Since both have the overhead of a framwork behind them I would imagine that any performace gains would be small. If you are deploying in a Windows environment I would go with .NET, but mainly because I just like it better. If you want to deploy in Windows and Linux I would use Java. I am not sure how far Mono has come on the Linux platform and if you do not use C# mono would not help you anyway.It's not a bug, i...

creatig and returning xml in .net web service
I am new to the .net web service world. Recently I started writing a web service. This web service is going to interact with Java client. Hence I will be returning XML from web service. I am writing web service using vb.net in VS2008. My web service is goign to call a stored procedure. Stored procedure is supposed to retun me some records. Based on these records I have to create XML and return it as web service response. Till now I was able to write web service and stored proc. I am not sure how to build a response xml. Does anybody have any link or any idea on how to do this. I trie...

Web resources about - xml stream from client to xml web service - asp.net.xml-web-services

United States Department of Health and Human Services - Wikipedia, the free encyclopedia
The United States Department of Health and Human Services ( HHS ) is a Cabinet department of the United States government with the goal of protecting ...

Australian public service allowances attacked: Institute of Public Affairs report
... and flex time under attack. The report by IPA deputy executive director James Paterson and lawyer Aaron Lane said federal public service wages ...

China Mobile creates dedicated unit to grow its internet services revenues
Zee News China Mobile creates dedicated unit to grow its internet services revenues Rethink Research (subscription) Many large mobile operators ...

Target reportedly developing its own Apple Pay-like mobile wallet service
American retail chain Target is said to be developing its own mobile payment service that would compete with Apple Pay , according to the latest ...

Target is taking on Apple Pay with its own mobile wallet service
... Of course, we’ll keep you posted with further information as we receive it. Target is taking on Apple Pay with its own mobile wallet service ...

LifeLock ID protection service to pay record $100 million for failing customers
... states. LifeLock was given a slap on the wrist and a $12 million fine in 2010 for falsely advertising its identity theft protection services. ...

Inside Apple’s plan to turn the iPhone into a subscription service
Apple is trying a new subscription service that would allow consumers to get an iPhone annually at no additional cost. At Business Insider's ...

Gillette Suing Dollar Shave Club Claiming Razor Subscription Service Infringes On Its Patents
... it’s no surprise that competition is fierce. In an effort to protect its slice of the market, Gillette is suing online subscription razor service ...

Canadian ISP Rogers Launches Gigabit Service, 4KTV -
Canadian ISP Rogers Communications says that the company has started offering gigabit broadband service in parts of Toronto. Rogers plans for ...

Keith Urban Pays Tribute to His Father at Memorial Service
Keith Urban is closing out a devastating year with a special goodbye to his father, Robert Urban, who died from cancer on Dec. 5.

Resources last updated: 12/19/2015 5:45:30 AM