SOAP Envelope Error

soap4r is generating this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin"
Content-Type: text/xml; charset=utf-8
Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
Content-Length: 437
Host: web001whp001:3250

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Body>
    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/">
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>
  </env:Body>
</env:Envelope>

My service expects this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
Host: web001whp001
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning">
      <username>string</username>
      <password>string</password>
    </IsValidLogin>
  </soap:Body>
</soap:Envelope>

What am I doing wrong?

class Test
   def initialize()
     @driver = Driver.new(URL,NS)
     @driver.wiredump_dev = STDOUT
     @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
PASSWORD]
     @driver.default_encodingstyle =
SOAP::EncodingStyle::ASPDotNetHandler::Namespace

@driver.add_method_with_soapaction('IsValidLogin',SOAP_ACTION,'username','password')
     puts @driver.IsValidLogin("Username","Password")
   end
end

- Mark

···

Date: Wed Sep 20 13:44:12 -0400 2006

You are doing nothing wrong. Both xmls are the same according to SOAP spec.

···

On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:

soap4r is generating this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
Content-Type: text/xml; charset=utf-8
Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
Date: Wed Sep 20 13:44:12 -0400 2006
Content-Length: 437
Host: web001whp001:3250

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
    xmlns:env="Error;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <env:Body>
    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>
  </env:Body>
</env:Envelope>

My service expects this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
Host: web001whp001
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
xmlns:soap="Error;
  <soap:Body>
    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>
  </soap:Body>
</soap:Envelope>

What am I doing wrong?

--
Kent
---

Mark A. Richman wrote:

soap4r is generating this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
Content-Type: text/xml; charset=utf-8
Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
Date: Wed Sep 20 13:44:12 -0400 2006
Content-Length: 437
Host: web001whp001:3250

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
    xmlns:env="Error;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <env:Body>
    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>
  </env:Body>
</env:Envelope>

My service expects this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
Host: web001whp001
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
xmlns:soap="Error;
  <soap:Body>
    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>
  </soap:Body>
</soap:Envelope>

What am I doing wrong?

class Test
   def initialize()
     @driver = Driver.new(URL,NS)
     @driver.wiredump_dev = STDOUT
     @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
PASSWORD]
     @driver.default_encodingstyle =
SOAP::EncodingStyle::ASPDotNetHandler::Namespace

@driver.add_method_with_soapaction('IsValidLogin',SOAP_ACTION,'username','password')
     puts @driver.IsValidLogin("Username","Password")
   end
end

- Mark

I had the same exact problem with one of our data providers, and found no way to make it work with
soap4r nor JOpera (a java based service orchestrator) nor some other java wsdl tools tried.
So from strict xml point of view this wsdls are equivalent, but most non-windoze wsdl parsers choke on it.
Luckily our provider was considering migrating to Java+Axis, and this "feature" of .NET convinced them,
so this became a non-issue for me.

Werner Bohl

Kent Sibilev wrote:

soap4r is generating this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
Content-Type: text/xml; charset=utf-8
Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
Date: Wed Sep 20 13:44:12 -0400 2006
Content-Length: 437
Host: web001whp001:3250

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
    xmlns:env="Error;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <env:Body>
    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>
  </env:Body>
</env:Envelope>

My service expects this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
Host: web001whp001
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
xmlns:soap="Error;
  <soap:Body>
    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>
  </soap:Body>
</soap:Envelope>

What am I doing wrong?

You are doing nothing wrong. Both xmls are the same according to SOAP spec.

Are you sure the problem is with the envelope itself. I had a problem talking to .net webservices but the problem was with namespace tags being applied were they shouldn't. Your examples above show similar differences.

    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>

    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>

···

On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:

I figured out that 90% of my problem was a trailing slash in my
namespace! I get a valid response from ASP.NET now.

However, my final question is how to convert my result into a boolean.
I get this object as a result now: #<SOAP::Mapping::Object:0x3ddd1d4>

Here's my code:

require 'soap/rpc/driver'
include SOAP::RPC

URL = "http://web001whp001:3250/Wahp.Provisioning/User.asmx&quot;
NS = "http://affinity.com/Wahp/Provisioning&quot;
SOAP_ACTION = "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
USERNAME = "SHARED\\Administrator"
PASSWORD = "$secure$"

