Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#39 Problems with circular imports

open
nobody
None
5
2007-08-17
2007-08-17
Ole Lensmar
No

Hi!

I have a .NET 3.0 generated contract as follows:

test.wsdl - imports test2.wsdl and then defines a portType
test2.wsdl - imports test.wsdl and the defines a binding for the portType in test.wsdl..

The following problems arise:
1) getAllXXX methods get caught in an infinite loop since they jump between the definitions endlessly
-> I've fixed this by adding private methods including a set of already handled imports.. (attached..)
2) since the binding is imported / parsed before the portType, it gets an undefined portType and undefined operation for each binding-operation
-> I work around this manually by going through all bindings after reading a definition and checking if their portType is undefined in which case I get the portType from the definition and set it on the binding (if found..). A corresponding check/set has to be done for each binding-operation.

I guess the second issue would apply to any situations where a "forward reference" could be possible, ie portType->message, port->binding, etc.. I don't know what would be the best way to solve this in the code.. If you give me some suggestions I'd be happy to fix this as well..

regards!

/Ole
eviware.com

Discussion

  • Ole Lensmar
    Ole Lensmar
    2007-08-17

    Fixed recursive lookups in getAllXXX methods

     
    Attachments
  • Ole Lensmar
    Ole Lensmar
    2007-08-18

    Fixed forward imports of portTypes, messages, etc..

     
    Attachments
  • Ole Lensmar
    Ole Lensmar
    2007-08-18

    Logged In: YES
    user_id=838515
    Originator: YES

    ok.. I've added a "resolveForwardImports" method to the WSDLReaderImpl which is called before returning the parsed definition, it goes through all possible situations where this could arise and tries to resolve them..

    regards!

    /Ole
    File Added: WSDLReaderImpl.java

     
  • Ole Lensmar
    Ole Lensmar
    2008-01-16

    Fixed NPE with one-way operations

     
    Attachments
  • Ole Lensmar
    Ole Lensmar
    2008-01-16

    Logged In: YES
    user_id=838515
    Originator: YES

    File Added: WSDLWriterImpl.java