Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #388 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

unresolved attribute type (NMTOKEN)

Reported by: user Assigned to: nahi
Priority: normal Milestone: 1.5.8
Component: wsdl4r Version: 1.5
Keywords: wsdl2ruby Cc:

Description

I installed soap4r-1.5.7 and have had trouble with simple custom attribute types when trying to run wsdl2ruby.rb against a WSDL from THINK Subscription Services.

The attachment is 544KB, so I can't upload it, but I will email it to anyone interested. Drop me a line: cranigus at gmail.

Run: wsdl2ruby.rb --wsdl SLWebSvc.wsdl --type client --force

Errors I'm seeing:

unresolved attribute type {http://Think/XmlWebServices/}transfer_role_enum for {}transfer_role unresolved attribute type {http://Think/XmlWebServices/}ZZBoolean for {}send_back_issues

ZZBoolean seems to generate the most errors; it's used in many places in the WSDL file.

It's defined as:

<xsd:simpleType name="ZZBoolean">

<xsd:restriction base="xsd:NMTOKEN">

<xsd:enumeration value="yes"/> <xsd:enumeration value="no"/>

</xsd:restriction>

</xsd:simpleType>

It is typically used thus:

<xsd:attribute name="send_back_issues" type="s0:ZZBoolean" use="optional" default="yes"/>

Attachments

SLWebSvc.zip (35.1 kB) - added by user on 07/20/07 08:09:26.
THINK Web Services WSDL File

Change History

07/20/07 08:09:26 changed by user

  • attachment SLWebSvc.zip added.

THINK Web Services WSDL File

07/20/07 08:11:16 changed by user

Don't know why I didn't think of zipping the file before. WSDL attached now.

07/20/07 10:30:20 changed by nahi

  • summary changed from unresolved attribute type to unresolved attribute type (NMTOKEN).
  • component changed from soap4r to wsdl4r.
  • milestone changed from undefined to 1.5.8.

I'll try to implement NMTOKEN. (#340)

07/21/07 01:00:56 changed by user

That's great, thank you! If you gave me a rough background of what needed to be done, I might be able to help out. I'm not familiar with NMTOKEN in XML, and I'm really not familiar with the code inside wsdl2ruby.rb.

07/21/07 13:41:03 changed by nahi

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

I implemented NMTOKEN support and fixed #340. I've tried to parse the WSDL but it still warns about <xsd:attributeGroup> and <xsd:anyAttribute>, which are not yet supported. I filed #389 and #390.

There's a chance you don't need these definitions I think, would you please try to use the svn version of soap4r? And feel free to reopen this ticket (or open a new ticket) when you find any trouble with this.