Skip to content
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

The empty arguments problem. #8

Closed
esycheva opened this issue Feb 17, 2012 · 5 comments
Closed

The empty arguments problem. #8

esycheva opened this issue Feb 17, 2012 · 5 comments
Assignees

Comments

@esycheva
Copy link

Hi!

I have the following code

in my api controller

soap_action "BlockAccount",
:args => {:ils => :string, :asr_id => :string},
:return => {:asr_id => :string, :ils => :string},
:to => :block_account

def block_account
render :soap => {:ils => params[:ils], :asr_id => params[:asr_id]}
end

The request to the my service,

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WashOut">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:BlockAccount soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <ils xsi:type="xsd:string">test</ils>
         <asr_id xsi:type="xsd:string">test</asr_id>
      </urn:BlockAccount>
   </soapenv:Body>
</soapenv:Envelope>

response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:WashOut">
   <soap:Body>
      <tns:BlockAccount_response>
         <tns:asr_id xsi:type="xsd:string">test</tns:asr_id>
         <tns:ils xsi:type="xsd:string">test</tns:ils>
      </tns:BlockAccount_response>
   </soap:Body>
</soap:Envelope>

it works fine, but

the request with empty arguments

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WashOut">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:BlockAccount soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <ils xsi:type="xsd:string"></ils>
         <asr_id xsi:type="xsd:string"></asr_id>
      </urn:BlockAccount>
   </soapenv:Body>
</soapenv:Envelope>

response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:WashOut">
   <soap:Body>
      <tns:BlockAccount_response>
         <tns:asr_id xsi:type="xsd:string">{:"@xsi:type"=>"xsd:string"}</tns:asr_id>
         <tns:ils xsi:type="xsd:string">{:"@xsi:type"=>"xsd:string"}</tns:ils>
      </tns:BlockAccount_response>
   </soap:Body>
</soap:Envelope>

The value '{:"@xsi:type"=>"xsd:string"}' is unexpected for me.

When I get the request with empty argument, params[:argument] returns "{:"@xsi:type"=>"xsd:string"}'.

@ghost ghost assigned inossidabile Feb 26, 2012
@inossidabile
Copy link
Owner

Right. That's a bug in Nori rubiii/nori#12. I'll try to produce workaround for now.

inossidabile pushed a commit that referenced this issue Feb 26, 2012
@inossidabile
Copy link
Owner

Okay. Look what we got. I did the workaround and that solved the problem for all non-ruby SOAP clients. However Savon uses Nori too. And therefore it's a subject for the same bug on the client. If you don't use Savon you are good to go. Please check master and tell me if it works.

@inossidabile
Copy link
Owner

Fixed in 0.3.2

@esycheva
Copy link
Author

Thank you.

@klausmeyer
Copy link
Contributor

I'm currently having the same problem as described in this issue again:

"SND_CITY"=>"{:\"@xsi:type\"=>\"xsd:string\"}"

My environment:

wash_out in version 0.9.0, nori in 2.4.0, ruby 2.1.2 / rails 4.1.4, soap ui as client in version 4.6.4-m-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants