Menu

#224 WSDL Cataloging bug

open
nobody
None
5
2007-08-30
2007-08-30
aviandri
No

Hi,

I am trying to submit WSDL documents (as WSDL objectType) to omar to test the build in WSDL cataloging and validation process.

I try using 10 WSDL documents from omar sample :
1.CatalogingServices.wsdl
2.CMSBindings.wsdl
3.CMSInterfaces.wsdl
4.ebXMLRegistryBindings.wsdl
5.ebXMLRegistryInterfaces.wsdl
6.ebXMLRegistryServices.wsdl
7.NotificationListenerBindings.wsdl
8.NotificationListenerInterfaces.wsdl
9.NotificationListenerServices.wsdl
10.ValidationServices.wsdl

From the 10 document I published, only 2 documents successfully published, cataloged and validated (CMSInterfaces.wsdl,ebXMLRegistryInterfaces.wsdl)

For the other eight document, i got the same exception.

I attached the exception message.

Discussion

  • aviandri

    aviandri - 2007-08-30

    Exception message of WSDL publishing

     
  • Andreas Veithen

    Andreas Veithen - 2007-09-11

    Logged In: YES
    user_id=423887
    Originator: NO

    Actually in version 3.1, none of the 10 WSDL documents is processed successfully. The reason for the failure of the 8 WSDL files you had trouble with is that those use WSDL imports with relative locations. For example, in CatalogingServices.wsdl, you can find the following import:

    <import location="CMSBindings.wsdl" namespace="urn:oasis:names:tc:ebxml-regrep:wsdl:cms:bindings:3.0"/>

    Since the location is relative, OMAR is not able to find the imported WSDL and therefore triggers an error. This cannot be considered as a bug since the specs clearly say that "The WSDL cataloging service MUST implicitly process WSDL documents that have been imported within the explicitly submitted WSDL document". (BTW: I'm also struggling with this problem and I'm not happy with this behaviour)

    In OMAR 3.1 the two remaining WSDL files also fail, but for a slightly different reason: Now its not because of a WSDL import but a schema import. For example, CMSInterfaces.wsdl contains the following declaration:

    <types>
    <xsd:schema>
    <xsd:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:cms:3.0" schemaLocation="../schema/cms.xsd"/>
    </xsd:schema>
    </types>

    Apparently OMAR tries to read the schema file but again fails to do so because the location is relative. The situation here is a bit different because it is not clear why OMAR should actually read imported schema files. Probably this is not required and the issue should be considered as a bug, in particular because it is a regression with respect to 3.0.

     
  • Farrukh Najmi

    Farrukh Najmi - 2007-10-03

    Logged In: YES
    user_id=366837
    Originator: NO

    I agree that the current spec behavior for implictly processing imported files is not flexible enough.
    In current code one can workaround the relative import issue by submitting a zip file with the primary WSDL file and all imported files in it in their relative location. This will allow relative files to be processed correctly. For an example of how to do this please see:

    test/org/freebxml/omar/server/profile/ws/wsdl/cataloger/WSDLCatalogerTest.java

    See method testCatalogContentExtrinsicObjectsOneImport().

     
  • aviandri

    aviandri - 2007-10-03

    Logged In: YES
    user_id=1726793
    Originator: YES

    Hi all,

    After all the followups I recognize that the problem occurs because omar can't find the the imported document/wsdl.
    So i try to do some changes to get pass this problem.
    The steps I take is :
    1. Publish a wsdl that doesn't import any other wsdl (exp: with id= urn:oasis:names:tc:ebxml-regrep:wsdl:cms:interfaces:3.0).
    2. Select a wsdl that import the submitted wsdl and change the schemaLocation to point to the location of the submitted wsdl, for this I use RPC Encoding URL.
    (exp: change the schemaLocation with "http://localhost:8080/omar/registry/http/?interface=QueryManager&method=getRegistryObject&param-id=urn:oasis:names:tc:ebxml-regrep:wsdl:cms:interfaces:3.0"). By using the RPC Encoding URL, omar will surely can locate the imported wsdl.
    3. Published the wsdl that have been modified

    Result :
    On the publish of the second wsdl (the altered wsd), i got this error message (part of it)
    javax.xml.transform.TransformerException: The reference to entity "method" must end with the ';' delimiter.
    2007-10-03 23:25:36,590 INFO org.freebxml.omar.server.cms.CanonicalXMLValidationService[http-8443-Processor23] - javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The reference to entity "method" must end with the ';' delimiter.
    2007-10-03 23:25:36,590 ERROR org.freebxml.omar.server.cms.CanonicalXMLValidationService[http-8443-Processor23] - Error in validating xml content
    javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: The reference to entity "method" must end with the ';' delimiter.
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
    at org.freebxml.omar.server.cms.CanonicalXMLValidationService.validateXMLFile(CanonicalXMLValidationService.java:231)

    From the stack trace I am assuming the exception happen on the transformation process in CannonicalXMLValidationService class, when the CannonicalXMLValidationService was going to transform a schematron that will be use to validate the wsdl.

     

Log in to post a comment.

MongoDB Logo MongoDB