Possible bug in SstWsdlTypes

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Possible bug in SstWsdlTypes

Postby Sam De Block » Mon Nov 13, 2006 12:21 am

There is something wrong with the schemaAt: method of SstWsdlTypes, when a soap request is being processed it's parameter type information is retrieved through the SstWsdlTypes class. A namespace uri and a typename are given so the correct smalltalk class can be instantiated.
However the supplied example files have incorrect xml, when corrected the examples stop working.

In the Insurance Policy example of SST Web Services

file 1: SstWSInsurancePolicyInterface.xsd
Code: Select all
<xsd:schema targetNamespace="http://www.SstWSInsurancePolicyInterface.com/SstWSInsurancePolicyInterface"      xmlns:tns="http://www.SstWSInsurancePolicyInterface.com/SstWSInsurancePolicyInterface"

file 2: SstWSInsurancePolicyInterface-interface.wsdl
Code: Select all

   <types>
      <xsd:schema targetNamespace="http://www.SstWSInsurancePolicyInterface.com/SstWSInsurancePolicyInterface"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
         <xsd:import namespace="http://www.SstWSInsurancePolicyInterface.com/SstWSInsurancePolicyInterface"
            schemaLocation="http://vasthost:63001/SstWSInsurancePolicyInterface.xsd" />
      </xsd:schema>


However, the xsd:import in file 2 violates the following import constraint:
http://www.w3.org/TR/xmlschema-1/#composition-schemaImport wrote:1 The appropriate case among the following must be true:
1.1 If the namespace [attribute] is present, then its ·actual value· must not match the ·actual value· of the enclosing <schema>'s targetNamespace [attribute].


When changing the targetNamespace of the import OR changing the namespace of document 1, the required type isn't found because the schemaAt: method returns NIL.

At the moment we have fixed this temporarily so that the schemaAt: method also looks through its imported schemas to find the correct schema.
We used the same fix in
SstWSXmlObjectCache>>schemaNamed: aName
Sam De Block
 
Posts: 17
Joined: Thu Nov 09, 2006 4:25 am

Possible bug in SstWsdlTypes

Postby solveig » Wed Nov 15, 2006 3:28 pm

Sam:

The http://www.w3.org source you mention is a recommendation rather than a standard. Smalltalk generates well-formed XML files, but it does guarantee valid XML.

Web Services development conforms to the recommendations in http://www.w3.org/TR/xmlschema-0/ .

Do you have a test case that illustrates the need for your changes to
SstWsdlTypes>>schemaAt: and
SstWSXmlObjectCache>>schemaNamed:

Please send it along with your changes.

Regards,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby Sam De Block » Wed Nov 15, 2006 10:45 pm

Well, I did say 'possible' bug ;)
It's not really a problem on smalltalk side but when we try to 'consume' wsdl with websphere it gives an error while parsing, saying the wsdl violates the import constraint.
According to
http://groups.google.be/group/comp.text.xml/browse_frm/thread/26dad6162cdd210e/cdec39361d2b2083
it could also be a java parser related problem.

Anyway the 'fix' we are using for now:
Code: Select all
schemaAt: aString

   ^self primSchemas
      at: aString
      ifAbsent: [
         self primSchemas values do: [:primSchema |
            primSchema imports do: [:schemaImport |
               (schemaImport namespace = aString) ifTrue: [^schemaImport schema]]].   
                  AbtXmlObjectCache current schemaNamed: aString
               ].
Sam De Block
 
Posts: 17
Joined: Thu Nov 09, 2006 4:25 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest