Loading ...
Sorry, an error occurred while loading the content.

attributeGroup Bug

Expand Messages
  • Dan
    Hi all, Im having a problem with some header generation wsdl2h.exe has an exception when running on a wsdl file I have created. I can get it to stop, I have
    Message 1 of 1 , Apr 13, 2004
    • 0 Attachment
      Hi all,
      Im having a problem with some header generation

      wsdl2h.exe has an exception when running on a wsdl file I have
      created. I can get it to stop, I have narrowed it down (after much
      time) to What I believe is attributeGroup.

      Let me explain the situation.

      I have a wsdl file that calls a schema to obtain the element `Rail'.
      Element rail consists of an element, and has some attributes defined
      by the Attribute Group `serviceAttribGroup'.

      I believe this is a bug with wsdl2h, in any case wsdl2h should
      probably handle this exception, or output some useful information for
      solving the problem.

      I am using gsoap 2.6, doc/lit.

      Wsdl2h can compile it successfully if the referencing line is
      commented out or removed. This indicates that gsoap isn't having a
      problem with the declaration of the attribute group, just
      instantiation.

      The relevant information is included below

      Thankyou very much for your help,

      Regards,
      Daniel Aitken


      -!*************************************!-
      Error Message
      -!*************************************!-

      wsdl2h.exe - Application Error

      The instruction at "0x00427f43" referenced memory at "0x5d8bfffe".
      The memory could not be "read".

      Click on OK to terminate the program.......

      -!*************************************!-
      wsdl file: serviceScheduleSoap.wsdl
      -!*************************************!-
      <?xml version="1.0" encoding="utf-8"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:tns="icgtransport.vizirail"
      xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xmlres="icgtransport.vizirail.res"
      xmlns:xmlsched="icgtransport.vizirail.sched"
      xmlns:schemas="icgtransport.vizirail.schemas"
      targetNamespace="icgtransport.vizirail">
      <wsdl:types>
      <xs:schema elementFormDefault="qualified"
      attributeFormDefault="unqualified"
      targetNamespace="icgtransport.vizirail">
      <xs:import
      namespace="icgtransport.vizirail.sched"
      schemaLocation="Schedule.xsd"/>
      </xs:schema>
      </wsdl:types>
      <message name="railSoapIn">
      <part name="parameters" element="xmlsched:Rail"/>
      </message>
      <message name="railSoapOut">
      <part name="parameters" type="xs:string"/>
      </message>
      <portType name="serviceScheduleSoap">
      <operation name="RailSched">
      <input message="tns:railSoapIn"/>
      <output message="tns:railSoapOut"/>
      </operation>
      </portType>
      <binding name="serviceScheduleSoap"
      type="tns:serviceScheduleSoap">
      <soap:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="RailSched">
      <soap:operation
      soapAction="icgtransport.vizirail.railaction"/>
      <input>
      <soap:body use="literal"/>
      </input>
      <output>
      <soap:body use="literal"/>
      </output>
      </operation>
      </binding>
      <service name="serviceSchedule">
      <port name="serviceScheduleSoap"
      binding="tns:serviceScheduleSoap">
      <soap:address
      location="http://localhost:81/Services/Schedule.asmx"/>
      </port>
      </service>
      </wsdl:definitions>

      -!*************************************!-
      schema file: Schedule.xsd
      -!*************************************!-

      <?xml version="1.0" encoding="utf-8"?>
      <xs:schema targetNamespace="icgtransport.vizirail.sched"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:xmlsched="icgtransport.vizirail.sched"
      elementFormDefault="unqualified" attributeFormDefault="qualified">
      <xs:element name="Rail">
      <xs:complexType>
      <xs:choice>
      <xs:element name="ServiceSchedule"
      type="xmlsched:ServiceType" maxOccurs="unbounded"/>
      </xs:choice>
      <xs:attribute name="Id" type="xs:integer"
      use="required"/>
      </xs:complexType>
      </xs:element>
      <xs:complexType name="ServiceType">
      <xs:sequence>
      <xs:element name="ActualMovements"
      type="xs:string" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="Origin" type="xs:string"
      use="required"/>
      <xs:attributeGroup ref="xmlsched:serviceAttribGroup"/>
      <!-- the following xml tag must be commented out for
      wsdl2h to run
      correctly. However this obviously means that the
      attributes dont load -->
      </xs:complexType>
      <!-- ************************** -->
      <xs:attributeGroup name="serviceAttribGroup">
      <xs:attribute name="Id" type="xs:integer"
      use="required"/>
      <xs:attribute name="ServiceId" use="required">
      <xs:simpleType>
      <xs:restriction base="xs:string">
      <xs:maxLength value="6"/>
      </xs:restriction>
      </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="ServiceDate" type="xs:date"
      use="required"/>
      <xs:attribute name="TrainNumber" type="xs:string"/>
      </xs:attributeGroup>
      </xs:schema>
    Your message has been successfully submitted and would be delivered to recipients shortly.