class AuthenticationClient
  def initialize()
    @driver = Driver.new(URL,NS,SOAP_ACTION)
    @driver.wiredump_dev = STDOUT
    @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
PASSWORD]

    @driver.add_document_method('IsValidLogin',SOAP_ACTION,
      [XSD::QName.new(NS,'IsValidLogin')],
      [XSD::QName.new(NS,'IsValidLoginResult')])

    result =
@driver.IsValidLogin(:username=>"Username",:password=>"Password")
    end
end

AuthenticationClient.new

And here is my SOAP response:

HTTP/1.1 200 OK
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 383

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.
xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;soap:Body&gt;&lt;IsValidLoginResponse
xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;&lt;IsValidLoginResult&gt;false&lt;/IsValid

</IsValidLoginResponse></soap:Body></soap:Envelope>

Thanks,
Mark

Werner Bohl wrote:

···

Date: Thu, 21 Sep 2006 14:41:58 GMT

Mark A. Richman wrote:
> soap4r is generating this:
>
> POST /Wahp.Provisioning/User.asmx HTTP/1.1
> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
> Content-Type: text/xml; charset=utf-8
> Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
> User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
> Date: Wed Sep 20 13:44:12 -0400 2006
> Content-Length: 437
> Host: web001whp001:3250
>
> <?xml version="1.0" encoding="utf-8" ?>
> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
> xmlns:env="Error;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
> <env:Body>
> <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
> <n1:username>Username</n1:username>
> <n1:password>Password</n1:password>
> </n1:IsValidLogin>
> </env:Body>
> </env:Envelope>
>
> My service expects this:
>
> POST /Wahp.Provisioning/User.asmx HTTP/1.1
> Host: web001whp001
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
> xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
> xmlns:soap="Error;
> <soap:Body>
> <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
> <username>string</username>
> <password>string</password>
> </IsValidLogin>
> </soap:Body>
> </soap:Envelope>
>
> What am I doing wrong?
>
> class Test
> def initialize()
> @driver = Driver.new(URL,NS)
> @driver.wiredump_dev = STDOUT
> @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
> PASSWORD]
> @driver.default_encodingstyle =
> SOAP::EncodingStyle::ASPDotNetHandler::Namespace
>
> @driver.add_method_with_soapaction('IsValidLogin',SOAP_ACTION,'username','password')
> puts @driver.IsValidLogin("Username","Password")
> end
> end
>
> - Mark
>
>
>
>
I had the same exact problem with one of our data providers, and found
no way to make it work with
soap4r nor JOpera (a java based service orchestrator) nor some other
java wsdl tools tried.
So from strict xml point of view this wsdls are equivalent, but most
non-windoze wsdl parsers choke on it.
Luckily our provider was considering migrating to Java+Axis, and this
"feature" of .NET convinced them,
so this became a non-issue for me.

Werner Bohl

--Boundary_(ID_ixlm4ZaFFHbqrroJILetBA)
Content-Type: text/x-vcard; charset=utf-8
Content-Transfer-Encoding: 7BIT
Content-Disposition: inline;
  filename="wbohl.vcf"
X-Google-AttachSize: 184

begin:vcard
fn:Werner Bohl
n:Bohl;Werner
email;internet:wbohl@racsa.co.cr
tel;work:506-291-1374
tel;home:506-232-0398
tel;cell:506-876-2744
x-mozilla-html:TRUE
version:2.1
end:vcard

--Boundary_(ID_ixlm4ZaFFHbqrroJILetBA)--

But from XML point of view these are identical.

This attribute

xmlns="http://affinity.com/Wahp/Provisioning&quot;

defines a default namespace for the element and all its children that are
without a namespace identifier.

···

On 9/20/06, David Sledge <dsledge@appriss.com> wrote:

