Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

classMap not working? #7

Open
philippfrenzel opened this issue Oct 7, 2014 · 6 comments
Open

classMap not working? #7

philippfrenzel opened this issue Oct 7, 2014 · 6 comments
Labels

Comments

@philippfrenzel
Copy link

Hi, I try to map the follwing classes:

public function actions()
  {
      return [
          'SearchLists'=>[
            'class'=>'subdee\soapserver\SoapAction',
            'classMap'=>[
                'SearchRequest' => '\common\models\SOAP\SearchRequest',
                'common\models\SOAP\ResultRecord',
                'common\models\SOAP\names',
                'common\models\SOAP\addresses'
            ],
          ],
          'HelloWorld'=>[
            'class'=>'subdee\soapserver\SoapAction'
          ]
      ];
  }

But whatever I try, the system tells me:

Previous exception:
exception 'ReflectionException' with message 'Class SearchRequest does not exist' in /Users/philippfrenzel/Sites/resparty/vendor/subdee/yii2-soap-server/WsdlGenerator.php:392

What can I do, to get that class recognized?!

@subdee subdee added the bug label Oct 8, 2014
@subdee
Copy link
Owner

subdee commented Oct 8, 2014

Hm it seems the classMap is not being used at all for mapping within the generator.

I shall have to look into this as soon as I have time but for now consider the classMap as non-functional.

@philippfrenzel
Copy link
Author

That's sad... I would like to use it instead of starting to manage it within the native phpSoap classes...
I figured out that the problem is the WSDLGenerator class beeing used, which subsitutes the namespace seperators, before it's getting passed over to the \Reflection() call... I think if you check for the classmap attribute itself than it should work fine... as \Reflection('\random\namespace\class') works!

@philippfrenzel
Copy link
Author

Funny.. someone forked your version and looks like he had the same issue... maybe he should make a pull request to fix this!

look here:

https://github.com/CSharpRU/yii2-soap-server/commits/master

@subdee
Copy link
Owner

subdee commented Oct 8, 2014

Hm thanks for the heads up. I'll contact the author to see if his implementation works and ask him to make a pull request.
Regardless, it shouldn't be much work to fix this but I don't have the time to do that immediately.

@philippfrenzel
Copy link
Author

thanks for your affords and taking time to reply! ;) I couldn't get his version to run but I already thought about working on a work a round ...

@philippfrenzel
Copy link
Author

hi, any news on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants