Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have added web reference and also authenticate it while adding.Following is web request in xml format

POST https://abc.taleo.net/orion/soap?ServiceName=IntegrationManagementService HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/related; type="application/xop+xml"; start="<rootpart@soapui.org>"; start-info="text/xml"; boundary="----=_Part_0_29587830.1410368065144"
SOAPAction: "http://www.taleo.com/ws/integration/toolkit/2011/05/management/IntegrationManagementService#submitLargeDocument"
Authorization: Basic aW50Z191bmlsZXZlcjohbnRnXzg2Nw==
MIME-Version: 1.0
Content-Length: 21450
Host: abc.taleo.net
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_0_29587830.1410368065144
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@soapui.org>
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://www.w3.org/2005/03/addressing" xmlns:man="http://www.taleo.com/ws/integration/toolkit/2011/05/management">
<soapenv:header>
<add:action>http://www.taleo.com/ws/integration/toolkit/2005/07/action/export
<add:replyto>
<add:address>http://www.taleo.com/ws/integration/toolkit/2005/07/addressing/queue

<add:messageid>SP-profile-specific-employee

<soapenv:body>
<man:submitlargedocument>
<man:document>cid:abc-profile-specific-employee-send-request-attachment.xml




Following is c# code
public ActionResult Index()
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Settings.Default.NewTaleoIntegration_IntegrationManagementServiceWebReference_IntegrationManagementService);
IntegrationManagementService imsClient = new IntegrationManagementService();
imsClient.submitLargeDocumentCompleted += new submitLargeDocumentCompletedEventHandler(imsClient_submitLargeDocumentCompleted);
imsClient.Credentials = new NetworkCredential(UserName, PassWord);
imsClient.PreAuthenticate = false;
imsClient.submitLargeDocumentAsync(GetProfileSendRequestResult());
return View();
}
private byte[] GetProfileSendRequestResult()
{
string filePath = @"D:\request.xml";
FileStream fileContents = System.IO.File.OpenRead(filePath);
string contents;
using (var sr = new StreamReader(fileContents))
{
contents = sr.ReadToEnd();
}
byte[] sdf = Encoding.Default.GetBytes(contents);
return sdf;
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900