Skip to content

Categories:

consuming a .net web service with php problem

The trouble I had with consuming a .Net Web service with a php script was that the parameters I passed were not “seen” by the .Net Application.
I used the php_soap.dll (php5 running on windows) with the simple call:

$testRequest = $client->IsAliveNachnameEmail(“Smith”,”smith@smith.com”);

However, the .Net Soap Service did not receive the parameters Smith and smith@smith.com

Do not pass in the parameters directly, but use the following method:

$strNachname = “smith”;
$strEmail = “smith@smith.com”;
$params = array(‘Nachname’=>$strNachname, ‘Email’=>$strEmail);
$testRequest = $client->IsAliveNachnameEmail($params);
echo $test2Request->IsAliveNachnameEmailResult;

and it works! Voila.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Posted in code. Tagged with , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.