www.webdeveloper.com
Results 1 to 2 of 2

Thread: PHP pass data to c#.net

  1. #1
    Join Date
    Apr 2011
    Posts
    68

    PHP pass data to c#.net

    Hi,

    Is it possible to send a php variable to c#.net?

  2. #2
    Join Date
    Apr 2011
    Posts
    68
    hi, i look at the net and here's what i found
    i got 3 page of php file
    1. index.php
    2.camote.php
    3.camote-server.php


    <?php
    require_once('Nusoap/lib/nusoap.php');
    ?>

    <form action='camote.php' method='post'>
    Insert any data:<input type='text' name='data'/>
    <input type='submit' name='submit' value='submit'/>
    </form>
    <?php
    require_once('Nusoap/lib/nusoap.php');
    $wsdl="http://localhost/proto1/proto1/camote-server.php?wsdl";
    $client=new nusoap_client($wsdl, 'wsdl');
    $param=array(
    'amount'=>$_POST['data'],
    );
    echo print_r($client->call('CalculateOntarioTax', $param));


    ?>
    <?php
    require_once("Nusoap/lib/nusoap.php");
    $ns="http://localhost/proto1/proto1/";
    $server = new soap_server();
    $server->configureWSDL('CanadaTaxCalculator',$ns);
    $server->wsdl->schemaTargetNamespace=$ns;


    $server->register('CalculateOntarioTax',
    array('data' => 'xsd:string'),
    array('return'=>'xsd:string'),
    $ns);


    function CalculateOntarioTax($amount){

    return new soapval('return','string',$amount);
    }
    $server->service($HTTP_RAW_POST_DATA);
    ?>

    so the output is just array after i add print_r on
    $client->call('CalculateOntarioTax', $param)

    the output turned into...
    Array ( [faultcode] => SOAP-ENV:Server [faultactor] => [faultstring] => unable to serialize result [detail] => )

    so how can it turn into xml??

    because i need that to throw to a web service of c#.net

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles