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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:37:44+00:00 2026-05-28T19:37:44+00:00

I create a complete pluggin in WordPress using ZendFramework and now i’d like to

  • 0

I create a complete pluggin in WordPress using ZendFramework and now i’d like to expose a webservice to access the data because i need to create a c# importation application.

The problem i’m facing is that even though i set the type of a webservice return to a specific type, the classmap is not kicking in and transforming the type. For example:

/**
 * Retursn all events registered on the sgm web interface
 * 
 * @return models_event[]
 */
public function getAllEvents(){
    return models_event::getEvents();
}

defines that the class returned in a models_event array. If i launch the WSDL section, i get a complex type added as “models_event” but heres what’s wrong:

    $autodiscover = new Zend_Soap_AutoDiscover(array(
        'classmap' => array(
            'event' => "models_event",
        ),
        'encoding' => 'utf-8'
    ));
    $autodiscover->setComplexTypeStrategy(new Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex());
    $autodiscover->setClass('models_webservice');
    $autodiscover->handle();

I class mapped models_event to event. So my WSDL should export the complex type:

<xsd:complexType name="ArrayOfmodels_event">
    <xsd:complexContent>
        <xsd:restriction base="soap-enc:Array">
            <xsd:attribute ref="soap-enc:arrayType" wsdl:arrayType="tns:models_event[]"/>
        </xsd:restriction>
    </xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="models_event">
    <xsd:all/>
</xsd:complexType>

But as you can see it is returning a models_event[] complexe type and models_event complex type… i’m all messed up… Why is it doing this?

  • 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-28T19:37:45+00:00Added an answer on May 28, 2026 at 7:37 pm

    What version of Zend Framework are you working with?

    In the version that I’m looking at (1.11.10), Zend_Soap_AutoDiscover does not take an array of options as one of the constructor arguments. The method signature for the constructor is as follows:

        public function __construct($strategy = true, $uri=null, $wsdlClass=null)
    

    The classmap option you are referring to is in Zend_Soap_Server and, IMO, exists mainly because Zend_Soap_Server is mostly just a wrapper around PHP’s native SoapServer class, so it’s interface allows you to access all of the options that are provided by the underlying class. I’m also guessing that that the classmap option exists in order to solve a slightly different problem, which is where you are building a SOAP server based on pre-existing WSDL and would like to map WSDL names to internal PHP class names.

    My advice would simply be to rename the models_event class to event (or, better still, Event), which will hopefully get you closer to what you are looking for in the WSDL.

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

Sidebar

Related Questions

In my project I need to create Cobertura Code Coverage report from Hudson using
Is it possible to create a complete fork of a 'PROGRAM' in execution into
I'm trying to create an auto-complete function for the ICSharpCode.TextEditor. But the fileTabs_KeyDown doesn't
I am trying to create a UITableViewCell which overrides the complete drawing of the
Someone know some interesting and complete tutorial about how to create a Parent-Child dimension
I want to create applications in windows that has complete portability (within windows OSes
I am trying to create virtual desktop. I complete successfully.But i am not able
I recently read through Code Complete, and it recommends that I create a project
I am trying to create a menu panel in jQuery, all is complete except
i want to create a webpage on iphone , but i can't complete it

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.