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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:09:47+00:00 2026-05-27T14:09:47+00:00

I have a C++ SOAP client using gSOAP and am trying to construct a

  • 0

I have a C++ SOAP client using gSOAP and am trying to construct a very simple PHP server (Apache2/PHP5 on Debian) the client can talk to. Unfortunately, I don’t understand how I can work with the complex types my web service is using within PHP.

I have a .wsdl that looks like this:

<definitions name="NumOps"
    targetNamespace="http://192.168.2.113/numops.wsdl"
    xmlns:tns="http://192.168.2.113/numops.wsdl"
    xmlns:xsd1="http://192.168.2.113/testtypes.xsd"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">

<types>
    <schema targetNamespace="http://192.168.2.113/testtypes.xsd"
        xmlns="http://www.w3.org/2001/XMLSchema">
        <element name="AddValRequest">
            <complexType>
                <all>
                    <element name="fVal1" type="float"/>
                    <element name="fVal2" type="float"/>
                </all>
            </complexType>
        </element>
        <element name="AddValResponse">
            <complexType>
                <all>
                    <element name="fResult" type="float"/>
                </all>
            </complexType>
        </element>
    </schema>
</types>

<message name="AddValInput">
    <part name="body" element="xsd1:AddValRequest"/>
</message>
<message name="AddValOutput">
    <part name="body" element="xsd1:AddValResponse"/>
</message>

<portType name="NumOpsPortType">
    <operation name="AddVal">
        <input message="tns:AddValInput"/>
        <output message="tns:AddValOutput"/>
    </operation>
</portType>

<binding name="NumOpsSoapProxy" type="tns:NumOpsPortType">
    <soap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="AddVal">
        <soap:operation soapAction="http://192.168.2.113/"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>
</binding>

<service name="NumOpsService">
    <port name="NumOpsPort" binding="tns:NumOpsSoapProxy">
        <soap:address location="http://192.168.2.113/"/>
    </port>
</service>

</definitions>

My current approach looks like this:

<?php

function AddVal($AddValRequest) {
    // How to create a AddValResponse?!
}

$server = new SoapServer(NULL, array("uri"=>"http://192.168.2.113/"));
$server->addFunction("AddVal");
$server->handle();

?>

The problem here is that I couldn’t anything to get me started on this, and I probably won’t solve this guessing. Does anyone know where I could find material to dig into this matter?

  • 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-27T14:09:48+00:00Added an answer on May 27, 2026 at 2:09 pm

    This works:

    class AddValRequest {
        public $fVal1;
        public $fVal2;
    }
    
    class AddValResponse {
        public $fResult;
    }
    
    function AddVal(AddValRequest $request) {
        $response = new AddValResponse();
        $response->fResult = $request->fVal1 + $request->fVal2;
        return $response;
    }
    
    $server = new SoapServer("numops.wsdl");
    $server->addFunction("AddVal");
    $server->handle();
    
    ?>
    

    and should be sufficient to get someone having the same problem started.

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

Sidebar

Related Questions

I'm trying to write a simple WCF Server + gSOAP client proof-of-concept application using
I have a functional SOAP server using Perl and a C# client: SOAP Server
Greetings stackoverflow. I have been tinkering about with a SOAP client using PHP5's native
I have a PHP SOAP server (using nuSOAP with wsdl) that send the content
I have a SOAP client in Ruby that I'm trying to get working with
I have a SOAP message (see below). Using Xpath, how can I extract the
I have a web server which is acting as a SOAP client to communicate
I have a client using quickbooks on a Mac platform. I have a PHP5-based
I am trying to create a webservice using the PHP Soap extension and I
I am using C# .Net 2.0 to write a webservices client. The server's soap

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.