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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:49:23+00:00 2026-05-23T02:49:23+00:00

I’m trying to create a http request to our web service, my test XML

  • 0

I’m trying to create a http request to our web service, my test XML works when directly inputted into the webservices test input field and I click “Invoke”, but when trying to use the same data with PHP + NuSoap, I get a peculiar error which I’ve been unable to solve, I’ve tried to google for it but nothing relevant shows up for this case.

Here is the Request:

POST /iInterface_pc2/service.asmx HTTP/1.0
Host: 10.10.86.55
User-Agent: NuSOAP/0.9.6dev (1.137)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://www.xxxx.com.cn/TransferMaterialInfo"
Content-Length: 722

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
  <TransferMaterialInfo xmlns="http://www.xxxx.com.cn/">
    <Materiallist>
      <Materialinfo>
        <id>123456</id>
        <title>Hello word</title>
        <datetime>2011-04-23 12:12:12</datetime>
        <contributor>Some One</contributor>
        <materialurl>www.website.com/path/audio1.mp3</materialurl>
        <duration>10000</duration>
        <status>0</status>
        <remark></remark>
      </Materialinfo>
    </Materiallist>
  </TransferMaterialInfo>
</soap:Body>
</soap:Envelope>

And the Response:

HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Thu, 28 Apr 2011 11:04:11 GMT
Connection: close
Content-Length: 428

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request. ---&gt; Value cannot be null.
Parameter name: s</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

And finally the PHP I use to generate the request

<?php
      // include soap file
      require_once('lib/nusoap.php');

      // set end point
      $endpoint = "http://10.10.86.55/iInterface_pc2/service.asmx";

      // create client
      $client = new nusoap_client($endpoint);

      if ( $client->getError() ) {
        print "Soap Constructor Error: ";
        print_r($client->getError());
      }

      // Human readable
      $request = <<<HEREDOC

      <TransferMaterialInfo xmlns="http://www.xxxx.com.cn/">
        <Materiallist>
          <Materialinfo>
            <id>123456</id>
            <title>Hello word</title>
            <datetime>2011-04-23 12:12:12</datetime>
            <contributor>Some One</contributor>
            <materialurl>www.website.com/path/audio1.mp3</materialurl>
            <duration>10000</duration>
            <status>0</status>
            <remark></remark>
          </Materialinfo>
        </Materiallist>
      </TransferMaterialInfo>
    HEREDOC;

      $action  = "http://www.xxxx.com.cn/TransferMaterialInfo";

      $msg     = $client->serializeEnvelope($request, '', array(), 'document', 'encoded', '');
      $result  = $client->send($msg, $action);

      if ( $client->fault ) { //soap_fault
        print "Soap Fault :";
        print_r($client->fault->faultcode);
        print_r($client->fault->faultstring);
      }
      elseif ( $client->getError() ) {
        print "Soap Error :";
        print_r($client->getError());
      }
      else {
        print "Result: ";
        print_r($result);
      }

      ..print stuff 
?>

Any insights and guesses GREATLY appreciated. I’ve been banging my head against a brick wall for a good while now. :/

  • 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-23T02:49:24+00:00Added an answer on May 23, 2026 at 2:49 am

    The problem has been solved and was actually caused by faulty ASP code expecting only whitespaces to be html-encoded, resulting in faulty response.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from

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.