# Getting a nil not allowed mapping error when trying to send

**URL:** <https://www.ruby-forum.com/t/getting-a-nil-not-allowed-mapping-error-when-trying-to-send/114617>\
**Category:** Rails\
**Created:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/getting-a-nil-not-allowed-mapping-error-when-trying-to-send/114617 "2007-09-17T13:23:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nimms](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7c8e57/32.png) [@nimms](https://www.ruby-forum.com/u/nimms)\
**Post date:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/getting-a-nil-not-allowed-mapping-error-when-trying-to-send/114617/1 "2007-09-17T13:23:03Z")

</div>

Hi all,  
I’m trying to call a webservice using soap4r and I keep getting a  
MappingError “nil not allowed”

I assume I’m not constructing my webservice call properly.  
I call the wsdl like this:

class SMSMessage  
def initialize(send\_num, destinations, sms\_msg, send\_date\_time)  
@SendNameOrNumber = send\_num  
@Destinations = destinations  
@SMSMessage = sms\_msg  
@SendDateTime = send\_date\_time  
end

attr\_accessor :SendNameOrNumber, :Destinations, :SMSMessage,  
:SendDateTime  
end

msg = SMSMessage.new(“0401666666”, [“0401063296”], “Hi googlegroups”,  
DateTime.now)

soapResponse = client.sendSMSBatch(:UserName =\>  
“removed\_email\_address@domain.invalid”, :Password =\> “imstuckonthisproblem”,  
:SMSMessage =\> msg)

The wsdl is this

\<?xml version="1.0" encoding="utf-8"?\>

\<soap:Envelope xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)” xmlns:soap=“http://  
[schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”\>  
soap:Body  
  
string  
string  
  
dateTime  
string  
  
string  
string  
  
Not\_Set or Low\_Priority or Normal\_Priority or  
High\_Priority  
string  
string  
  
  
\</soap:Body\>  
\</soap:Envelope\>

Any help would be most appreciated…i’ve been bashing my head on this  
for ages \>.\<

cheers  
nimai
