[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SOAP request malformed (missing n1 element

mid

2/1/2007 7:13:00 PM

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:



<?xml version="1.0" encoding="us-ascii" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSc...
xmlns:env="http://schemas.xmlsoap.org/soap/envel...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance...
<env:Body>
<n1:ProcessAddress xmlns:n1="http://webservices.globala......
<n1:username>username</n1:username>
<n1:password>password</n1:password>
<n1:tmpContact>
<n1:AddressLine1>1</n1:AddressLine1>
<n1:Postcode>dg12 6eg</n1:Postcode>
</n1:tmpContact>
</n1:ProcessAddress>
</env:Body>
</env:Envelope>

Unfortunately it returns:

<SOAP::Mapping::Object:0x4c42486
{http://webservices.globala...}ProcessAddressResult="true"
{http://webservices.globala...}tmpContact=#<SOAP::Mapping::Object:0x4c41536
{http://webservices.globala...}AddressLine1="1 Murray Street"
{http://webservices.globala...}AddressLine2="Annan"
{http://webservices.globala...}AddressLine3="DG12 6EG"
{http://webservices.globala...}AddressLine4="United Kingdom"
{http://webservices.globala...}AddressLine5=#<SOAP::Mapping::Object:0x4c3f88a>
{http://webservices.globala...}AddressLine6=#<SOAP::Mapping::Object:0x4c3f4c0>
{http://webservices.globala...}AddressLine7=#<SOAP::Mapping::Object:0x4c3f0ec>
{http://webservices.globala...}AddressLine8=#<SOAP::Mapping::Object:0x4c3ed0e>
{http://webservices.globala...}Company=#<SOAP::Mapping::Object:0x4c3e926>
{http://webservices.globala...}Building=#<SOAP::Mapping::Object:0x4c3e52a>
{http://webservices.globala...}SubBuilding=#<SOAP::Mapping::Object:0x4c3e124>
{http://webservices.globala...}Department=#<SOAP::Mapping::Object:0x4c3dd1e>
{http://webservices.globala...}Premise="1"
{http://webservices.globala...}Street="Murray Street"
{http://webservices.globala...}SubStreet=#<SOAP::Mapping::Object:0x4c3b5a0>
{http://webservices.globala...}POBox=#<SOAP::Mapping::Object:0x4c3b168>
{http://webservices.globala...}City="Annan"
{http://webservices.globala...}SubCity=#<SOAP::Mapping::Object:0x4c3a6aa>
{http://webservices.globala...}Principality=#<SOAP::Mapping::Object:0x4c3a254>
{http://webservices.globala...}Region="Dumfriesshire"
{http://webservices.globala...}Postcode="DG12 6EG"
{http://webservices.globala...}DPS=#<SOAP::Mapping::Object:0x4c38e0e>
{http://webservices.globala...}Cedex=#<SOAP::Mapping::Object:0x4c3853a>
{http://webservices.globala...}Country="United Kingdom"
{http://webservices.globala...}CountryISO="GBR"
{http://webservices.globala...}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:

<?xml version="1.0" encoding="us-ascii" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSc...
xmlns:env="http://schemas.xmlsoap.org/soap/envel...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance...
<env:Body>
<n1:ProcessAddress xmlns:n1="http://webservices.globala......
<n1:username>username</n1:username>
<n1:password>password</n1:password>
<n1:tmpContact>
<addressline1>1</addressline1>
<postcode>dg12 6eg</postcode>
</n1:tmpContact>
</n1:ProcessAddress>
</env:Body>
</env:Envelope>

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.

<ProcessAddressResponse:0x984868c @processAddressResult=true,
@tmpContact=#<Contact:0x9848128 @company=nil, @region=nil,
@addressLine5=nil, @pOBox=nil, @cedex=nil, @addressLine1="United Kingdom",
@department=nil, @addressLine8=nil, @principality=nil, @subStreet=nil,
@addressLine4=nil, @subBuilding=nil, @countryISO="GBR", @dPS=nil,
@addressLine7=nil, @subCity=nil, @street=nil,
@aCR="L1-P0S0A0T0R0Z0C4-000", @addressLine3=nil, @building=nil,
@postcode=nil, @addressLine6=nil, @city=nil, @premise=nil,
@country="United Kingdom", @addressLine2=nil>>



I'm using structs to generate the items in <n1:tmpContact>

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
2 Answers

*US*

11/20/2010 12:58:00 PM

0

http://www.globalresearch.ca/index.php?context=theme&...

http://www.infowars.com/venturas-911-questions-break-through-mainstream-...

On Thu, 9 Sep 2010 17:56:48 -0700 (PDT), M?ebius Pretzel <M0bius_bb_Pretzel@yahoo.com>
wrote:

>Corporate News Runs 9/11 Truth, AE 911 Truth Conference Presents
>Explosive Evidence
>
>Today, Architects and Engineers for 9/11 Truth presented key evidence
>at The National Press Club, evidence that indicated, without a shadow
>of doubt, that the official story is a complete lie.
>
>In what can be described as a miracle, multiple mainstream or semi
>mainstream news agencies have reported the event.
>
>http://theintelhub.com/2010/09/09/corporate-news-runs-911-truth-ae-911-truth-conference-presents-explosive...


Thanks for posting that.

No one has harmed the USA more than
the traitors Bush and Cheney.

Also:

Look at all the odd coincidences, and the bushkultie can't deal with any of them:

"That intelligence agencies, politicians and terrorists have conducted criminal business
together is well established, but BCCI and Iran/Contra were a long time ago, so there?s no
need to rehash all that.

That Jonathan Bush?s Riggs Bank has been found guilty of laundering terrorist funds and
fined a record setting $25 million is embarrassing, surely, but to draw sinister
conclusions is foolish.

That Marvin Bush sat on the board of the Kuwaiti-owned company which provided electronic
security to the World Trade Centre, Dulles Airport and United Airlines means nothing.

That George Bush found success as a businessman only after the investment of Osama?s
brother Salem and Osama?s brother-in-law and al Qaeda financier Khalid bin Mahfouz is just
a one-in-a-million fluke.

That Osama bin Laden is known to have been an asset of US foreign policy in no way implies
he still is. That al Qaeda was active in Kosovo on the same side as NATO merely
demonstrates that nothing is black and white.

The claims of Michael Springman, State Department veteran of the Jeddah visa bureau, that
the CIA ran the office and issued visas to al Qaeda members to receive training in the
United States, are merely sour grapes because he was fired for making such wild
accusations.

That so many in the Bush White House had expressed the need for a "new Pearl Harbor"
before their militarist ambitions could be fulfilled means nothing more than being in the
right place at the right time.

That in May of 2001, Dick Cheney took upon himself the job of co-ordinating a response to
domestic terror attacks even as he was crafting the administration?s energy policy,
circumventing the established infrastructure and ignoring the recommendations of the
Hart-Rudman report, merely shows the VP to be a ?can do? sort of guy.

That the standing order for shooting down hijacked aircraft was altered on June 1, 2001,
taking discretion away from field commanders and placing it solely in the hands of the
Secretary of Defense, is simply poor planning and unfortunate timing. Fortunately the
error has been corrected, since the order was reversed shortly after 9/11.

That Dave Frasca of the FBI?s Radical Fundamentalist Unit received a promotion after
quashing multiple, urgent requests for investigations into al Qaeda assets training at
flight schools in the summer of 2001 does appear odd, but I?m sure there must have been a
good reason for it.

That over the summer of 2001 Washington received many urgent, senior-level warnings from
foreign intelligence agencies of impending terror attacks using hijacked aircraft and did
nothing, demonstrates the pressing need for a new Intelligence Czar.

That former lead counsel for the House David Schippers says he?d taken to John Ashcroft?s
office specific warnings he?d learned from FBI agents in New York of an impending attack ?
even naming the proposed dates, names of the hijackers and the targets ? and that the
investigations had been stymied and the agents threatened, proves nothing but David
Schipper?s need for attention.

That George Bush had plans to invade Afghanistan on his desk before 9/11 demonstrates only
the value of being prepared.

The suggestion that securing a pipeline across Afghanistan figured into the White House?s
calculations is as ludicrous as the assertion that oil played a part in determining war in
Iraq.

That Afghanistan is once again the world?s principal heroin producer is an unfortunate
reality, but to claim the CIA is still actively involved in the narcotics trade is to
presume bad faith on the part of the agency.

Mahmood Ahmed, chief of Pakistan?s ISI, must not have authorized an al Qaeda payment of
$100,000 to Mohammed Atta days before the attacks, and was not meeting with senior
Washington officials over the week of 9/11, because I didn?t read anything about it in the
official report.

George HW Bush and Dick Cheney spent the evening of September 10 in the Oval Office, it?s
true, but they were just old colleagues catching up.

That FEMA arrived in New York on Sept 10 to prepare for a scheduled biowarfare drill is a
lucky twist of fate.

Newsweek?s report that senior Pentagon officials cancelled flights on Sept 10 for the
following day on account of security concerns is only newsworthy because of what happened
the following morning.

That Mohamed Atta attended the International Officer's School at Maxwell Air Force Base,
that Abdulaziz Alomari attended Brooks Air Force Base Aerospace Medical School, that Saeed
Alghamdi attended the Defense Language Institute in Monterey merely shows it?s a small
world, after all.

That Mohammed Atta dressed like a Mafioso, had a stripper girlfriend, smuggled drugs, was
already a licensed pilot when he entered the US, enjoyed pork chops, drank to excess and
did cocaine, was closer to Europeans than Arabs in Florida, and included the names of
defence contractors on his email list, proves how dangerous the radical fundamentalist
Muslim can be.

That 43 lbs of heroin was found on board the Lear Jet owned by Wally Hilliard, the owner
of Atta?s flight school, just three weeks after Atta enrolled ? the biggest seizure ever
in Central Florida ? was just one of those things.

That Hilliard?s plane had made 30-round trips to Venezuela with the same passengers who
always paid cash, that the plane had been supplied by a pair of drug smugglers who had
also outfitted CIA drug runner Barry Seal, and that 9/11 commissioner Richard ben-Veniste
had been Seal?s attorney before Seal?s murder, shows nothing but the lengths to which
conspiracists will go to draw sinister conclusions.

Reports of insider trading on 9/11 are false, because the SEC investigated and found only
respectable investors who will remain nameless involved, and no terrorists, so any
profit-taking was merely coincidental.

That Hani Hanjour, the pilot of Flight 77, was so incompetent he could not fly a Cessna in
August, but in September managed to fly a 767 at excessive speed into a spiraling,
270-degree descent and a level impact of the first floor of the Pentagon, on the only side
that was virtually empty and had been hardened to withstand a terrorist attack, merely
demonstrates that people can do almost anything once they set their minds to it.

That Mohammed Atta left a uniform, a will, his driver's license and a video "how to fly
planes" in his rental car at the airport means he had other things on his mind.

The very mention of Israelis with links to military-intelligence having been arrested on
Sept 11 videotaping and celebrating the attacks, and of a warning of impending attacks
delivered to the Israeli company Odigo two hours before the first plane hit, is the vilest
kind of anti-Semitism and should not be dignified with a response. That the stories were
also reported in the Israeli media is a sad display of self-hatred among certain elements
of the Jewish Left.

That multiple military wargames and simulations were underway the morning of 9/11 ? one
simulating the crash of a plane into a building; another, a life-fly simulation of
multiple hijackings ? and took many interceptors away from the eastern seaboard and
confused field commanders as to which was a real hijacked aircraft and which was a hoax,
was a tragic coincidence, but no less a coincidence.

That the National Military Command Center ops director asked a newly-qualified substitute
to stand his watch at 8:30 am on Sept. 11 is nothing more than bad timing.

That the black boxes were either never found or were unrecoverable was a first for these
particular boxes, but there's a first time for everything.

That a recording made Sept 11 of air traffic controllers? detailing the events of the day,
was destroyed by an FAA official who crushed it in his hand, cut the tape into little
pieces and dropped them in different trash cans around the building, is just one of those
things.

That the FBI knew precisely which Florida flight schools to descend upon hours after the
attacks should make every American safer to know their federal agents are on the ball.

To insinuate evil motive from the mercy flights of bin Laden family members and Saudi
royals after 9/11 shows the sickness of the conspiratorial mindset.

Le Figaro?s report in October 2001, known to have originated with French intelligence,
that two CIA agents met Osama bin Laden in a Dubai hospital in July 2001, proves again the
perfidy of the French.

That the tape in which bin Laden claims responsibility for the attacks was released by the
State Department after having been found providentially by US forces in Afghanistan, and
depicts a fattened Osama with a broader face and a flatter nose, proves Osama masterminded
9/11.

That the White House went on Cipro September 11 shows the foresightedness of America?s
emergency response.

That the anthrax was mailed to perceived liberal media and the Democratic leadership
demonstrates only the perversity of the terrorist psyche.

That the anthrax attacks appeared to silence opponents of the Patriot Act only shows that
appearances can be deceiving.

That the Ames-strain anthrax was found to have originated at Fort Detrick, and was beyond
the capability of all but a few labs to refine, underscores the importance of allowing the
investigation to continue without the distraction of absurd conspiracy theories.

Sibel Edmonds is an attention-seeking nutcase. And since John Ashcroft has gagged her and
classified her public testimony, we should speak no more of her.

But most of all, remember: there are no secrets, governments would never accept civilian
casualties for geostrategic gain, and conspiracies are for the weak-minded and gullible."

http://www.democraticunderground.com/discuss/duboard.php?az=view_all&address=1...


Transition Zone

12/10/2010 6:22:00 PM

0

Most of that is all scary stuff.

On Nov 20, 7:57 am, * US * wrote:
>
> Look at all the odd coincidences, and the bushkultie can't deal with any of them:
>
> "That intelligence agencies, politicians and terrorists have conducted criminal business
> together is well established, but BCCI and Iran/Contra were a long time ago, so there’s no
> need to rehash all that.
>
> That Jonathan Bush’s Riggs Bank has been found guilty of laundering terrorist funds and
> fined a record setting $25 million is embarrassing, surely, but to draw sinister
> conclusions is foolish.
>
> That Marvin Bush sat on the board of the Kuwaiti-owned company which provided electronic
> security to the World Trade Centre, Dulles Airport and United Airlines means nothing.
>
> That George Bush found success as a businessman only after the investment of Osama’s
> brother Salem and Osama’s brother-in-law and al Qaeda financier Khalid bin Mahfouz is just
> a one-in-a-million fluke.
>
> That Osama bin Laden is known to have been an asset of US foreign policy in no way implies
> he still is. That al Qaeda was active in Kosovo on the same side as NATO merely
> demonstrates that nothing is black and white.
>
> The claims of Michael Springman, State Department veteran of the Jeddah visa bureau, that
> the CIA ran the office and issued visas to al Qaeda members to receive training in the
> United States, are merely sour grapes because he was fired for making such wild
> accusations.
>
> That so many in the Bush White House had expressed the need for a "new Pearl Harbor"
> before their militarist ambitions could be fulfilled means nothing more than being in the
> right place at the right time.
>
> That in May of 2001, Dick Cheney took upon himself the job of co-ordinating a response to
> domestic terror attacks even as he was crafting the administration’s energy policy,
> circumventing the established infrastructure and ignoring the recommendations of the
> Hart-Rudman report, merely shows the VP to be a “can do” sort of guy.
>
> That the standing order for shooting down hijacked aircraft was altered on June 1, 2001,
> taking discretion away from field commanders and placing it solely in the hands of the
> Secretary of Defense, is simply poor planning and unfortunate timing. Fortunately the
> error has been corrected, since the order was reversed shortly after 9/11.
>
> That Dave Frasca of the FBI’s Radical Fundamentalist Unit received a promotion after
> quashing multiple, urgent requests for investigations into al Qaeda assets training at
> flight schools in the summer of 2001 does appear odd, but I’m sure there must have been a
> good reason for it.
>
> That over the summer of 2001 Washington received many urgent, senior-level warnings from
> foreign intelligence agencies of impending terror attacks using hijacked aircraft and did
> nothing, demonstrates the pressing need for a new Intelligence Czar.
>
> That former lead counsel for the House David Schippers says he’d taken to John Ashcroft’s
> office specific warnings he’d learned from FBI agents in New York of an impending attack –
> even naming the proposed dates, names of the hijackers and the targets – and that the
> investigations had been stymied and the agents threatened, proves nothing but David
> Schipper’s need for attention.
>
> That George Bush had plans to invade Afghanistan on his desk before 9/11 demonstrates only
> the value of being prepared.
>
> The suggestion that securing a pipeline across Afghanistan figured into the White House’s
> calculations is as ludicrous as the assertion that oil played a part in determining war in
> Iraq.
>
> That Afghanistan is once again the world’s principal heroin producer is an unfortunate
> reality, but to claim the CIA is still actively involved in the narcotics trade is to
> presume bad faith on the part of the agency.
>
> Mahmood Ahmed, chief of Pakistan’s ISI, must not have authorized an al Qaeda payment of
> $100,000 to Mohammed Atta days before the attacks, and was not meeting with senior
> Washington officials over the week of 9/11, because I didn’t read anything about it in the
> official report.
>
> George HW Bush and Dick Cheney spent the evening of September 10 in the Oval Office, it’s
> true, but they were just old colleagues catching up.
>
> That FEMA arrived in New York on Sept 10 to prepare for a scheduled biowarfare drill is a
> lucky twist of fate.
>
> Newsweek’s report that senior Pentagon officials cancelled flights on Sept 10 for the
> following day on account of security concerns is only newsworthy because of what happened
> the following morning.
>
> That Mohamed Atta attended the International Officer's School at Maxwell Air Force Base,
> that Abdulaziz Alomari attended Brooks Air Force Base Aerospace Medical School, that Saeed
> Alghamdi attended the Defense Language Institute in Monterey merely shows it’s a small
> world, after all.
>
> That Mohammed Atta dressed like a Mafioso, had a stripper girlfriend, smuggled drugs, was
> already a licensed pilot when he entered the US, enjoyed pork chops, drank to excess and
> did cocaine, was closer to Europeans than Arabs in Florida, and included the names of
> defence contractors on his email list, proves how dangerous the radical fundamentalist
> Muslim can be.
>
> That 43 lbs of heroin was found on board the Lear Jet owned by Wally Hilliard, the owner
> of Atta’s flight school, just three weeks after Atta enrolled – the biggest seizure ever
> in Central Florida – was just one of those things.
>
> That Hilliard’s plane had made 30-round trips to Venezuela with the same passengers who
> always paid cash, that the plane had been supplied by a pair of drug smugglers who had
> also outfitted CIA drug runner Barry Seal, and that 9/11 commissioner Richard ben-Veniste
> had been Seal’s attorney before Seal’s murder, shows nothing but the lengths to which
> conspiracists will go to draw sinister conclusions.
>
> Reports of insider trading on 9/11 are false, because the SEC investigated and found only
> respectable investors who will remain nameless involved, and no terrorists, so any
> profit-taking was merely coincidental.
>
> That Hani Hanjour, the pilot of Flight 77, was so incompetent he could not fly a Cessna in
> August, but in September managed to fly a 767 at excessive speed into a spiraling,
> 270-degree descent and a level impact of the first floor of the Pentagon, on the only side
> that was virtually empty and had been hardened to withstand a terrorist attack, merely
> demonstrates that people can do almost anything once they set their minds to it.
>
> That Mohammed Atta left a uniform, a will, his driver's license and a video "how to fly
> planes" in his rental car at the airport means he had other things on his mind.
>
> The very mention of Israelis with links to military-intelligence having been arrested on
> Sept 11 videotaping and celebrating the attacks, and of a warning of impending attacks
> delivered to the Israeli company Odigo two hours before the first plane hit, is the vilest
> kind of anti-Semitism and should not be dignified with a response. That the stories were
> also reported in the Israeli media is a sad display of self-hatred among certain elements
> of the Jewish Left.
>
> That multiple military wargames and simulations were underway the morning of 9/11 – one
> simulating the crash of a plane into a building; another, a life-fly simulation of
> multiple hijackings – and took many interceptors away from the eastern seaboard and
> confused field commanders as to which was a real hijacked aircraft and which was a hoax,
> was a tragic coincidence, but no less a coincidence.
>
> That the National Military Command Center ops director asked a newly-qualified substitute
> to stand his watch at 8:30 am on Sept. 11 is nothing more than bad timing.
>
> That the black boxes were either never found or were unrecoverable was a first for these
> particular boxes, but there's a first time for everything.
>
> That a recording made Sept 11 of air traffic controllers’ detailing the events of the day,
> was destroyed by an FAA official who crushed it in his hand, cut the tape into little
> pieces and dropped them in different trash cans around the building, is just one of those
> things.
>
> That the FBI knew precisely which Florida flight schools to descend upon hours after the
> attacks should make every American safer to know their federal agents are on the ball.
>
> Le Figaro’s report in October 2001, known to have originated with French intelligence,
> that two CIA agents met Osama bin Laden in a Dubai hospital in July 2001, proves again the
> perfidy of the French.
>
> That the tape in which bin Laden claims responsibility for the attacks was released by the
> State Department after having been found providentially by US forces in Afghanistan, and
> depicts a fattened Osama with a broader face and a flatter nose, proves Osama masterminded
> 9/11.
>
> That the anthrax was mailed to perceived liberal media and the Democratic leadership
> demonstrates only the perversity of the terrorist psyche.