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 8246755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:36:38+00:00 2026-06-07T22:36:38+00:00

I am trying to interact with a .NET web service through PHP. I’m able

  • 0

I am trying to interact with a .NET web service through PHP. I’m able to connect to the service, I’m able to call getFunctions and it returns a list of all the service functions. I have used soapUI to test out the web service, and all the requests work flawlessly when I use soapUI.

However, whenever I use PHP to call one of the service functions, I get a seemingly empty response.

Code:

$client = new SoapClient("http://soapservice.com/soap.asmx?WSDL");

$params = array();

$params["userName"] = 'myUserName';     
$params["password"] = 'somePass1234';   

$locations = $client->GetStuff($params);

var_dump($locations);

$locations = $client->GetStuff($params)->GetStuffResult;    

var_dump($locations);

The output of the var dumps is as follows:

object(stdClass)#35 (1) {
  ["GetStuffResult"]=>
  string(835807) ""
}
string(835807) ""

The first question I have is… how can an “empty” string be 835807 chars long? My second and more obvious question is where is the data and why can’t I access it? soapUI shows that the response is in XML, but I am seeing absolutely nothing of use in this response string. Please help!

  • 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-06-07T22:36:39+00:00Added an answer on June 7, 2026 at 10:36 pm

    If $location contains XML then chances are the output is correct but won’t be “shown” in your browser (unless a content-type header like text/plain is sent) because your browser doesn’t show (what it thinks to be) tags/elements. You need to encode the “XML string” in $location containing, for example, <foo> to &lt;foo&gt;. Try:

    echo htmlentities(print_r($locations, true));
    

    …or:

    header("Content-Type: text/plain");
    var_dump($locations);
    

    …or just “view source” in your browser.

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

Sidebar

Related Questions

I'm trying to use a Web Service using PHP and SOAP. The Web Service
I'm trying to write a simple web service client to interact with my simple
I'm trying to interact with a webcam from Java on Windows (without going through
I am trying to migrate a simple WinForms app to a ASP.Net web app.
I'm trying to use net/http to interact w/ the Yahoo Placemaker API but I
I am trying to understand how native code can interact with .NET code and
I am trying to make a PHP script to interact a with a Java
I'm using C#, Asp.Net 4.0 and Telerik and I'm trying to interact with a
I am trying to interact with a javascript api (bare in mind I have
I'm trying to interact with an application over the network which uses a simple

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.