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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:43:05+00:00 2026-05-28T07:43:05+00:00

So I have a PHP Soap service that is running nusoap and I am

  • 0

So I have a PHP Soap service that is running nusoap and I am writing custom responses.

The php client works perfectly but C# client keeps returning this:

Object reference not set to an instance of an object.

Any ideas on how to troubleshoot this problem?

I’ve tried initializing every variable with with test data, but I keep getting the same error.

Thanks for your input.

I am using this method.

http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html

This is the error I receive ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException:
Object reference not set to an instance of an object
at gt.MainClass.Main (System.String[] args) [0x0005a] in //Projects/gt/Main.cs:27

line 27 (gt is the wsdl object)

gt.Transact(trans) which I am passing a transaction object and it should return a transaction response,but it appears to not be parsing the response.

[System.Web.Services.Protocols.SoapDocumentMethodAttribute(“http://CANNOT TELL YOUt”, RequestNamespace=”CANNOT TELL YOU”, ResponseNamespace=”CANNOT TELL YOU”,

This is the method being called and this is a piece of code from the partial class.

ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public TransactResponse Transact([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] TransactRequest request) {
object[] results = this.Invoke(“Transact”, new object[] {
request});
return ((TransactResponse)(results[0]));
}

  • 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-28T07:43:06+00:00Added an answer on May 28, 2026 at 7:43 am

    This error was due to xml formatting of the response.

    So in this scenario I was taking a wsdl generated by C# ASP.NET and running that wsdl with nusoap on a php5 apache server. (This was do to a client’s request to re implement an existing service so they didn’t have to change their code.)

    So for example if you have

    <SomeResponse xmlns='some url'>
       < object>
           <element>data</element >
       </object>
    </SomeResponse >
    

    It needs to be formatted like this for .net to parse the xml correctly.

    <SomeResponse xmls='some url'>
    <SomeResult xmlns:a='some url' xmlns:i=''>
       <a:object>
        <a:element></a:element>
     </a:object>
    </SomeResult>
    </SomeResposne>
    

    So it looks like the response data needs to be encapsulated by a Result tag which is the concatenation of the function name with the string “Result”. So in the example above the function being called is the “Some” function.

    I am not a xml or soap expert and I am not sure exactly why this is. I know it has to do with the xmlns:a=’some url’ tag.

    if anyone could explain it better that would be great.

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

Sidebar

Related Questions

Can any body have idea how to consume php soap web service that have
I have a web service that I want to access through SOAP. But I
I have a C# application that communicates with a PHP-based SOAP web service for
I have a PHP SOAP server (using nuSOAP with wsdl) that send the content
i have created a simple web service using Php Nusoap. its working correctly but
I have a RPC encoded PHP webservice that returns a simple soap envelope with
I have a SOAP service that returns an array of a complex type. The
I have a PHP web service built with the NuSOAP library. I've adapted the
I'm writing a PHP client to a C#/WCF web service. The parameters for some
I have a Axis 1.4 (with Spring) web service client consuming a PHP web

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.