Hi all.

I'm using the Java2WSDL tool to generate my WSDL from Java Interfaces. On these interfaces i have my own complex objects defined (beans), and i'm throwing exceptions.

I'm now trying to get it to be WSI conformant, but still have some issues. Started trying with the Java2WSDL utility coming with Axis 1.1, move to the 1.2beta, and right now i'm using a nightly build from yesterday (23rd august). Good progress on the way (especially with array definition inside the xml schema) :)

So current issues (i'm giving you all the failure messages given by the wsi-test-tools toolkit):

* first issue: imports inside schema definition

Assertion: WSI2102
Result: failed
Failure Message: An XML schema import element references something other than an XML schema definition: the referenced element does not have "schema" from XML namespace "http://www.w3.org/2001/XMLSchema"; as root element.
Failure Detail Message


http://glite.org/wsdl/services/org.glite.data.catalog

Element Location:
  lineNumber=5

This is triggered by this:
<schema targetNamespace="http://glite.org/wsdl/services/org.glite.data.catalog.service.meta"; xmlns="http://www.w3.org/2001/XMLSchema";>
<import namespace="http://glite.org/wsdl/services/org.glite.data.catalog"/>


It passes this test fine if i comment out this part, and i guess it would even work.

* second issue: something with string

Assertion: WSI2417
Result: failed
Failure Message: A QName reference that is referring to a schema component, uses a namespace not defined in the targetNamespace attribute on the xs:schema element, or in the namespace attribute on an xs:import element within the xs:schema element.
Failure Detail Message


{http://schemas.xmlsoap.org/soap/encoding/}string

Element Location:
  lineNumber=2

I'm pretty much lost here... Don't have a clue why this comes up!

* third issue: Soap Binding Fault

Assertion: WSI2113
Result: failed
Failure Message: The soapbind:header, soapbind:headerfault or soapbind:fault elements refer to wsd:part element(s) that are not defined using only the "element" attribute.
Failure Detail Message


{http://glite.org/wsdl/services/org.glite.data.catalog.service.meta}AttributeMetadataCatalogSoapBinding:fault

Element Location:
  lineNumber=276


I'm not sure also why this fails... The way it goes in the WSDL is the following:


- a complexType is defined for the exception (currently the Java Exception has nothing inside, so this type is empty also). Some exceptions extend the base exception.

   <complexType name="CatalogException">
    <sequence/>
   </complexType>
   <complexType name="AuthorizationException">
    <complexContent>
     <extension base="tns1:CatalogException">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>

- each operation has a wsdl:fault throwing an exception:

      <wsdl:operation name="remove" parameterOrder="entryid">

         <wsdl:input message="impl:removeRequest" name="removeRequest"/>

         <wsdl:output message="impl:removeResponse" name="removeResponse"/>

<wsdl:fault message="impl:CatalogException" name="CatalogException"/>

      </wsdl:operation>

- and in the binding:

         <wsdl:fault name="CatalogException">

            <wsdlsoap:fault name="CatalogException" use="literal"/>

         </wsdl:fault>


I guess i can have a complexType as a fault, so i don't understand this "only the element attribute" error.



I hope i can get some help in here... By the way, if anyone is interested i have written an ant task that uses the wsi-test-tools stuff to validate the wsdl that is generated. It also gives some nice html reports. I guess it could be interesting to make this WSI conformance test part of the Java2WSDL generation.


Thanks in advance,
  Ricardo Rocha

Reply via email to