By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,696 Members | 2,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,696 IT Pros & Developers. It's quick & easy.

PHP SOAP XML File Size Issue

P: 1
I have a PHP SOAP XML file size problem that I was wondering if anyone has seen before. I have an XML file that when I put it through my PHP script with 270 lines (13,082 KB) it works fine. If I make it 271 lines (13,112 KB), it causes the script to end with a soap fault.

I've tried adding substance to the 270 lines to make the file bigger with out adding lines, but it didn't fail.

I've installed everything on a second development box at a higher release, it works fine. Although, unfortunately, the production box is not at this higher release and we can't move it there for another year.

I've also isolated it to a soap issue. I've removed the soap logic (wsdl file) and just created the service object in my client and it works fine (commented in logic).

I have two development systems as follows:
PHP 5.2.1 with Apache 2.0.59 on a iSeries V5R3M0 (problem machine)
PHP 5.2.1 with Apache 2.0.59 on a iSeries V5R4M0 (works fine here)

Messages & Other Information
The Request going to the server looks fine. I'm not getting any Response. The Soap Fault generated is as follows:

SoapFault

ERROR-LOOP Submit CU Exception-Internal Server Error0/www/htdocs/LOOPSubmitCU_Client.php34#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://localhos...', 'urn:LOOPSubmitC...', 1, 0) #1 [internal function]: SoapClient->__call('InsertDATA', Array) #2 /www/htdocs/LOOPSubmitCU_Client.php(34): SoapClient->InsertDATA('<?xml version="...') #3 {main}


Client/Server Code and XML Document

Client Code
<?php

try {

//*** next one line for soap
$client = new SoapClient("http://bfs400j1.bfs.ml.com:89/LOOPSubmitCU.wsdl", array('trace' => 1));
//***

/* DEBUG for soap
$my_array = array(
"start_debug"=> "1",
"debug_port"=> "10013",
"debug_host"=> "131.208.71.6/16",
"debug_stop"=> "1"
);
foreach($my_array as $key=>$val){
$client->__setCookie($key,$val);
}
DEBUG for soap */

//* get xml string
$xml = simplexml_load_file('http://bfs400j1.bfs.ml.com:89/LOOPWindowsSubmit_OK2_5.xml');
if (!$xml) {
return ("ERROR-Unable to load XML");
}
$XMLString = $xml->asXML();

//**** next lines for non soap
//require('LOOPSubmitCU_Service.php');
//$LOOPSubmitObj = new LOOPSubmitCU_Service();
//$wrtRcds = $LOOPSubmitObj->InsertDATA($XMLString);
//***
//*** next one line for soap
$wrtRcds = $client->InsertDATA($XMLString);
//***
if (substr($wrtRcds,0,10) != 'SUCCESSFUL') {
echo "ERROR-LOOPSubmit Service Ended Abnormally-".$wrtRcds;
return "ERROR-LOOPSubmit Service Ended Abnormally-".$wrtRcds;
}

echo $wrtRcds." <br /br>";
return $wrtRcds;
}

catch (SoapFault $e) {
print "<p>";
print "<b>Request :</b>\n".htmlspecialchars($client->__getLastRequest()) ."\n";
print "</p><p>";
print "<b>Response :</b>\n".htmlspecialchars($client->__getLastResponse())."\n";
print "</p>";
print "<h2>SoapFault</h2><br />";
print "<b>ERROR-LOOP Submit CU Exception-</b>".$e->getMessage().$e->getCode().$e->getFile().$e->getLine().$e->getTraceAsString();
return ("ERROR-LOOP Submit CU Exception-".$e->getMessage().$e->getCode().$e->getFile().$e->getLine().$e->getTraceAsString());
}

Server Code
<?php

/**
* LOOP Windows to ISeries DLS Interface Staging Tables
*
* @author plane
* @package defaultPackage
*/


class LOOPSubmitCU_Service {

/**
* This function validates XML string, connects to the database, archives XML file, and writes to any appropriate staging tables
*
* @param string $XMLString
* @return string
*/
public function InsertDATA($XMLString) {

// Load string to XML object
$xml = simplexml_load_string($XMLString);
if (!$xml) {
echo "ERROR-Unable to load XML string";
return "ERROR-Unable to load XML string";
}

return 'SUCCESSFUL-Processed SOAP S:\LOOPSubmitCU_Service'.strlen($XMLString);
}
}

