473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP SOAP XML File Size Issue

1 New Member
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
2 5116
Dököll
2,364 Recognized Expert Top Contributor
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
14,534 Recognized Expert Moderator MVP
I've removed the code tags. They are a problem it seems on very large posts.

Mary
Jun 26 '07 #3

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

Similar topics

2
3312
by: Cantor | last post by:
Hello everyone :) I am writing some dotNET code to "consume" a web service written in PHP. So far I have been getting some error messages and PHP seems to place HTML text in front of the XML...
0
2232
by: Cleo | last post by:
Hi, I am trying to call a WebService Method written in Weblogic from VB.NET and I am getting the following error. I am using SOAP Caal s from VB.NET. Please find the wsdl file and my code. ...
3
9771
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the...
1
4144
by: MarkoH | last post by:
I would like to be able to create string representation of SOAP message something like browsing with IE to ASMX page and trying to invoke some methods. There you can see (at the bottom, you know...
5
3740
by: Robbert van Geldrop | last post by:
Hello, I have a problem consuming a WebService which appears to be dependent of the type of network I am on: The following SOAP response is not processed when I am connected over the internet...
6
4740
by: Stephen | last post by:
I've got a problem with a PHP program that i've written using the standard SOAP client with a WSDL file. When calling one of the functions on the SOAP server i'm occasionally receiving a response...
3
11669
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works...
15
4075
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I hadn't had a class yet and I had some MS help on this to set up, but I wrote a .Net WS that creates a proxy class response using SOAP. Works fine. And in kind of a good way, the IDE has hidden...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.