.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

pass XML document to WCF service?

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :WCF


I am new to WCF. So some one please help me out. I need to pass XML document to my WCF service.

And send back, XML Ack message to client.

How do i need to do? any sample can you provide?

View Complete Post

More Related Resource Links

WPAsign application service unable to succesfuly pass the BVT tool

Hello, I'm getting a bunch these messages every two hours in my Windows 2003 application log. The server in question does not have outbound internet access where by the server is configured as a web server for the WPAsign application. Message: Failed auto update retrieval of third-party root list sequence number from: <http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootseq.txt> with error: The specified server cannot perform the requested operation. and when I run the BVT tool form the comand window I am getting unknown error and the output has some partial files but not the whole list expected at succesful sign. What does this mean? How can I manually update this? Any help or insight would be appreciated.

how do I pass in a standard xml+xsl to be converted through the Sharepoint 2010 Document Conversion

How do I pass in a standard xml+xsl to be converted through the Sharepoint 2010 Document Conversion? Via the SDK I have been able to code a c# workflow that converts word files in a Sharepoint 2010 Document Library (docx,dox, word.xml) to PDF successfully but want to pass in an xml+xsl file to this engine if possible. Actually I have xml, xsl, and if needed xsl-fo files to deal with but would be happy if I could figure out how to make the Document Conversion engine do the xml+xsl transform and then send that to a doc file in Sharepoint.    

How To "Upload a new document template" to Content Type via Web Service

I hope someone can help me. Let me begin by saying that I'm not a programmer; so I 'may' not get the terminology exactly right, but hopefully someone will know what I mean. I am using SharePoint 2010 along with a 3rd party application that I'm using for creating, managing and executing workflows.  The workflow application I'm using is Nintex Workflow 2010.  As such, I can only use functions, services, commands...etc...that are offered to me by that application. Anyway, what I am trying to do is simply replace a document template that is being used for a particular content type with another document template. For this I believe I need to use the Webs.UpdateContentTypeXmlDocument Method.  More information is provided here (http://msdn.microsoft.com/en-us/library/websvcwebs.webs.updatecontenttypexmldocument.aspx). The Webs.UpdateContentTypeXmlDocument method requires two parameters..."contentTypeId" and "newDocument". "contentTypeId" - I have got the Content Type ID by clicking on the content type and viewing the URL shown in my browser.  So, I am confident that my content type id is correct and is "0x010100C392CF11DE923A4E8AB9018B0A42119303". "newDocument" - The MSDN article states...'A string that represents the XML document to replace the existing XML document.".  To be honest, I'm not 100%

