Avatar of mattpotter1981
mattpotter1981 asked on

Page rendering before nuSOAP call complete

I've got a site connected through to a SOAP web service at another company. Connection is fine, and 95% of the time all is good.

I'm connecting through nusoap, and every now and again the page will screw up when presenting data through some foreach loops in there. Basically, it looks like the foreach loops are kicking in before the full soap response has been fully received.

If I wait, say, another 10 seconds and view source in the browser, it's all perfectly formatted and correct. But it doesn't match what's actually shown in the browser. Refresh the page, and it loads perfectly straight away.

Is there any way I can stop all php code from running until the soap call has completely finished?

Web Languages and StandardsPHPWeb Applications

Avatar of undefined
Last Comment
Marcus Bointon

8/22/2022 - Mon
Marcus Bointon

Have you tried switching to the native PHP5 soap client instead of the old nuSOAP classes?

I'm in the process of trying to do that, but whereas pointing nusoap at the WSDL had things going right off the bat, the PHP5 native soap isn't finding it so easy. I'm currently trying to tweak things - may well have to post some code up here shortly!
Marcus Bointon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck