-
Notifications
You must be signed in to change notification settings - Fork 615
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
Issue with Wsld Namespace #49
Comments
seatmanu, The thing is that wsdl is actully forced in to_xml method of soap.rb in savon lib on line 160. I fixed it by making xml_body tag accessible publicly. I will suggest to ruby to add this in the next release, but for now you can override it yourself. |
added a fix for this for the next release: http://github.com/rubiii/savon/commit/93535eb7d1acb257a4ed8ece9630bc3ad3f30fe4 |
renamed the accessor to just "xml". commit at: http://github.com/rubiii/savon/commit/8c82ade65640a4b67ca906d2384a19f8f768c83f#L1L213 |
released version 0.7.6 containg a fix for this problem. please update. |
added an attr_accessor for :xml_body to the soap object. so you can now specify your very own request xml as a string and savon won't force you to use it's conventions.
I am not sure if I am doing something wrong or missing something:
but the following
response = client.search_jobs do |soap, wsse|
soap.header = "<AuthHeader xmlns="http://www.hiredesk.net/WebServices/DataExchangeServices/\">" +
{:sCompanyShortName => 'com' ,:sUserName => 'user' , :sPassword => 'pass'}.to_soap_xml +
""
soap.namespaces['xmlns:xsi'] = "http://www.w3.org/2001/XMLSchema-instance"
soap.namespaces['xmlns:xs'] = "http://www.w3.org/2001/XMLSchema"
soap.namespaces['xmlns:wsdl'] = client.wsdl.namespace_uri
soap.body = {:searchCriteria => "<HDCommand>\x0a <SearchJobs>\x0a <AddedAfter>2010-01-01</AddedAfter>\x0a </SearchJobs>\x0a </HDCommand>"}
end
generate this payload
<env:Envelope xmlns:wsdl="http://www.hiredesk.net/WebServices/DataExchangeServices/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">env:Headeruserpasscomp/env:Headerenv:Bodywsdl:SearchJobs<HDCommand>
<SearchJobs>
<AddedAfter>2010-01-01</AddedAfter>
</SearchJobs>
</HDCommand>/wsdl:SearchJobs/env:Body/env:Envelope
but the webservice on the other end does not like unless I add the following in front of the searchCriteria
wsdl:searchCriteria
So is there a way to do that in Savon automatically? Or Am I missing something in the namespace declaration? Not sure why I have to add wsdl to that searchCriteria tag..
The text was updated successfully, but these errors were encountered: