Jump to content

mthacker

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mthacker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have an xml file that is packed full of data, and at the end is an embedded pdf file with the data inside the Cdata tag and it looks like the following: <![CDATA[JVBERi0xLjMKJeTjz9IKMSAwIG9iago8PC9UeXBlIC9QYWdlcyAKL0NvdW50IDYgCi9LaWRz.... PDM3MjYxQzY5NEYzQjc4NjVGQjQ5NzEwMTk3Njg3M0RCPl0KPj4Kc3RhcnR4cmVmCjExNjMxCiUlRU9GCg==]]> how would i remove just this tags data from within the xml file? any suggestions
  2. I have an xml file that I will be posting in order to pull credit scores into our enterprise system. The problem is that I keep getting a response error message saying that my xml file is not well formed. Here's the xml file code <?xml version='1.0' encoding='UTF-8' ?><REQUEST_GROUP MISMOVersionID='2.1'><RECEIVING_PARTY _Name='999LM01098' /><SUBMITTING_PARTY _Name='Liberty Mortgage Funding' /><REQUEST InternalAccountIdentifier='acctID' LoginAccountIdentifier='logID' LoginAccountPassword='thePass' RequestDateTime='2008-01-31 10:37:20' ><REQUEST_DATA><CREDIT_REQUEST LenderCaseIdentifier='loanID' MISMOVersionID='2.1' RequestingPartyRequestedByName='mthacker'><CREDIT_REQUEST_DATA BorrowerID='100252' CreditReportIdentifier='' CreditReportRequestActionType='Submit' CreditRequestType='Single'><CREDIT_REPOSITORY_INCLUDED _EquifaxIndicator='Y' _ExperianIndicator='Y' _TransUnionIndicator='Y' /><CREDIT_SCORE_MODEL_NAME _Type='EquifaxBeacon' /><CREDIT_SCORE_MODEL_NAME _Type='TransUnionEmpirica' /></CREDIT_REQUEST_DATA><LOAN_APPLICATION><BORROWER BorrowerID='Borrower' _FirstName='New' _LastName='Aold' _MiddleName='' _NameSuffix='' _SSN='theSSN'><_RESIDENCE BorrowerResidencyType='Current' _City='theCity' _PostalCode='theZip' _State='theState' _StreetAddress='theAddress' /></BORROWER></LOAN_APPLICATION></CREDIT_REQUEST></REQUEST_DATA></REQUEST></REQUEST_GROUP> I'm trying with hardcoded values for testing, can anyone see what the problem is with this file? This is my first experience with xml to this point. I'm coding using php/curl to post to url.
  3. ok I've gotten past the point of reading the xml file into a variable to attempt to post it. But I've noticed looking at my phpinfo(), that https is turned off, but openssl is enabled. Will having https off keep me from being able to post data? If so how do I go about enabling that option? any help, suggestions?
  4. I am having issues trying to post xml in order to obtain data for use within our system. My code creates the xml file properly but for some reason a few steps later in the code the variable holding the xml data changes for no apparent reason. Here's my code and the outputs from echoes $xml_dec = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"; $rootELementStart = "<REQUEST_GROUP MISMOVersionID='2.1'>"; $rootElementEnd = "</REQUEST_GROUP>"; // $xml_doc = $xml_dec; $xml_doc .= $rootELementStart; $xml_doc .= "<RECEIVING_PARTY _Name='".$ProviderID."' />"; $xml_doc .= "<SUBMITTING_PARTY _Name='Liberty Mortgage Funding' />"; $xml_doc .= "<REQUEST InternalAccountIdentifier='".$InternalAcctID."' LoginAccountIdentifier='".$AcctID."' LoginAccountPassword='".$AcctPassword."' RequestDateTime='".$today."' >"; $xml_doc .= "<REQUEST_DATA>"; $xml_doc .= "<CREDIT_REQUEST LenderCaseIdentifier='".$LenderCaseID."' MISMOVersionID='2.1' RequestingPartyRequestedByName='".$session_username."'>"; $xml_doc .= "<CREDIT_REQUEST_DATA BorrowerID='".$BorID."' CreditReportIdentifier='' CreditReportRequestActionType='Submit' CreditRequestType='Single'>"; $xml_doc .= "<CREDIT_REPOSITORY_INCLUDED _EquifaxIndicator='Y' _ExperianIndicator='Y' _TransUnionIndicator='Y' />"; $xml_doc .= "<CREDIT_SCORE_MODEL_NAME _Type='EquifaxBeacon' />"; $xml_doc .= "<CREDIT_SCORE_MODEL_NAME _Type='TransUnionEmpirica' />"; $xml_doc .= "</CREDIT_REQUEST_DATA>"; $xml_doc .= "<LOAN_APPLICATION>"; $xml_doc .= "<BORROWER BorrowerID='Borrower' _FirstName='New' _LastName='Aold' _MiddleName='' _NameSuffix='' _SSN='424384212'>"; $xml_doc .= "<_RESIDENCE BorrowerResidencyType='Current' _City='Jeffersonville' _PostalCode='47130' _State='IN' _StreetAddress='728 Briscoe Drive' />"; $xml_doc .= "</BORROWER>"; $xml_doc .= "</LOAN_APPLICATION>"; $xml_doc .= "</CREDIT_REQUEST>"; $xml_doc .= "</REQUEST_DATA>"; $xml_doc .= "</REQUEST>"; $xml_doc .= $rootElementEnd; $default_dir = "XMLFiles/"; $default_dir .= $xmlfileName .".xml"; $fp = fopen($default_dir,'w'); $write = fwrite($fp,$xml_doc); //Attempt to post the previously created xml file to the equifax url provided $protocol = 'HTTP/1.1'; $URL = 'https://emsws.equifax.com'; $pathToFolder = '/emsws/services/post/MergeCreditWWW'; $contentType = 'text/xml'; $requestBody = $xml_doc; echo $requestBody; the variable $xml_doc is holding the xml data and it writes everything to a file properly, but when I look at the echo $requestBody all i get is the following line <_RESIDENCE BorrowerResidencyType='Current' _City='Jeffersonville' _PostalCode='47130' _State='IN' _StreetAddress='728 Briscoe Drive' /> even if i make the $xml_doc one continuous line I still only get this fragment in my echo. What could be causing this. I'm new to xml posting so this is all a first for me. Any help would be greatly appreciated
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.