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 6890511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:17:28+00:00 2026-05-27T06:17:28+00:00

I’m having problems getting the results I want from the WSDL. My script: <?php

  • 0

I’m having problems getting the results I want from the WSDL.

My script:

<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/classes/class.glssoap.php');

$glssoap = new GLSSoap;

echo "<pre>";
//print_r($glssoap->GetOneParcelShop(96101)); // SUCCESS
//print_r($glssoap->GetAllParcelShops()); // SUCCESS
print_r($glssoap->GetAllParcelShopsInZipcode(8000)); // FAILS : RETURNS  operation GetAllParcelShopsInZipcode not present.
print_r($glssoap->GetNearestParcelShops('Kriegersvej 8', '8000')); // FAILS : RETURNS  operation GetNearestParcelShops not present.
print_r($glssoap->SearchNearstParcelShops('Kriegersvej 8', '8000')); // FAILS : RETURNS  operation SearchNearstParcelShops not present.
echo "</pre>";
?>

The class:

<?php
class GLSSoap {

    //Get one ParcelShop 
    public function GetOneParcelShop($parcelShopNumber)
    {
        $gls_params = array();
        $gls_params['ParcelShopNumber'] = $parcelShopNumber;

        $result = $this->_soapcall('GetOneParcelShop', $gls_params);

        return $result;
    }

    //Returns all ParcelShops in Denmark 
    public function GetAllParcelShops()
    {   
        $gls_params = array();
        $result = $this->_soapcall('GetAllParcelShops', $gls_params);

        return $result;
    }

    //Returns all ParcelShops in a zipcode 
    public function GetAllParcelShopsInZipcode($zipCode)
    {   
        $gls_params = array();
        $gls_params['Zipcode'] = $zipCode;

        $result = $this->_soapcall('GetAllParcelShopsInZipcode', $gls_params);

        return $result;
    }

    //Search for the nearest ParcelShops to an address - Strict version - used for automated processing 
    public function GetNearestParcelShops($street, $zipCode, $amount = 4)
    {   
        $gls_params = array();
        $gls_params['Street'] = $street;
        $gls_params['zipcode'] = $zipCode;
        $gls_params['amount'] = $amount;

        $result = $this->_soapcall('GetNearestParcelShops', $gls_params);

        return $result;
    }

    //Search for the nearest ParcelShops to an address - Loose version - user should veryfi data 
    public function SearchNearstParcelShops($street, $zipCode, $amount = 4)
    {   
        $gls_params = array();
        $gls_params['Street'] = $street;
        $gls_params['zipcode'] = $zipCode;
        $gls_params['amount'] = $amount;

        $result = $this->_soapcall('SearchNearstParcelShops', $gls_params);

        return $result;
    }

    private function _soapcall($call, $params)
    {
        require_once(dirname(__FILE__).'/class.nusoap.php');

        $soapclient = new nusoap_client('http://www.gls.dk/webservices_v2/wsPakkeshop.asmx?WSDL','wsdl');

        $result = $soapclient->call($call, array('parameters' => $params));

        /* Debug */
        echo '<h2>Request</h2><pre>' . htmlspecialchars($soapclient->request, ENT_QUOTES) . '</pre>';
        echo '<h2>Response</h2><pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
        //echo '<h2>Debug</h2><pre>' . htmlspecialchars($soapclient->debug_str, ENT_QUOTES) . '</pre>';
        echo '<pre>'; print_r($result); echo '</pre>';

        // Check for a fault
        if ($soapclient->fault) {
            echo '<div class="alert error"><h2>Fault</h2><pre>';
            print_r($result);
            echo '</pre></div>';
        } else {
            // Check for errors
            $err = $soapclient->getError();
            if ($err) {
                // Display the error
                echo '<div class="alert error"><h2>Error</h2><pre>' . $err . '</pre></div>';
            } else {
                return $result;
            }
        }

        return false;
    }
};
?>

Further more I use the NUSOAP class as represented here: http://sourceforge.net/projects/nusoap/


My problem is that GetAllParcelShopsInZipcode, GetNearestParcelShops & SearchNearestParcelShops all returns “operation X not present”.

The service I’m using is located here: http://www.gls.dk/webservices_v2/wsPakkeshop.asmx

Can anyone please give me a hint what I’m doing wrong?

Thanks in advance

  • 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-05-27T06:17:29+00:00Added an answer on May 27, 2026 at 6:17 am

    For anyone stumbling across this question at a later time, the problem lies with GLS documentation not being updated properly. Notice the names of the different methods at their online webservice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
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 have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

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.