Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Simple webservice consumed by php problem, maby namespace problem?

Simple webservice consumed by php problem, maby namespace problem?

Scheduled Pinned Locked Moved C#
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Snowjim
    wrote on last edited by
    #1

    Hey! I have a wary simple webservice: [WebService(Namespace = "http://test.net/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class companyService : System.Web.Services.WebService { private companyDatabaseHandler dbHandler = new companyDatabaseHandler(); public companyService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public int getIdByGameName(string gameName) { try { if (gameName != null && gameName.Length > 0) return dbHandler.getBoardGameGeekGameIdByGaneName(gameName); throw (new Exception("gameName is not correct.")); } catch (Exception ex) { throw ex; } } } I can contakt this webservice with PHP using nuSoup. But when It arrives to getIdByGameName the gameName is null? Here is the simple PHP software that are about to cosume the webservice: index.php '; echo 'Spelnamn: '; echo ''; echo ''; } else { require_once('nusoap.php'); $wsdl = "companyService.wsdl"; $client = new soapclient($wsdl, 'wsdl'); $param = array( 'gameName' => $_POST['namn'] ); $result = $client->call('getIdByGameName', $param); if ($err = $client->getError()) { echo "The server returned error: $err"; } else { echo "ID för spel med namn {$_POST['namn']} är: $result \n"; } } ?> Then I have the fallowing WSDL(companyService.wsdl):

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups