Replies: 1 comment 4 replies
-
Hello, Having a WSDL without a SOAP accepting endpoint: Can you tell me how this works? This tool is not really designed to be able to do that. I did make a custom decoder a couple of months ago in a private repo, which is decoding XML into mock objects private function labels()
{
return $this->decodeObject(
<<<EOXML
<Labels>
<Label Code="PRODUCTCODE">
XXXX
</Label>
</Labels>
EOXML
);
} This results in a prohpecy mock object Labels - which contains another Label mock object. I think that would be a better approach than trying to remove / reconstruct parts of the xml. Another thing you might be able to do, is using the veewee/xml encoding/decoding feature: You could be able to:
In any case: I'm quite interested in the solutiion you come up with. So feel free to share how you did it. |
Beta Was this translation helpful? Give feedback.
-
Hello Everyone
I noticed that there are a lot of skilled and experienced developers active on this repo, so we decided to ask if someone knows any better approach then the "hacky" way we came up with.
We need to consume a XML over REST API from our PHP project, so we came across this package (as it is the only one who generates everything we need from the APIs wsdl).
As the API does not use soap we decided to create a request and response manipulator who does strip all "soapish" elements the API doesn't accept.
That middleware currently looks like this:
Which turns:
Into:
We would now have to add a manipulator for the response as well to re add the soap elements (envelope etc.) so the decoder can parse it.
We only started to work with this soap client last week, so if anyone with more experience has an idea how to do that in a better way, we would really appreciate your input.
Beta Was this translation helpful? Give feedback.
All reactions