Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6181735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:04:42+00:00 2026-05-24T01:04:42+00:00

I am trying to run a java client through PHP which sends an XML

  • 0

I am trying to run a java client through PHP which sends an XML to another server. It typically takes about 10 – 30 seconds to receive the response. When I run the PHP I can tell that there is no load time so I am thinking the rest of the code executes before the response is received. I am attempting to have the return response displayed in the browser and be written to another XML in the same directory. None of this happens. The new XML is created, but is empty.

$output = shell_exec("java SOAPClient4XG http://turbolink.turbo-marketing.net:8180    getList.xml");
sleep(30);
echo $output;

$filename = "getListResult";
$filename .= ".xml";
$fp = fopen($filename, 'w');
fwrite($fp, $output);
fclose($fp);

I added sleep(30) to give the java a chance to finish before passing the value into $output but it doesn’t help. The command java SOAPClient4XG http://turbolink.turbo-marketing.net:8180 getList.xml" works. I have used it in SOAP UI and through PUTTY by running it in the directory. The output I receive is this, in XML / SOAP format:

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
<n1:getListsResponse xmlns:n1="urn:Turbolink"
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <getListsResult xsi:type="n1:getListsResult">
    <responseMessages n2:arrayType="n1:responseMessage[1]"
        xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
        xsi:type="n2:Array">
      <responseMessage>
        <code xsi:type="xsd:string">0</code>
        <message xsi:type="xsd:string">No Error</message>
      </responseMessage>
    </responseMessages>
    <dataLists xmlns:n3="http://schemas.xmlsoap.org/soap/encoding/"
        xsi:type="n3:Array"
        n3:arrayType="n1:dataList[5]">
      <dataList>
        <listID xsi:type="xsd:string">CVPLUS  </listID>
        <listDescription xsi:type="xsd:string">ConsumerVision Plus</listDescription>
        <listVersion xsi:type="xsd:integer">94</listVersion>
      </dataList>
      <dataList>
        <listID xsi:type="xsd:string">MORTHOT </listID>
        <listDescription xsi:type="xsd:string">Mortgage Hotlines</listDescription>
        <listVersion xsi:type="xsd:integer">206</listVersion>
      </dataList>
      <dataList>
        <listID xsi:type="xsd:string">MRTGBASE</listID>
        <listDescription xsi:type="xsd:string">Mortgage Base</listDescription>
        <listVersion xsi:type="xsd:integer">94</listVersion>
      </dataList>
      <dataList>
        <listID xsi:type="xsd:string">SUPERNEW</listID>
        <listDescription xsi:type="xsd:string">American New Movers Plus</listDescription>
        <listVersion xsi:type="xsd:integer">171</listVersion>
      </dataList>
      <dataList>
        <listID xsi:type="xsd:string">TSEBUS  </listID>
        <listDescription xsi:type="xsd:string">TSE Business File</listDescription>
        <listVersion xsi:type="xsd:integer">38</listVersion>
      </dataList>
    </dataLists>
  </getListsResult>
</n1:getListsResponse>

Is there a way I can wait until $output has some value before moving on? When I put an isset($output) conditional I can see that the variable is never set. I tried calling the shell_exec() again inside the conditional but I still get nothing.

*edit: The server has IP restrictions so trying to run this code on your machine will not work exactly the same. You will / should get an error response though.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:04:42+00:00Added an answer on May 24, 2026 at 1:04 am

    I had put the java file in my server env path. Also, making an absolute path to it with /jdk1.6.0_14/bin/java SOAPClient4XG http://...... worked as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a Java client application which in turn calls a
I'm trying to implement a server-client socket program in Java that can support multiple
Am trying to implement a Java program which sends an Apple Push Notification to
I am trying to run a Jersey client class in Eclipse where the server
I am trying to run a very simple server/client ssl code with a self
I have a java server that sends some data through a socket to a
So I made a Server and Client with sockets in Java. I'm trying to
I have a bugzilla server which i am trying to access through the rest
I am trying to run a java based tool using a command line syntax
I am trying to run this dreadfully simple command in Bash java -cp nasa-top-secret.jar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.