Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9271145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:32:47+00:00 2026-06-18T15:32:47+00:00

I’m using the PHP Soap Client with a WSDL document.The client is created like

  • 0

I’m using the PHP Soap Client with a WSDL document.The client is created like this:

$client = new SoapClient('http://eklima.met.no/metdata/MetDataService?WSDL');

Now I want to call the function ‘getCountyTypes’ which takes to parameters ‘language’ and ‘countiesId’.

$args = array(
    'language'=>'no', 
    'countiesId'=>'2'
);

Directly using the function __soapCall works as expected:

$res = $client->__soapCall('getCountyTypes', $args);

Trying to use magic functions does not work:

$res = $client->getCountyTypes($args);

I get the following error:

PHP Notice:  Array to string conversion in /Users/jorgen/soaptest.php on line 60
PHP Fatal error:  Uncaught SoapFault exception: [SOAP-ENV:Client] No mapping found for ':countiesId' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'. [java.lang.IllegalArgumentException] in /Users/jorgen/soaptest.php:60
Stack trace:
#0 /Users/jorgen/soaptest.php(60): SoapClient->__call('getCountyTypes', Array)
#1 /Users/jorgen/soaptest.php(60): MySoapClient->getCountyTypes(Array)
#2 {main}
  thrown in /Users/jorgen/soaptest.php on line 60

I need some directions on how to use the soap client with magic functions.

Edit: Added output from var_dump($client->__getFunctions());

array(14) {
  [0]=>
  string(185) "no_met_metdata_Metdata getMetData(string $timeserietypeID, string $format, string $from, string $to, string $stations, string $elements, string $hours, string $months, string $username)"
  [1]=>
  string(106) "ArrayOfno_met_metdata_TimeSerieTypes getTimeserieTypesProperties(string $language, string $timeserieTypes)"
  [2]=>
  string(99) "ArrayOfno_met_metdata_ElementProperties getElementsProperties(string $language, string $elem_codes)"
  [3]=>
  string(93) "ArrayOfno_met_metdata_ElementProperties getElementsFromTimeserieType(string $timeserietypeID)"
  [4]=>
  string(111) "ArrayOfno_met_metdata_ElementProperties getElementsFromTimeserieTypeStation(string $timeserietypeID, int $stnr)"
  [5]=>
  string(97) "ArrayOfno_met_metdata_StationProperties getStationsProperties(string $stations, string $username)"
  [6]=>
  string(111) "ArrayOfno_met_metdata_StationProperties getStationsFromTimeserieType(string $timeserietypeID, string $username)"
  [7]=>
  string(140) "ArrayOfno_met_metdata_StationProperties getStationsFromTimeserieTypeElemCodes(string $timeserietypeID, string $elem_codes, string $username)"
  [8]=>
  string(162) "ArrayOfno_met_metdata_StationProperties getStationsFromTimeserieTypeStationsElemCode(string $timeserietype, string $stations, string $elem_code, string $username)"
  [9]=>
  string(22) "string getDateFormat()"
  [10]=>
  string(89) "ArrayOfno_met_metdata_FlagProperties getFlagProperties(string $language, string $flagsId)"
  [11]=>
  string(110) "ArrayOfno_met_metdata_PrecipitationTypes getPrecipitationTypes(string $language, string $precipitationTypesId)"
  [12]=>
  string(33) "ArrayOfString getValidLanguages()"
  [13]=>
  string(86) "ArrayOfno_met_metdata_CountyTypes getCountyTypes(string $language, string $countiesId)"
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:32:49+00:00Added an answer on June 18, 2026 at 3:32 pm

    As pointed out by aravind.udayashankara the correct solution is to use

    $res = $client->__soapCall('getCountyTypes', $args);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I would like to count the length of a string with PHP. The string
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.