-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Problem to understand how to access the respons element #519
Comments
Hello, I just got back to you on previous message regarding the lack of types: This is what is making it hard for you to get to the information you need: As you can see, you currently need to use mixed requests and responses because it is not able to figure out what types it is talking about. If you update the wsdl dependency and regenerate the types and classmap, you should get the types you need on which you can access the data you are looking for. composer update php-soap/wsdl
./vendor/bin/soap-client generate:classmap --config=yourconfig.php
./vendor/bin/soap-client generate:types --config=yourconfig.php Can you try that first to see if that makes things easier for you? |
Many thanks , I have updated the dependency and now it was able to generate the classmap type and so on Now still trying to understand how to use correctly . If i'm looking at the getCCMVersion method as exposed previously . So for example the method is requesting a parameter for this
or If I'm passing a null argument or null array ... it is answering that my type is wrong .
or
and If'm looking the definitions of the GetCCMVersionReq type
I'm may be wrong or I don't understand the type or the variable defintions but I think that I can request it empty . Can you point me in which format I need to put my $axlparams requested in the AxlClient A big thank you to you in the time that you have already invested for me :) Olivier |
Can it be in that way that I need to look So with
I got
and if I'm pushing an empty string ,
then I got the following answer:
Olivier |
ok I think that the structure that I need to send is the second one if I'm understanding well the documentation
But I still have some issue with the Answer.
Many thanks Olivier |
Hello, Yes, thats the way to request it. $request = new GetCCMVersion(null); You can start debuggin the issue here: soap-client/src/Phpro/SoapClient/Caller/EngineCaller.php Lines 33 to 35 in 03d3123
The response coming back from the soap server should implement You might want tot dump the mixed result object before the error is triggered to see what's inside of it. |
Hi , Here is what I got as answer to the var_dump It is like if it is requesting all API in the request .
The answer is presnet
|
As mentioned : It seems like The |
Hi Tom , Even with the duplicate strategy in the factory , it is not working In fact for every "element" that I need , I have if I can say like this 4 elements. So If i'm taking back the example of getCCMversion , i have the following
And I think that it is for all element. So even If I'm updating the classRes to implement a ResultInterface , as you said it is not implementing it . It wants to use another definition Also I found also that for the List elements requests , I need for example the class SearchCriteria but I can't initialize it because there is no constructor so I can't defined my parameter and I'm guessing that it will be the same for the Returned Tags . I don't know why they implement the structure like that . You will find the 4 definition I will continue to read and document myself to see how I can overcome this as it is so new for me but I don't think that I will be able to use your functionality right now and it is damage but you have done an amazing job on it !!! Thank you |
Can it be related as well to specific Rules or Assemblers ? Olivier |
Hello @ccievoiceoks, It's indeed a matter of getting the configuration of assemblers and rules right for getting a constructor in the classes where you want them to be. ->addRule(
new Rules\TypeMapRule(
[
'SearchCriteria' => new Rules\AssembleRule(new Assembler\ConstructorAssembler()),
],
new Rules\MultiRule([])
)
) About the response types: <xsd:complexType name="GetCCMVersionRes"></xsd:complexType>
<xsd:element name="getCCMVersionResponse" type="axlapi:GetCCMVersionRes"/> Meaning the <operation name="getCCMVersion">
<input message="s0:getCCMVersionIn"/>
<output message="s0:getCCMVersionOut"/>
<fault name="fault" message="s0:AXLError"/>
</operation> With <message name="getCCMVersionIn">
<part element="xsd1:getCCMVersion" name="axlParams"/>
</message>
<message name="getCCMVersionOut">
<part element="xsd1:getCCMVersionResponse" name="axlParams"/>
</message> Meaning that the client expects the type There are some optimizations being done internally for "knowing those are the same thing". I'll take a look at it later to see if I can know somehow they are the same type and should behave like so. |
Support Question
Hi again ,
Finally I made it work to query my cisco AXL device with the SOAP request.
I manage it to work because there was also an issue with SSL but as you have already answered in other issues .
PSR-18 is not accepting stream_context
So I have to manage to use Guzzle wit PSR18-Transport options if have well understood what you proposed in the issue #397.
Sorry to come back to you with a silly question but as newbie in OOP and with all concepts introduced in your package.
I'm trying to decode as much as I can
So I'm receiving for example the following output
I don't know how to access the element that the response provided me , so in that case the value 15.0.0.1.10000(32)
Indeed I can't access the result options as it is a private element
I know that it is a silly question but can you help me on this ?
Many thanks
Olivier
The text was updated successfully, but these errors were encountered: