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

  • Home
  • SEARCH
  • 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 6797937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:40:12+00:00 2026-05-26T18:40:12+00:00

My soap client is working fine and I’m looking for a way send data

  • 0

My soap client is working fine and I’m looking for a way send data from soap client (written in c) to soap server written in php.
What I know the basic initiate in php like the following

$soapServer= new SoapServer("test.wsdl"); 
$soapServer->setClass('myClass');
$data = file_get_contents('php://input');
$soapServer->handle(); 

But exactly how can I let php “listen” and receive data from soap client?
Any idea?

  • 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-26T18:40:13+00:00Added an answer on May 26, 2026 at 6:40 pm

    If you generate a SOAP server, you have to define your functions:

    You make a function

    <?php
    function getItemCount($upc){
    //in reality, this data would be coming from a database
    $items = array('12345'=>5,'19283'=>100,'23489'=>234);
    return $items[$upc];
    }
    ?>
    

    Now add that function to your SOAP service

    <?php
    ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
    $server = new SoapServer("inventory.wsdl");
    $server->addFunction("getItemCount");
    $server->handle();
    ?>
    

    That function getItemCount is added to your SOAP service

    To test this with a client:

    <?php
    ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
    $client = new SoapClient("http://[path to the service]/inventory.wsdl");
    $return = $client->getItemCount('12345');
    print_r($return);
    ?>
    

    For more information and details http://jimmyzimmerman.com/blog/2007/02/soap-server-with-php5-part3-the-glue-code.html

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

Sidebar

Related Questions

Is there a way to generate a PHP Soap Client from a WSDL file?
I've got a working SOAP::Lite client. It works against an established server, but so
I have a SOAP client in Ruby that I'm trying to get working with
I am looking for a python SOAP 1.2 client but it seems that it
I'm using the LanguageService (translation service) from Bing. I generated the F# soap client
In order to improve the client/server behaviour, I'm looking for adapt my iphone client
I'm working on a web service client which need to communicate with a server
I am trying to get a web service client working from OSGi, I am
A client I'm working for has a standard in which they require the data
I am working on one client issue related to Exchange server. and so I

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.