Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7575 (closed enhancement: incomplete)

Opened 1 year ago

Last modified 1 year ago

[PATCH] WS-I compliant arrays in WSDL

Reported by: arthur Assigned to: kents
Priority: normal Milestone: 1.x
Component: ActionWebService Version: edge
Severity: normal Keywords: tiny, WS-I, wsdl
Cc:

Description

Hi, I was working with ActionWebService when i noticed it wasn't WS-I compliant in the way it generates WSDL for arrays. So i fixed it. I also changed the tag containing the elements from xsd:all to xsd:sequence. The latter enables you to keep the parameters in order. The former makes it possible to use the WSDL in other WS-I compl. products like axis. Look here for some explanation on how array should be used in WS-I: http://www.ws-i.org/Profiles/BasicProfile-1.1.html#soapenc_Array I have not been able to do much testing but i don't think i has any strange implications.

One thing that might seem a bit strange is creating a new type containing only an array of one type of element. This however is necessary so that the you can return an array without specifying a wrapper type orso.

i'll put the diff with the code change below. This is my first patch, and ticket for that matter, so tell me if i did something wrong :)

Arthur

actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb
219,223c219,223
<                           xm.xsd(:complexContent) do
<                             xm.xsd(:restriction, 'base' => 'soapenc:Array') do
<                               xm.xsd(:attribute, 'ref' => 'soapenc:arrayType',
<                                                  'wsdl:arrayType' => binding.element_binding.qualified_type_name('typens') + '[]')
<                             end
---
>                           xm.xsd(:sequence) do
>                             xm.xsd(:element, 'type' => binding.element_binding.qualified_type_name('typens'),
>                                              'name' => binding.type.name,
>                                              'minOccurs' => '0',
>                                              'maxOccurs' => 'unbounded')
228c228
<                           xm.xsd(:all) do
---
>                           xm.xsd(:sequence) do

Attachments

WS-I_compliant_arrays_in_WSDL.diff (1.8 kB) - added by arthur on 02/16/07 14:25:45.

Change History

02/16/07 13:56:57 changed by arthur

  • type changed from defect to enhancement.

02/16/07 14:19:02 changed by arthur

  • keywords changed from WS-I, wsdl, soap, array to tiny, WS-I, wsdl.

02/16/07 14:25:45 changed by arthur

  • attachment WS-I_compliant_arrays_in_WSDL.diff added.

02/16/07 14:26:23 changed by arthur

I added a patch file.

06/12/07 18:15:51 changed by arthur

  • status changed from new to closed.
  • resolution set to incomplete.

Well, it isn't acctually working since i only fixed the WSDL generator. In time i'll take a look at fixing the actual api too.