-
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
Namespace Confusion #384
Comments
can you provide code to reproduce the problem? |
I have it in a Gist here: https://gist.github.com/4692074. The |
I've been using soapUI to test the SOAP service and noticed that when trying to make the same call, soapUI sends the following message <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:uri="uri:dataupload.ws.sdk.edialog.com">
<soapenv:Header/>
<soapenv:Body>
<uri:listAllDataColumns/>
</soapenv:Body>
</soapenv:Envelope> Is it possible that Savon should also be sending only the necessary namespaces? Is there a way to have Savon send only the necessary namespaces? |
Could this be related to #305? I used <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ins7="uri:dataupload.ws.sdk.edialog.com"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ins0="uri:audience.ws.sdk.edialog.com"
xmlns:ins1="uri:audiencetransfer.ws.sdk.edialog.com"
xmlns:ins2="uri:campaign.ws.sdk.edialog.com"
xmlns:ins3="uri:cell.ws.sdk.edialog.com"
xmlns:ins4="uri:content.ws.sdk.edialog.com"
xmlns:ins5="uri:cp.ws.sdk.edialog.com"
xmlns:ins6="uri:customerStatus.ws.sdk.edialog.com"
xmlns:ins8="uri:common.ws.sdk.edialog.com"
xmlns:ins9="uri:ereport.ws.sdk.edialog.com"
xmlns:ins10="uri:exporter.ws.sdk.edialog.com"
xmlns:ins11="uri:grid.ws.sdk.edialog.com"
xmlns:ins12="uri:insightbuilder.ws.sdk.edialog.com"
xmlns:ins13="uri:urlmanagement.ws.sdk.edialog.com"
xmlns:ins14="uri:mailingcontrol.ws.sdk.edialog.com"
xmlns:ins15="uri:mailing.ws.sdk.edialog.com"
xmlns:ins16="uri:realtimemessaging.ws.sdk.edialog.com"
xmlns:ins17="uri:realtimemessagingconfiguration.ws.sdk.edialog.com"
xmlns:ins18="uri:udf.ws.sdk.edialog.com"
xmlns:ins19="uri:user.ws.sdk.edialog.com">
<soapenv:Body>
<ins7:listAllDataColumns/>
</soapenv:Body>
</soapenv:Envelope> ... and my response is as follows: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns19:listAllDataColumnsResponse xmlns:ns10="uri:mailingcontrol.ws.sdk.edialog.com"
xmlns:ns11="uri:multichannel.ws.sdk.edialog.com"
xmlns:ns12="uri:insightbuilder.ws.sdk.edialog.com"
xmlns:ns13="uri:grid.ws.sdk.edialog.com"
xmlns:ns14="uri:realtimemessaging.ws.sdk.edialog.com"
xmlns:ns15="uri:audience.ws.sdk.edialog.com"
xmlns:ns16="uri:audiencetransfer.ws.sdk.edialog.com"
xmlns:ns17="uri:urlmanagement.ws.sdk.edialog.com"
xmlns:ns18="uri:udf.ws.sdk.edialog.com"
xmlns:ns19="uri:dataupload.ws.sdk.edialog.com"
xmlns:ns2="uri:echo.ws.example.edialog.com"
xmlns:ns20="uri:exporter.ws.sdk.edialog.com"
xmlns:ns21="uri:customerStatus.ws.sdk.edialog.com"
xmlns:ns22="uri:seq.ws.sdk.edialog.com"
xmlns:ns23="uri:seq-bpe-callback.ws.sdk.edialog.com"
xmlns:ns24="uri:realtimemessagingconfiguration.ws.sdk.edialog.com"
xmlns:ns25="uri:ereport.ws.sdk.edialog.com"
xmlns:ns26="uri:user.ws.sdk.edialog.com"
xmlns:ns27="uri:cp.ws.sdk.edialog.com"
xmlns:ns3="uri:content.ws.sdk.edialog.com"
xmlns:ns4="uri:etc.ws.sdk.edialog.com"
xmlns:ns5="uri:mailing.ws.sdk.edialog.com"
xmlns:ns6="uri:common.ws.sdk.edialog.com"
xmlns:ns7="uri:deliverability.ws.sdk.edialog.com"
xmlns:ns8="uri:campaign.ws.sdk.edialog.com"
xmlns:ns9="uri:cell.ws.sdk.edialog.com">
<ns19:column>
<ns19:dictionaryId>184763628</ns19:dictionaryId>
<ns19:tableName>T_MASTER</ns19:tableName>
<ns19:columnName>EMAIL</ns19:columnName>
<ns19:columnType>VARCHAR2</ns19:columnType>
<ns19:maxLength>128</ns19:maxLength>
</ns19:column>
<ns19:column>
<ns19:dictionaryId>184763622</ns19:dictionaryId>
<ns19:tableName>T_MASTER</ns19:tableName>
<ns19:columnName>FIRSTNAME</ns19:columnName>
<ns19:columnType>VARCHAR2</ns19:columnType>
<ns19:maxLength>50</ns19:maxLength>
</ns19:column>
<ns19:column>
<ns19:dictionaryId>184763626</ns19:dictionaryId>
<ns19:tableName>T_MASTER</ns19:tableName>
<ns19:columnName>FULLNAME</ns19:columnName>
<ns19:columnType>VARCHAR2</ns19:columnType>
<ns19:maxLength>100</ns19:maxLength>
</ns19:column>
<ns19:column>
<ns19:dictionaryId>184763624</ns19:dictionaryId>
<ns19:tableName>T_MASTER</ns19:tableName>
<ns19:columnName>LASTNAME</ns19:columnName>
<ns19:columnType>VARCHAR2</ns19:columnType>
<ns19:maxLength>50</ns19:maxLength>
</ns19:column>
<ns19:column>
<ns19:dictionaryId>495847732</ns19:dictionaryId>
<ns19:tableName>T_MEMBER</ns19:tableName>
<ns19:columnName>EVENTINFO</ns19:columnName>
<ns19:columnType>CLOB</ns19:columnType>
</ns19:column>
</ns19:listAllDataColumnsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> Which is the response I am expecting. However, fixing the prefixes for each call is not a viable solution. |
i'll try to take a look at this later today. |
To follow up with more information, if I try to retrieve the body of the response returned in my previous comment, I get an Thanks again for agreeing to help us out. I really appreciate it.
|
i'm glad you found the the |
|
did you change the hash format? savon expects the hash to have snake_case symbols as keys. |
No, the hash format wasn't changed. |
well, how does it look like? if you need help, i need something to work with. |
The hash is below. I hope it's what you needed. response.hash
=> {:"soap_env:envelope"=>
{:"soap_env:header"=>nil,
:"soap_env:body"=>
{:"ns19:list_all_data_columns_response"=>
{:"ns19:column"=>
[{:"ns19:dictionary_id"=>"184763628",
:"ns19:table_name"=>"T_MASTER",
:"ns19:column_name"=>"EMAIL",
:"ns19:column_type"=>"VARCHAR2",
:"ns19:max_length"=>"128"},
{:"ns19:dictionary_id"=>"184763622",
:"ns19:table_name"=>"T_MASTER",
:"ns19:column_name"=>"FIRSTNAME",
:"ns19:column_type"=>"VARCHAR2",
:"ns19:max_length"=>"50"},
{:"ns19:dictionary_id"=>"184763626",
:"ns19:table_name"=>"T_MASTER",
:"ns19:column_name"=>"FULLNAME",
:"ns19:column_type"=>"VARCHAR2",
:"ns19:max_length"=>"100"},
{:"ns19:dictionary_id"=>"184763624",
:"ns19:table_name"=>"T_MASTER",
:"ns19:column_name"=>"LASTNAME",
:"ns19:column_type"=>"VARCHAR2",
:"ns19:max_length"=>"50"},
{:"ns19:dictionary_id"=>"495847732",
:"ns19:table_name"=>"T_MEMBER",
:"ns19:column_name"=>"EVENTINFO",
:"ns19:column_type"=>"CLOB"}],
:"@xmlns:ns10"=>"uri:mailingcontrol.ws.sdk.edialog.com",
:"@xmlns:ns11"=>"uri:multichannel.ws.sdk.edialog.com",
:"@xmlns:ns12"=>"uri:insightbuilder.ws.sdk.edialog.com",
:"@xmlns:ns13"=>"uri:grid.ws.sdk.edialog.com",
:"@xmlns:ns14"=>"uri:realtimemessaging.ws.sdk.edialog.com",
:"@xmlns:ns15"=>"uri:audience.ws.sdk.edialog.com",
:"@xmlns:ns16"=>"uri:audiencetransfer.ws.sdk.edialog.com",
:"@xmlns:ns17"=>"uri:urlmanagement.ws.sdk.edialog.com",
:"@xmlns:ns18"=>"uri:udf.ws.sdk.edialog.com",
:"@xmlns:ns19"=>"uri:dataupload.ws.sdk.edialog.com",
:"@xmlns:ns2"=>"uri:echo.ws.example.edialog.com",
:"@xmlns:ns20"=>"uri:exporter.ws.sdk.edialog.com",
:"@xmlns:ns21"=>"uri:customerStatus.ws.sdk.edialog.com",
:"@xmlns:ns22"=>"uri:seq.ws.sdk.edialog.com",
:"@xmlns:ns23"=>"uri:seq-bpe-callback.ws.sdk.edialog.com",
:"@xmlns:ns24"=>"uri:realtimemessagingconfiguration.ws.sdk.edialog.com",
:"@xmlns:ns25"=>"uri:ereport.ws.sdk.edialog.com",
:"@xmlns:ns26"=>"uri:user.ws.sdk.edialog.com",
:"@xmlns:ns27"=>"uri:cp.ws.sdk.edialog.com",
:"@xmlns:ns3"=>"uri:content.ws.sdk.edialog.com",
:"@xmlns:ns4"=>"uri:etc.ws.sdk.edialog.com",
:"@xmlns:ns5"=>"uri:mailing.ws.sdk.edialog.com",
:"@xmlns:ns6"=>"uri:common.ws.sdk.edialog.com",
:"@xmlns:ns7"=>"uri:deliverability.ws.sdk.edialog.com",
:"@xmlns:ns8"=>"uri:campaign.ws.sdk.edialog.com",
:"@xmlns:ns9"=>"uri:cell.ws.sdk.edialog.com"}},
:"@xmlns:soap_env"=>"http://schemas.xmlsoap.org/soap/envelope/"}} |
as suspected, your hash doesn't look like savon expects it to look like. if you look at your first hash savon (by default) strips the namespace identifiers from the hash keys, so i guess you disabled the |
It turns out |
a pull request for not disabling |
I'm working on the |
you're welcome. |
Was an explanation for the |
I'm having trouble making SOAP requests with Savon, whereas I'm able to make them using SoapUI. I'm convinced it has something to so with namespaces.
We are using the e-dialog WSDL, located here: https://sdk-staging.e-dialog.com/edialog-webservices/SdkService.wsdl. For your convenience, here is the beginning of the WSDL file:
Here is the message that Savon sends:
And here is the response we're getting back:
I am guessing -- and I'm no expert on SOAP -- that the differences in the namespaces is confusing the server.
The text was updated successfully, but these errors were encountered: