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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:02:42+00:00 2026-05-28T03:02:42+00:00

This is probably a newbie face-palm question, but I can’t figure this out. I’m

  • 0

This is probably a newbie face-palm question, but I can’t figure this out. I’m working with a web service from a Magento store (i.e. code in the Magento store is accessing a remote web service). It so happens in this case I have a local WSDL file that I need to reference. I’ve done this before using a remote URL to the WSDL file and that works fine. However, with a local file, I can’t figure out how to reference it. I have it working by putting the file in a wsdl subdirectory of the root of the site and then I can reference it using http://mysite/wsdl/thefile.wsdl. However, I’d prefer to use a relative path to reference it (mainly due to the fact that I plan to deploy this same code to different sites and I’d like to use the same code for all).

I guess my question comes down to this: When you instantiate an instance of PHP’s SoapClient like this $client = new SoapClient("thefile.wsdl"), where is it looking for thefile.wsdl? I thought it would be local to the PHP file that instantiates the SoapClient, but it didn’t work when I put the file in the same folder. I tried the /includes directory as well as app/code/local.

I’m sure this is a no brainer for seasoned programmers, but sometimes the basics allude me…

  • 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-28T03:02:43+00:00Added an answer on May 28, 2026 at 3:02 am

    Mystery Solved! This is probably obvious to most, but I had to learn it, so perhaps someone else will benefit from it too.

    I didn’t realize that, due to Magento’s design, the “root” of all pages is /index.php. EVERY page is loaded from that, so OF COURSE it’s the root. When you try to instantiate a SoapClient, it looks in the directory of the main root script file, not the current module/class file. I could put the WSDL files in the root of the webserver and loaded them successfully (I guess I hadn’t tried that before…).

    What I’ve done now is to move them to the /media directory and I call them up by getting the media directory using getBaseDir('media'), tack on my sub-directory path, and VIOLA!

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

Sidebar

Related Questions

This is probably a newbie question, but I cannot figure out the best solution.
This is probably a newbie question, but I can't seem to think of a
Okay, this is probably a very newbie question, but how can I get to
I'm probably making a newbie mistake here, but I can't figure out how to
This is probably a newbie question, but how can I pause and resume my
This is a simple newbie question. I could probably figure this out using some
I'm a bit new to Rails/RSpec/Capybara, so this is probably a newbie question, but
This is probably a really newbie question (well, I'm pretty sure it is), but
I realize this is probably a hopelessly newbie question, but what is the difference
this is probably a newbie question regarding memory manegment. How can i release an

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.