Google Groups Home
Help | Sign in
difference between wsdl2ruby and runtime generated driver
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
ls  
View profile
 More options Jul 10, 2:58 pm
From: ls <lis...@listening-station.net>
Date: Thu, 10 Jul 2008 11:58:55 -0700 (PDT)
Local: Thurs, Jul 10 2008 2:58 pm
Subject: difference between wsdl2ruby and runtime generated driver
hi,

i generated a driver from a wsdl at runtime using:

driver =
SOAP::WSDLDriverFactory.new("test_service.wsdl").create_rpc_driver

that works correctly - generating the following soap request:

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <n1:TestService xmlns:n1="test">
      <n1:strName>Smith</n1:strName>
      <n1:strCounty>Jefferson</n1:strCounty>
    </n1:TestService>
  </env:Body>
</env:Envelope>

when i generate a driver using wsdl2ruby like so:

wsdl2ruby.rb --wsdl test_service.wsdl --type client

the soap request looks like:

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Body>
    <n1:TestService xmlns:n1="test">
      <strName>Smyth</strName>
      <strCounty>Jefferson</strCounty>
    </n1:TestService>
  </env:Body>
</env:Envelope>

the difference is that the "strName" and "strCount" elements in the
request body do not have the "n1" namespace.

which results in the soap server not recognize the strName/strCount
parameters in the request.

the fragment of the wsdl for the request looks like this:

      <s:element name="test">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="strKeyword"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="strName"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="strCounty"
type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="strYear"
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

per my client's request, i cannot include the actual wsdl.

is there a way to force wsdl2ruby to generate the required namespace?

thanks!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ls  
View profile
 More options Jul 10, 3:06 pm
From: ls <lis...@listening-station.net>
Date: Thu, 10 Jul 2008 12:06:08 -0700 (PDT)
Local: Thurs, Jul 10 2008 3:06 pm
Subject: Re: difference between wsdl2ruby and runtime generated driver
ugh - i shouldn't have been so quick to post.

setting:

driver.use_default_namespace = true

fixes the problem.

On Jul 10, 12:58 pm, ls <lis...@listening-station.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google