Calling php web service from net application

January 16, 2017, at 10:47 PM

Good day dear friends. I'm tying to call PHP web service, created with SoapServer from net winform application. PHP method is recieving xml string as parameter and returning json encoded array:

    function getPolicy($contentsXml) {
        if ($everyting->isOK) {
            $resultArr = createResultArray();
            // Process errors
        $result = json_encode($resultArr);
        return $result;

This is wsdl included in php web service i'm using to add web reference to visual studio:

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="XmlImportClaimWSDL"
    <xsd:schema xmlns=""  elementFormDefault="qualified" targetNamespace="" >
         <element name="getPolicy">
                    <element minOccurs="0" maxOccurs="1" name="contentsXml" type="xsd:string" />
          <element name="getPolicyResponse">
                    <element minOccurs="0" maxOccurs="1" name="contentsXml" type="xsd:json" />
  <wsdl:message name="getPolicyRequest">
    <wsdl:part name="requestParam" type="xsd:string"/>
  <wsdl:message name="getPolicyResponse">
    <wsdl:part name="responseParam" type="xsd:string"/>
  <wsdl:portType name="ServerClaimSoapType">
    <wsdl:operation name="getPolicy">
      <wsdl:input message="tns:getPolicyRequest" />
      <wsdl:output message="tns:getPolicyResponse" />
  <wsdl:binding name="ServerClaimSoapBinding" type="tns:ServerClaimSoapType">
    <soap:binding transport="" style="rpc"/>
    <wsdl:operation name="getPolicy">
      <soap:operation soapAction="http://php-server-address/"/>
        <soap:body use="literal" />
       <soap:body use="literal" />
  <wsdl:service name="ServerClaim">
    <wsdl:port name="ServerClaimSoap" binding="tns:ServerClaimSoapBinding">
      <soap:address  location="http://php-server-address/phpSoapService.php" />

As I can see from fiddler, PHP receives parameter and sends back correct json object, but in net code result is always null. Net code is:

PhpSoapObject client = new PhpSoapObject();
var result = client.getPolicy(PredifenedXmlString);

So the result variable is always null; My guess is wsdl binding. I've searched a lot about this situation. I've realized that using php web service with net framework without nusoap is very poorly documented. Thanks everyone for reading such a long question.

Rent Charter Buses Company
How do I fetch data from this columm in pdo? [duplicate]

How do I fetch data from this columm in pdo? [duplicate]

This question already has an answer here:

Copy cells with styles with PHPExcel

Copy cells with styles with PHPExcel

I am a beginner in PHP trying to display axls sheet in a div with PHPExcel

Checking if a file is behind htaccess

Checking if a file is behind htaccess

Is there anyway to check if a file, in my case an image file, is behind htaccess?