Kent Sibilev wrote:
> On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:
>>
>> soap4r is generating this:
>>
>> POST /Wahp.Provisioning/User.asmx HTTP/1.1
>> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
>> Content-Type: text/xml; charset=utf-8
>> Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
>> User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
>> Date: Wed Sep 20 13:44:12 -0400 2006
>> Content-Length: 437
>> Host: web001whp001:3250
>>
>> <?xml version="1.0" encoding="utf-8" ?>
>> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
>> xmlns:env="Error;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
>> <env:Body>
>> <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
>> <n1:username>Username</n1:username>
>> <n1:password>Password</n1:password>
>> </n1:IsValidLogin>
>> </env:Body>
>> </env:Envelope>
>>
>> My service expects this:
>>
>> POST /Wahp.Provisioning/User.asmx HTTP/1.1
>> Host: web001whp001
>> Content-Type: text/xml; charset=utf-8
>> Content-Length: length
>> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
>> xmlns:soap="Error;
>> <soap:Body>
>> <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
>> <username>string</username>
>> <password>string</password>
>> </IsValidLogin>
>> </soap:Body>
>> </soap:Envelope>
>>
>> What am I doing wrong?
>>
>
> You are doing nothing wrong. Both xmls are the same according to SOAP
> spec.
>

Are you sure the problem is with the envelope itself. I had a problem
talking to .net webservices but the problem was with namespace tags
being applied were they shouldn't. Your examples above show similar
differences.

    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>

    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>

--
Kent
---

I tend to agree...I see the ns1 namespace, but also env vs. soap. Any
thoughts on how to make this work with .asmx?

Thanks,
Mark

David Sledge wrote:

···

Kent Sibilev wrote:
> On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:
>>
>> soap4r is generating this:
>>
>> POST /Wahp.Provisioning/User.asmx HTTP/1.1
>> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
>> Content-Type: text/xml; charset=utf-8
>> Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
>> User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
>> Date: Wed Sep 20 13:44:12 -0400 2006
>> Content-Length: 437
>> Host: web001whp001:3250
>>
>> <?xml version="1.0" encoding="utf-8" ?>
>> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
>> xmlns:env="Error;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
>> <env:Body>
>> <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
>> <n1:username>Username</n1:username>
>> <n1:password>Password</n1:password>
>> </n1:IsValidLogin>
>> </env:Body>
>> </env:Envelope>
>>
>> My service expects this:
>>
>> POST /Wahp.Provisioning/User.asmx HTTP/1.1
>> Host: web001whp001
>> Content-Type: text/xml; charset=utf-8
>> Content-Length: length
>> SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
>> xmlns:soap="Error;
>> <soap:Body>
>> <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
>> <username>string</username>
>> <password>string</password>
>> </IsValidLogin>
>> </soap:Body>
>> </soap:Envelope>
>>
>> What am I doing wrong?
>>
>
>
> You are doing nothing wrong. Both xmls are the same according to SOAP
> spec.
>

Are you sure the problem is with the envelope itself. I had a problem
talking to .net webservices but the problem was with namespace tags
being applied were they shouldn't. Your examples above show similar
differences.

    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>

    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>

try object.inspect to see what methods and variables it contains. The answer you're looking for is probably hidden within

Matt

···

On 21-Sep-06, at 11:10 AM, Mark A. Richman wrote:

I figured out that 90% of my problem was a trailing slash in my
namespace! I get a valid response from ASP.NET now.

However, my final question is how to convert my result into a boolean.
I get this object as a result now: #<SOAP::Mapping::Object:0x3ddd1d4>

Here's my code:

require 'soap/rpc/driver'
include SOAP::RPC

URL = "http://web001whp001:3250/Wahp.Provisioning/User.asmx&quot;
NS = "http://affinity.com/Wahp/Provisioning&quot;
SOAP_ACTION = "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
USERNAME = "SHARED\\Administrator"
PASSWORD = "$secure$"

class AuthenticationClient
  def initialize()
    @driver = Driver.new(URL,NS,SOAP_ACTION)
    @driver.wiredump_dev = STDOUT
    @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
PASSWORD]

    @driver.add_document_method('IsValidLogin',SOAP_ACTION,
      [XSD::QName.new(NS,'IsValidLogin')],
      [XSD::QName.new(NS,'IsValidLoginResult')])

    result =
@driver.IsValidLogin(:username=>"Username",:password=>"Password")
    end
end

AuthenticationClient.new

And here is my SOAP response:

HTTP/1.1 200 OK
Date: Thu, 21 Sep 2006 14:41:58 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 383

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.
xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;soap:Body&gt;&lt;IsValidLoginResponse
xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;&lt;IsValidLoginResult&gt;false&lt;/IsValid
></IsValidLoginResponse></soap:Body></soap:Envelope>

Thanks,
Mark

