Open okkdev opened 3 years ago
Hey, did you ever figured this out? I'm stuck with the same problem. Not sure what I'm missing...
Unfortunately not 😞
I did. Turned out to be an inconsistent namespace definition in the WSDL I was targeting.
I am struggling with this issue currently - trying to use this client with the Salesforce WSDL. I can provide more details (wsdl, request body being generated by soap, example of "correct" request body, etc. if anyone has interest and bandwidth to try and help.
I've had issues with the namespace problem too - got it working by going over the lib's code and seeing that it's using some configurations (it helped initially):
config :soap, :globals,
env_namespace: "soapenv",
version: "1.1",
custom_namespaces: %{
aut: "some_action_url",
veh: "some_other_action_url"
}
Unfortunately, after a few days, the lib doesn't build the correct request again and i had to use a "hacky" way to do the requests:
:sweet_xml
to handle the response (also this lib's Soap.Response.parse/2
worked)EDIT / UPDATE:
After digging around the lib, i found that my issue was that the wsdl
that i'm using doesn't have complex_types
filled (they're linked from another location, but the lib isn't able to / doesn't read them) - that data was needed for my problem (action-namespace mismatch) to be gone.
For my case, the solution was like this:
extra_complex_type = %{
name: "action_name",
type: "name_space:action_name"
}
wsdl = %{wsdl | complex_types: [extra_complex_type | wsdl.complex_types]}
When I try to use any actions from my WSDL file the namespace is missing from the request, thus resulting in an invalid request.
It should look like this:
But what I currently get is:
This is my code:
Is this a problem with my wsdl or is it not being added by the lib?
Here is my
wsdl
and thexsd
s wsdl.zip