//*** next lines for soap
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("http://bfs400j1.bfs.ml.com:89/LOOPSubmitCU.wsdl");
$server->setClass("LOOPSubmitCU_Service");
$server->handle();
//***
?>

XML data (will fail as is, remove one line an it works)
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Kashmira Brahmbhatt (MERRILL LYNCH) -->
<LOOPWindowsSubmit>
<Header>
<BatchID>90158</BatchID>
<BusinessUnit>BFS</BusinessUnit>
<ProcessEnvironment>UAT</ProcessEnvironment>
<SubmittingUser>tolee</SubmittingUser>
<SubmissionDate>4/19/2007</SubmissionDate>
<SubmissionTime>02:11:10 PM</SubmissionTime>
<SourceSystem>BI</SourceSystem>
<ValidationOnly>N</ValidationOnly>
<Partition>BT5</Partition>
</Header>
<CustomerMaster Action="UPD" AS400File="B$CUMS">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<Name1>AD COLD STORAGE, INC.</Name1>
<ShortName>AD COLD STORAGE</ShortName>
<SortName>AD COLD STORAGE</SortName>
<extraline>999</extraline>
<EntityType>ETC</EntityType>
<CitizenClass>CC</CitizenClass>
<PrimaryIndustry>PIC1</PrimaryIndustry>
<ConfidentialType>C</ConfidentialType>
<WatchFlag>W</WatchFlag>
<InternalBankRelationship>123</InternalBankRelationship>
<MLOffice>MLOFFICE</MLOffice>
<RiskRatingLineOfficer>RR</RiskRatingLineOfficer>
<PortfolioManager>manager</PortfolioManager>
<ReviewFrequency>a</ReviewFrequency>
<GLUnit>glunit</GLUnit>
<Language>ENG</Language>
<Name2>AD COLD STORAGE, INC.2</Name2>
<Name3>AD COLD STORAGE, INC.3</Name3>
<Currency>USD</Currency>
<MinorityClass>12</MinorityClass>
<DefaultAddressSegment>PRM</DefaultAddressSegment>
<PortfolioOfficer>2ndoff</PortfolioOfficer>
<TaxID>taxid</TaxID>
<RiskScenario>qwqw</RiskScenario>
<TaxStatus>ts</TaxStatus>
<ServicingUnit>srvunit</ServicingUnit>
<PortfolioRestrictCode>rc</PortfolioRestrictCode>
<DateRiskRateLineOfficer>20071111</DateRiskRateLineOfficer>
<DateNextReview>20071112</DateNextReview>
<DateLastReview>20071113</DateLastReview>
<ApprovedDirectLiabLimit>12.50</ApprovedDirectLiabLimit>
<ApprovedTotalLiabLimit>1500.99</ApprovedTotalLiabLimit>
<DateLimitApproved>20071114</DateLimitApproved>
<AlternateCustomerNumber>rertyeye</AlternateCustomerNumber>
<RequiredSecurityDesignation>rqs</RequiredSecurityDesignation>
<DateChartered>20071115</DateChartered>
<UserDefinedCode1>ud1</UserDefinedCode1>
<UserDefinedCode2>ud2</UserDefinedCode2>
<UserDefinedCode3>ud3</UserDefinedCode3>
<UserDefinedDate1>20071201</UserDefinedDate1>
<UserDefinedDate2>20071202</UserDefinedDate2>
<UserDefinedAmount1>111.11</UserDefinedAmount1>
<UserDefinedAmount2>112.22</UserDefinedAmount2>
<DateWatchList>20071116</DateWatchList>
<CustomerStatus>CS</CustomerStatus>
<DispositionCode>DC</DispositionCode>
<DateLendingRelationshipInitiated>20071117</DateLendingRelationshipInitiated>
<WebSite>www.website.com</WebSite>
<CustomerMasterAddendumML Action="UPD" AS400File="BBCUMS">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<OriginatingSystem>123</OriginatingSystem>
<WatchReason>WR</WatchReason>
<SpecialHandling>S</SpecialHandling>
<SpecialHandlingAccountType>SHA</SpecialHandlingAccountType>
<SpecialHandlingReason>SHR</SpecialHandlingReason>
<DateSpecialHandling>20070909</DateSpecialHandling>
<LitigationAccount>a</LitigationAccount>
<StateOrganized>StOrg</StateOrganized>
<YearInBusiness>999</YearInBusiness>
<NoEmployees>99999</NoEmployees>
<USCitizen>Y</USCitizen>
<PubliclyTraded>N</PubliclyTraded>
<DriverLicense>DriverLicenseNbr</DriverLicense>
<DBAName>TradeName</DBAName>
<WebSite>www.website.com</WebSite>
<ThirdPartyNotification>N</ThirdPartyNotification>
<ThirdPartyName>3rd party name</ThirdPartyName>
<TrustAgreementTitle>Trust Agreement</TrustAgreementTitle>
<DateTrust>20070910</DateTrust>
<CPAName>CPA Firm</CPAName>
<DateLastPeerReview>20070911</DateLastPeerReview>
<DateNextPeerReview>20070912</DateNextPeerReview>
<AICPAMember>N</AICPAMember>
<AICPASection>Section</AICPASection>
<AIPCAPeerReview>Rv</AIPCAPeerReview>
<AICPASince>20070913</AICPASince>
<CoprID>Corp ID</CoprID>
<CRAInd>q</CRAInd>
<TaxJurisdiction>012</TaxJurisdiction>
<TickerSymbol>ibm</TickerSymbol>
<ConcentrationCustomerName1>Concentration Customer Name 1</ConcentrationCustomerName1>
<ConcentrationCustomerName2>Concentration Customer Name 2</ConcentrationCustomerName2>
<ConcentrationCustomerName3>Concentration Customer Name 3</ConcentrationCustomerName3>
<ConcentrationCustomerName4>Concentration Customer Name 4</ConcentrationCustomerName4>
<ConcentrationCustomerName5>Concentration Customer Name 5</ConcentrationCustomerName5>
<ConcentrationCustomerPercent1>123.123456</ConcentrationCustomerPercent1>
<ConcentrationCustomerPercent2>223.123456</ConcentrationCustomerPercent2>
<ConcentrationCustomerPercent3>323.123456</ConcentrationCustomerPercent3>
<ConcentrationCustomerPercent4>423.123456</ConcentrationCustomerPercent4>
<ConcentrationCustomerPercent5>523.123456</ConcentrationCustomerPercent5>
<DateUpdatedConcentrationCustomer>20070915</DateUpdatedConcentrationCustomer>
<ConcentrationSupplierName1>Concentration Supplier Name 1</ConcentrationSupplierName1>
<ConcentrationSupplierName2>Concentration Supplier Name 2</ConcentrationSupplierName2>
<ConcentrationSupplierName3>Concentration Supplier Name 3</ConcentrationSupplierName3>
<ConcentrationSupplierName4>Concentration Supplier Name 4</ConcentrationSupplierName4>
<ConcentrationSupplierName5>Concentration Supplier Name 5</ConcentrationSupplierName5>
<ConcentrationSupplierPercent1>123.223456</ConcentrationSupplierPercent1>
<ConcentrationSupplierPercent2>223.223456</ConcentrationSupplierPercent2>
<ConcentrationSupplierPercent3>323.223456</ConcentrationSupplierPercent3>
<ConcentrationSupplierPercent4>423.223456</ConcentrationSupplierPercent4>
<ConcentrationSupplierPercent5>523.223456</ConcentrationSupplierPercent5>
<DateUpdatedConcentrationSupplier>20070916</DateUpdatedConcentrationSupplier>
</CustomerMasterAddendumML>
<CustomerAddresses>
<CustomerAddress BatchID="90158" Action="UPD" AS400File="B$CUAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878343">PRM</AddressID>
<TypeCode>01</TypeCode>
<Name1>Office in Chicago</Name1>
<Name2>Busy Name</Name2>
<Name3>Busier Name</Name3>
<Street1>1323 Pilgim Ave</Street1>
<Street2>Building 3 </Street2>
<Street3>Suite A</Street3>
<Street4>Cubicle 13C</Street4>
<City>North Hamton</City>
<State>VA</State>
<PostalZipCode>32423</PostalZipCode>
<CountryCode>010</CountryCode>
<LocationCode>a</LocationCode>
<PhoneNumber1>633-233-4412</PhoneNumber1>
<PhoneNumber2>733.801.2333</PhoneNumber2>
<UserDefinedCode1>UD1</UserDefinedCode1>
<UserDefinedCode2>UD2</UserDefinedCode2>
<UserDefinedCode3>UD3</UserDefinedCode3>
<UserDefinedCode4>ud4</UserDefinedCode4>
<UserDefinedCode5>ud5</UserDefinedCode5>
<CustomerAddressAddendumML BatchID="90158" Action="UPD" AS400File="BBCUAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878343">PRM</AddressID>
<MailAttention>Charles Thomas III</MailAttention>
<YearsAtThisLocation>15</YearsAtThisLocation>
<Rented>N</Rented>
<CollateralRemovalCode>12</CollateralRemovalCode>
</CustomerAddressAddendumML>
<CustomerAddressAddendum BatchID="90158" Action="UPD" AS400File="B$ADAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878343">PRM</AddressID>
<County>Berrien</County>
<EmailAddress>emailaddress@yahoo.com</EmailAddress>
<FaxNumber>453-223-2355</FaxNumber>
<TelexNumber>ad35235a3a3</TelexNumber>
<SwiftID>Swift ID Here</SwiftID>
<ReferToCustomerID>RTCustID</ReferToCustomerID>
<ReferToAddressID>RTA</ReferToAddressID>
</CustomerAddressAddendum>
</CustomerAddress>
<CustomerAddress BatchID="90158" Action="UPD" AS400File="B$CUAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878344">MLC</AddressID>
<TypeCode>02</TypeCode>
<Name1>Office in Toronto</Name1>
<Name2>Toronto Name</Name2>
<Name3>Toronto Name2</Name3>
<Street1>100 Coast Highway</Street1>
<Street2>Hawthorne Hall </Street2>
<Street3>Suite A</Street3>
<Street4>Box 253</Street4>
<City>Toronto</City>
<State>CA</State>
<PostalZipCode>AE3323</PostalZipCode>
<CountryCode>020</CountryCode>
<LocationCode>b</LocationCode>
<PhoneNumber1>888-233-4412</PhoneNumber1>
<PhoneNumber2>733.801.5000</PhoneNumber2>
<UserDefinedCode1>UDa</UserDefinedCode1>
<UserDefinedCode2>UDb</UserDefinedCode2>
<UserDefinedCode3>UDc</UserDefinedCode3>
<UserDefinedCode4>udd</UserDefinedCode4>
<UserDefinedCode5>ude</UserDefinedCode5>
<CustomerAddressAddendumML BatchID="90158" Action="UPD" AS400File="BBCUAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878344">MLC</AddressID>
<MailAttention>Tim Parsons</MailAttention>
<YearsAtThisLocation>1</YearsAtThisLocation>
<Rented>Y</Rented>
<CollateralRemovalCode>1a</CollateralRemovalCode>
</CustomerAddressAddendumML>
<CustomerAddressAddendum BatchID="90158" Action="UPD" AS400File="B$ADAD">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<AddressID Key="2" WindowsID="A9878344">MLC</AddressID>
<County>Cass</County>
<EmailAddress>email2address@yahoo.com</EmailAddress>
<FaxNumber>453-223-5555</FaxNumber>
<TelexNumber>5535235a3a3</TelexNumber>
<SwiftID>Swift 44 Here</SwiftID>
<ReferToCustomerID>RTCustI1</ReferToCustomerID>
<ReferToAddressID>RT1</ReferToAddressID>
</CustomerAddressAddendum>
</CustomerAddress>
</CustomerAddresses>
<CustomerContacts>
<CustomerContact Action="ADD" AS400File="B$ADCN">
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<ContactID Key="2" WindowsID="CntID132">00000000</ContactID>
<ContactFirstName>Jerome</ContactFirstName>
<ContactMiddleInitial>W</ContactMiddleInitial>
<ContactLastName>Vincent</ContactLastName>
<ContactPreFixCode>Mr</ContactPreFixCode>
<ContactSuffixCode>VI</ContactSuffixCode>
<ContactTitle>Vice President</ContactTitle>
<DefaultSalutation>Dear Sir</DefaultSalutation>
<PhoneNumberPrimary>835.134.3303</PhoneNumberPrimary>
<PhoneNumberSecondary>ph2</PhoneNumberSecondary>
<PhoneNumber3>ph3</PhoneNumber3>
<PhoneNumber4>ph4</PhoneNumber4>
<FaxNumberPrimary>835.133.3311</FaxNumberPrimary>
<FaxNumberSecondary>fax2</FaxNumberSecondary>
<TelexNumber>telex</TelexNumber>
<EmailAddress>jerome.vincent@bank1.com</EmailAddress>
<TextDescription>test the description</TextDescription>
<PreferredMethodOfNotification>01</PreferredMethodOfNotification>
<DefalutIncomingPaymentInstructions>I01</DefalutIncomingPaymentInstructions>
<DefaultOutgoingPaymentInstructions>O01</DefaultOutgoingPaymentInstructions>
<UserName>USer Name</UserName>
<DefaultLanguageCode>ENG</DefaultLanguageCode>
<Text1>Test text 1</Text1>
<Text2>Test text 2</Text2>
<CustomerIDaco>00000000</CustomerIDaco>
<AddressIDaco>PRM</AddressIDaco>
</CustomerContact>
<CustomerContact Action="ADD" AS400File="B$ADCN">
<CustomerID Key="1" WindowsID="Z0029305">00010764</CustomerID>
<ContactID Key="2" WindowsID="CntID132">00000000</ContactID>
<ContactFirstName>Pat</ContactFirstName>
<ContactMiddleInitial>ica</ContactMiddleInitial>
<ContactLastName>Howard</ContactLastName>
<ContactPreFixCode>Ms</ContactPreFixCode>
<ContactSuffixCode>pp</ContactSuffixCode>
<UserName>Vaugh Warner</UserName>
<DefaultLanguageCode>ENG</DefaultLanguageCode>
<Text1>Text one here</Text1>
<Text2>Text two here</Text2>
<CustomerIDaco>00000000</CustomerIDaco>
<AddressIDaco>OTH</AddressIDaco>
</CustomerContact>
</CustomerContacts>
<CustomerPaymentInstructions>
<CustomerID Key="1" WindowsID="Z0029304">00010763</CustomerID>
<SegmentID Key="2" WindowsID="Z0029304_O01">O01</SegmentID>
<SpecialInstructions1>Fax 1st, Mail 2nd</SpecialInstructions1>
<SpecialInstructions2>Email 1st, Fax 2nd, Mail 3rd</SpecialInstructions2>
<SwiftNumber>SWft23435</SwiftNumber>
<AbaTransitNumber>ABAacctnbr2</AbaTransitNumber>
<NumberOfDaysFloatInvolved>5</NumberOfDaysFloatInvolved>
<SegmentID Key="2" WindowsID="Z0029304_O01">O01</SegmentID>
<UserCode1>Oc1</UserCode1>
<UserCode2>Oc2</UserCode2>
<UserText1>Ot1</UserText1>
<UserText2>Ot2</UserText2>
<Currency>CAN</Currency>
<FaxNumber>8000-121-1222</FaxNumber>
</CustomerPaymentInstructions>
</CustomerMaster>
</LOOPWindowsSubmit>

Thanks in advance,
Paul
Jun 19 '07 #1
Share this Question
Share on Google+
2 Replies


Dököll
Expert 100+
P: 2,364
Hello!

I can only see your code when replying, did not know it was there. This was I fetched for you:

http://www.w3schools.com/soap/soap_envelope.asp

Care to have look there!

I will see why I cannot see your code.

In a bit!
Jun 26 '07 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
I've removed the code tags. They are a problem it seems on very large posts.

Mary
Jun 26 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.