Werner Bohl wrote:

Mark A. Richman wrote:

soap4r is generating this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;
Content-Type: text/xml; charset=utf-8
Authorization: Basic U0hBUkVEXuaXN0cmF0b3I6JZSQ=
User-Agent: SOAP4R/1.5.5 (/114, ruby 1.8.5 (2006-08-25) [i386-mswin32])
Date: Wed Sep 20 13:44:12 -0400 2006
Content-Length: 437
Host: web001whp001:3250

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
    xmlns:env="Error;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <env:Body>
    <n1:IsValidLogin xmlns:n1="http://affinity.com/Wahp/Provisioning/&quot;&gt;
      <n1:username>Username</n1:username>
      <n1:password>Password</n1:password>
    </n1:IsValidLogin>
  </env:Body>
</env:Envelope>

My service expects this:

POST /Wahp.Provisioning/User.asmx HTTP/1.1
Host: web001whp001
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://affinity.com/Wahp/Provisioning/IsValidLogin&quot;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
xmlns:soap="Error;
  <soap:Body>
    <IsValidLogin xmlns="http://affinity.com/Wahp/Provisioning&quot;&gt;
      <username>string</username>
      <password>string</password>
    </IsValidLogin>
  </soap:Body>
</soap:Envelope>

What am I doing wrong?

class Test
   def initialize()
     @driver = Driver.new(URL,NS)
     @driver.wiredump_dev = STDOUT
     @driver.options["protocol.http.basic_auth"] << [URL, USERNAME,
PASSWORD]
     @driver.default_encodingstyle =
SOAP::EncodingStyle::ASPDotNetHandler::Namespace

@driver.add_method_with_soapaction('IsValidLogin',SOAP_ACTION,'username','password')
     puts @driver.IsValidLogin("Username","Password")
   end
end

- Mark

I had the same exact problem with one of our data providers, and found
no way to make it work with
soap4r nor JOpera (a java based service orchestrator) nor some other
java wsdl tools tried.
So from strict xml point of view this wsdls are equivalent, but most
non-windoze wsdl parsers choke on it.
Luckily our provider was considering migrating to Java+Axis, and this
"feature" of .NET convinced them,
so this became a non-issue for me.

Werner Bohl

--Boundary_(ID_ixlm4ZaFFHbqrroJILetBA)
Content-Type: text/x-vcard; charset=utf-8
Content-Transfer-Encoding: 7BIT
Content-Disposition: inline;
  filename="wbohl.vcf"
X-Google-AttachSize: 184

begin:vcard
fn:Werner Bohl
n:Bohl;Werner
email;internet:wbohl@racsa.co.cr
tel;work:506-291-1374
tel;home:506-232-0398
tel;cell:506-876-2744
x-mozilla-html:TRUE
version:2.1
end:vcard

--Boundary_(ID_ixlm4ZaFFHbqrroJILetBA)--

Hi,

Sorry for late reply.

Mark A. Richman wrote:

I figured out that 90% of my problem was a trailing slash in my
namespace! I get a valid response from ASP.NET now.

However, my final question is how to convert my result into a boolean.
I get this object as a result now: #<SOAP::Mapping::Object:0x3ddd1d4>

Did you solve this problem? You need to define your custom mapping
registry for it. Or use 'result.isValidLoginResult == "true"' instead
of it.

Regards,
// NaHi

'env' and 'soap' are just markers or identifiers of a namespace. Their
actual names do not matter, what matters is URI they point to. Please, refer
to the spec: Namespaces in XML 1.0 (Third Edition)

I don't know what kind of problem you are having with .Net.

···

On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:

I tend to agree...I see the ns1 namespace, but also env vs. soap. Any
thoughts on how to make this work with .asmx?

Thanks,
Mark

--
Kent
---

Kent Sibilev wrote:

···

On 9/20/06, Mark A. Richman <markarichman@gmail.com> wrote:

I tend to agree...I see the ns1 namespace, but also env vs. soap. Any
thoughts on how to make this work with .asmx?

Thanks,
Mark

'env' and 'soap' are just markers or identifiers of a namespace. Their
actual names do not matter, what matters is URI they point to. Please, refer
to the spec: Namespaces in XML 1.0 (Third Edition)

I don't know what kind of problem you are having with .Net.

What does the WSDL look like?