PHP Bad Request in Curl on SOAP interface of http://www.cyberlogic.gr/webservices/PlaceSearch

前端 未结 5 1602
伪装坚强ぢ
伪装坚强ぢ 2021-01-26 03:10

I am trying to call the url using curl in php. I get a BAD REQUEST error . if someone can help me,I do not get what the problem is

Their \"recipe\" is as follows: http:/

5条回答
  •  伪装坚强ぢ
    2021-01-26 03:38

    As you don't have a WSDL for the SOAP interface of the www.cyberlogic.gr webservice, you won't benefit from using it compared with the other methods, e.g. the GET method:

    ");
    $request->Username  = "SERUNCD";
    $request->Password  = "TA78UNC";
    $request->PlaceType = "Cities";
    $request->Language  = "en";
    
    $url    = "http://wl.filos.com.gr/services/WebService.asmx/PlaceSearch";
    $result = simplexml_load_file($url . "?xml=" . urlencode($request->asXML()));
    if ($result) {
        // process result
        $count = 0;
        foreach ($result->Response->Cities->City as $City) {
            printf("#%03d: %s (%s)\n", $count++, $City->CityName, $City["city_id"]);
        }
    }
    

    This example also shows how to access the city-id attribute which was something not easily possible with standard result parsing and mapping of PHP's SoapClient. As the result type remains undefined anyway, doing this in SoapClient isn't worth the steps it would need to take.

    Example Output:

    #000: Achladies (545)
    #001: Afitos (338)
    #002: Agia Paraskevi (548)
    ...
    #142: Volos town (473)
    #143: Vourvourou (420)
    #144: Vrachos- Loutsa (922)
    

提交回复
热议问题