From: mid Date: 2007-02-02T04:15:10+09:00 Subject: SOAP request malformed (missing n1 element) I've been trying to get this working for over a week now and I can't for the life of me work it out. I can currently generate SOAP requests in Ruby by two methods: 1) Generating classes using wsdl2ruby 2) Using SOAP4r and manually generating requests My problem is that I can get each of these to complete 90% of the task but I'm unable to get either of them to complete the task 100% Using SOAP4r I can generate a valid request: username password 1 dg12 6eg Unfortunately it returns: {http://webservices.globaladdress.net}AddressLine6=# {http://webservices.globaladdress.net}AddressLine7=# {http://webservices.globaladdress.net}AddressLine8=# {http://webservices.globaladdress.net}Company=# {http://webservices.globaladdress.net}Building=# {http://webservices.globaladdress.net}SubBuilding=# {http://webservices.globaladdress.net}Department=# {http://webservices.globaladdress.net}Premise="1" {http://webservices.globaladdress.net}Street="Murray Street" {http://webservices.globaladdress.net}SubStreet=# {http://webservices.globaladdress.net}POBox=# {http://webservices.globaladdress.net}City="Annan" {http://webservices.globaladdress.net}SubCity=# {http://webservices.globaladdress.net}Principality=# {http://webservices.globaladdress.net}Region="Dumfriesshire" {http://webservices.globaladdress.net}Postcode="DG12 6EG" {http://webservices.globaladdress.net}DPS=# {http://webservices.globaladdress.net}Cedex=# {http://webservices.globaladdress.net}Country="United Kingdom" {http://webservices.globaladdress.net}CountryISO="GBR" {http://webservices.globaladdress.net}ACR="L5-P4S6A0T6R6Z4C4-100">> I haven't been able to find a way of accessing the information inside this object. If I use wsdl4rubys generated classes I generate a malformed SOAP request: username password 1 dg12 6eg Note the items: addresslin1 and postcode don't have n1 infront of them. This causes the web service to not recognise those elements. The response is in a format I can use. I can access each of the instance variables. > I'm using structs to generate the items in address = Struct.new(:AddressLine1, :postcode) request = Struct.new(:username, :password, :tmpContact) driver.ProcessAddress(request.new("username","password", address.new("1", "dg12 6eg"))) Does anyone know how I can either: 1) Access the data in the returned object in the first example 2) Generate a valid SOAP request with the missing n1 elements 3) Suggest another way I can go about this