How to pass param type List<> to WCF service?

 I have a WCF Method likes this:public bool SaveStudents(List<Student> students) { //save to the database; return true; }[DataContract]public class Student{[DataMember]public string Name{get;set;}public string Major {get;set;}} At html page, i have a form allows create one more than a student at a time and save all student to database.I using jquery ajax call.Now, I don't how to pass data (in json format) so that SaveStudents can parse and understand json object from client and parse it to List<Student>Please help me!!!

Downloading a document from a sharepoint site to local file system, copy web service returns null

Hi Guys,
               I am trying to get this done for the last 2 days and I am still banging my head to the wall.
All I need to do is to download files from my sharepoint site library that uses integrated windows authentication. I was using copy webservice : getItem method to accomplish this.

CopyService.GetItem(copySource, out myFieldInfoArray, out myByteArray);

Problem : myByteArray is always returned as NULL

Note: I have tried the same with another site that uses forms authentication but the result was the same (NULL !!)

This is my code:


Copy copy = new CopyService.Copy();


Pass information from one web service to another web service in the same data-view-web-part


In Data View Web Part.

Is it possible to pass information from one web Service data source connection to another web service data source connection within the same Data Form Web Part to get information from second web service?

What I am trying to achieve is to get user email address from the User Profile Web Service and pass in to another web service to get information.

Please advise if it is possible.

Adding multiple users to a document library column by web service


I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.

Extending Document ID Timer Service

I really like new Document ID feature, but I am wondering if the Document ID generation algorithm could be extended. For example, a potential customer might want to generate these IDs in a special sequence or using some special algorithm according to government regulations or something else.

MTOM-enabled WCF service sends document inline in SOAP response


I'm running a WCF service that has messageEncoding="Mtom" in the config file. The WCF service however, in its SOAP response sends the document as a Base 64 encoded document inline and not as a <xop:include.....> reference outside the SOAP. I'm not sure what I'm doing wrong. Please guide me.


Desired Format:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_F862C3E04D9E35266C1256303956115; type="application/xop+xml"; start="0.urn:uuid:F862C3E04D9E35266C1256303956116@apache.org"; start-info="application/soap+xml"; action="urn:ihe:iti:2007:RetrieveDocumentSetResponse"
Date: Fri, 23 Oct 2009 13:19:11 GMT

Content-Type: application/xop+xml; charset=UTF-8; type=&

CMIS - How to determine the URL of the CMIS service document

Before a CMIS consumer can retrieve information from a CMIS provider, it must know the URL of the CMIS service document for the provider. I cannot find any documentation indicating how to determine the URL of the CMIS service document for SharePoint 2010. If anyone knows how to determine this URL, or where to find the relevant documentation, please post it. Thanks!

Pass object to web service


I'd like to pass an object (Digital Persona featureset) to a web service.  Can't seem to find a good way to serialize it.

Any suggestions?


Creating a Web Service to Recive a HTTP POST with an XML document as the body or payload from a PHP



I have been strugleing with this for more than a week, and have not been able to get any further ahead. I need to create a Webservice that can recive an HTTP Post with an XML document as the body or payload. It will be comeing from a PHP site, and I need to access it in ASP.Net.

I can create a webservice and test it out correctly with no real hitch, but when testing with my  third partys test page I am not getting the proper responce. The third party company can not provide me with much help since they do not know ASP.

The following is a sample code peice that can open a string of XML passed, and I have a form that can post to this test page.

public XmlDocument ProcessXML(String SourceXML)
XmlDocument NewSourceXML = new XmlDocument();



I knoiw that once I can read the posted XML I can break it down and do what I need to do with it, but I am having issues reciving the XML at this point.

My third party provided me with a basic excert from a PHP file.

 *  Get the HTTP request (body) and parse into an XML document
$data = file_get_contents("php://input");
$xmlstr = trim( stripslashes( $data ) );
$xml = new SimpleXMLElement($xmlstr);

But this is of no help to me. I need to

Web service taking XML doc as argument, how to reference/include XSD schema (describing document) in


Hi All,

Apologies if the question has been asked before but I've done a search and wasn't able to find an answer.

Our web application (hosted in IIS) exposes a WCF web service which takes an XML document as an argument, that document should confirm to a (public) XSD schema already defined in our application.

Current the contract looks as follows

void LoadData(string identifier, byte[] xmlData)

We've got a MEX (meta-data exchange) endpoint set up so that clients can use something like svcutil.exe or WcfTestClient to discover the service details.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempurg.org/WebServices/LoadService</Action>
  <LoadData xmlns="http://tempurg.org/WebServices/LoadService/LoadData">
   <identifier d4p1:nil="true" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance" />

However, this doesn't give the client a clue as to what the XML document (byte[]) should look like/conform to. What app

timer job cannot pass a parameter to web service


Can't pass a parameter to web service

a simple web service:


public string helloWorld (string st){ return st;}

in timer job Execute method

public overwrite void Execute(){


...helloWorld(" say hello ");


The timer job is working without parameter. How shall I solve it?




Update document using claims based service


We have a document in a doc lib we need to update a field on the document.  We are using a claims based environment over the internet through ssl.  What is the best way to do this?  A rest service post?  Client side linq to sharepoint?  Any ideas/blogs/walkthoughs would be most helpful.


Take image or Binary object From SQL and Pass into an XML Document


I have a SQL Table which holds document data in the form of type image (or possibly binary but as far as I can see image is more reliable).

I have a websewrvice which needs to pull the documents from the database, pass the details into an XML file which is retrieved by the application calling the webservice, and then the document files written out at the other end.

My question is what is the best way to go about this?

I believe (but possibly I am wrong) that I need to convert the image data to base64 first.  I know there is the sql command select X from A FOR XML AUTO, BINARY BASE64 which does the conversion but I am not sure how to then write this into an XML document.

Any assistance any one can offer is greatly appreciated as I have not had any experience with working with binary or image, and only very very basic knowledge of XML

can anyone tell me how to pass external parameters to web service


I am constructing an asp web service. The webservice will get parameter from sharepoint timer job. 

The webservice returns value("World")  to sharepoint, but the webservice can't get parameters from sharepoint( string hello). 

Can anyone tell me how to pass an external parameter to webservice



public string helloWorld(string hello )


 string a = hello+ "world"; 

 return  a;



Sharepoint timerjob Execute method

public override void Execute(Guid contentDBID)


localhost.Service ws = new localhost.Service();

string hi = ws.HelloWorld(aWorld);

 SPList Listjob = contentDb.Sites[0].RootWeb.Lists["aTestList"];

// create a new list Item, set the Title to the current day/time, and update the item

SPListItem newList = Listjob.Items.Add();

newList["Title"] = hi;


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend