Posting XML data with some fields Using HttpWebrequest.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jehanzeb

    Posting XML data with some fields Using HttpWebrequest.

    Hi guys...

    I have a problem posting xml Data using HttpWebRequest. .

    The server returns Internal error..

    I want to simulate a simple Form with Method=Post. The form have three fields. Two for credentials and the third one for Posting XML. Here is the sample HTML which i want to simulate using HttpWebRequest. .

    Code:
    <form action="https://myurl.com/samplepage.cfm" method="post" >
    integration_id<input type="text" name="integration_id" value="id" /><br />
    integration_pwd<input type="text" name="integration_pwd" value="pwd"  /><br />
    <textarea name="hrxml" style="height: 404px; width: 593px">
    <?xml version="1.0" encoding="UTF-8"?>
    <BackgroundCheck account="test" userId="test" password="test">
      <BackgroundSearchPackage>
        <ReferenceId>
          <IdValue>12345678</IdValue>
        </ReferenceId>
        <PersonalData>
          <PersonName>
            <GivenName>TEST</GivenName>
            <FamilyName primary="undefined">TEST</FamilyName>
          </PersonName>
          <DemographicDetail>
            <GovernmentID countryCode="US" issuingAuthority="SSN">00000000000000</GovernmentID>
            <DateOfBirth>1901-01-01</DateOfBirth>
          </DemographicDetail>
        </PersonalData>
      </BackgroundSearchPackage>
    </BackgroundCheck>
    </textarea>
    <input type="submit" />
    
    </form>
    Last edited by Frinavale; Oct 29 '10, 03:38 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Please review the Windows Event log to determine what the error is. It's hard to help you unless we know what the error is.

    -Frinny

    Comment

    Working...