Page 1 of 1

Problem with php-service - silverligth client.

Posted: Wed Apr 06, 2011 9:30 am
by second
Hello. I created an simple php service. Everything seems to work fine, but when my Silverligth application tries to consumes service I get an error: [SFxServerDidNotReply].

I have no idea what I am doing wrong.

php service as follows:

Code: Select all

<?php

ini_set("soap.wsdl_cache_enabled", "0");
  
class palvelu{

  /**
  * Enter description here...
  *
  * @param string $name
  * @return string
  */
  function getSearch($name) {
    $name = strtolower($name);
    if ($name != "a")
    {
    return "b1342";
    }
    else
    {
    return "a1342";
    }
    
  }
}
?>
My WSDL file:

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<!-- WSDL file generated by PHP WSDLCreator (http://www.protung.ro) -->
<definitions name="palvelu" targetNamespace="urn:palvelu" xmlns:typens="urn:palvelu" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <message name="getSearch">
    <part name="name" type="xsd:string"></part>
  </message>
  <message name="getSearchResponse">
    <part name="getSearchReturn" type="xsd:string"></part>
  </message><portType name="palveluPortType">
    <operation name="getSearch">
      <documentation>Enter description here...</documentation>
      <input message="typens:getSearch"></input>
      <output message="typens:getSearchResponse"></output>
    </operation>
  </portType>
  <binding name="palveluBinding" type="typens:palveluPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
    <operation name="getSearch"><soap:operation soapAction="urn:palveluAction"></soap:operation>
    <input>
      <soap:body namespace="urn:palvelu" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
    </input>
      <output>
        <soap:body namespace="urn:palvelu" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"></soap:body>
      </output>
    </operation>
  </binding>
  <service name="palveluService">
    <port name="palveluPort" binding="typens:palveluBinding">
      <soap:address location="http://exams.fi/kartta/example/palvelu.php"></soap:address>
    </port>
  </service>
</definitions>