You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Graham Matthews <gr...@orangedogsoftware.com> on 2007/06/08 06:34:03 UTC

Axis -- strange skipping of elements

Hi

[I am running all this under the latest version of WTP, WTP 2.0, in  
Eclipse, with Tomcat 5.5 as my app server. As a result I am not 100%  
sure what version of Axis is being used, but I would guess its 1.3 or  
1.4.]

[also apologies, I think I sent this to the Axis dev list by mistake  
-- my bad]

I have the WSDL at the bottom of the file.

You will see that in the wsdl:types section there is the following

	<xs:import namespace="http://www.w3.org/2005/sparql-results#"
	      schemaLocation="http://www.w3.org/TR/rdf-sparql-XMLres/ 
result2.xsd" />

If you look at the result2.xsd file you will see a definition

   <xs:element name="sparql">
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="res:head"/>
         <xs:choice>
           <xs:element ref="res:results"/>
		....

and

<xs:element name="results">
     <xs:complexType>
       <xs:sequence>
         <xs:element minOccurs="0" maxOccurs="unbounded"  
ref="res:result"/>
       </xs:sequence>
       <xs:attributeGroup ref="res:ordered"/>
       <xs:attributeGroup ref="res:distinct"/>
     </xs:complexType>
   </xs:element>

and

  <xs:element name="result">
     <xs:complexType>
       <xs:sequence>
         <xs:element minOccurs="0" maxOccurs="unbounded"  
ref="res:binding"/>
       </xs:sequence>
       <xs:attribute name="index" type="xs:positiveInteger"/>
     </xs:complexType>
   </xs:element>

When I look at the Java files that this generates I get confused.   
The Java code for the element "sparql" is

public class Sparql  implements java.io.Serializable {
     private org.w3.www._2005.sparql_results.Head head;

     private org.w3.www._2005.sparql_results.Binding[][] results;

     private java.lang.Boolean _boolean;

     public Sparql() {
     }

I am wondering what happened to the "results" element? It seems to  
have been totally skipped ....

Is this an AXIS bug, or am I just failing to understand something here?

thanks
graham



------- WSDL -----

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
      targetNamespace="http://www.w3.org/2005/08/sparql-protocol- 
query/#"
      xmlns:tns="http://www.w3.org/2005/08/sparql-protocol-query/#"

      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

      xmlns:st="http://www.w3.org/2005/09/sparql-protocol-types/#"

      xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"

      xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <wsdl:types>
     <xs:schema targetNamespace="http://www.w3.org/2005/08/sparql- 
protocol-query/#">
       <xs:import namespace="http://www.w3.org/2005/09/sparql- 
protocol-types/#"
                  schemaLocation="http://www.w3.org/2001/sw/ 
DataAccess/proto-wd/sparql-protocol-types.xsd" />
	</xs:schema>
   </wsdl:types>

   <wsdl:message name="queryRequest">
     <wsdl:part name="query" element="st:query-request"/>
   </wsdl:message>

   <wsdl:message name="queryResponse">
     <wsdl:part name="response" element="st:query-result"/>
   </wsdl:message>

   <wsdl:message name="malformedQueryFault">
       <wsdl:part name="malformedQueryFaultPart"  
element="st:malformed-query"/>
   </wsdl:message>

   <wsdl:message name="queryRequestRefusedFault">
       <wsdl:part name="queryRequestRefusedFaultPart"  
element="st:query-request-refused"/>
   </wsdl:message>

   <wsdl:portType name="SparqlQueryInterface">
     <wsdl:operation name="query">
       <wsdl:input  message="tns:queryRequest"/>
       <wsdl:output message="tns:queryResponse"/>
       <wsdl:fault  message="tns:malformedQueryFault"   
name="malformedQueryFault" />
       <wsdl:fault  message="tns:queryRequestRefusedFault"  
name="queryRequestRefusedFault" />
     </wsdl:operation>
   </wsdl:portType>

   <wsdl:service name="SDSSparqlEndpointService">
     <wsdl:port name="SDSSparqlEndpointPort"  
binding="tns:QuerySoapBinding">
       <soap:address location="http://localhost:18181/ 
SDSSparqlEndpointService/SDSSparqlEndpointPort"/>
     </wsdl:port>
   </wsdl:service>

   <wsdl:binding name="QuerySoapBinding"  
type="tns:SparqlQueryInterface">
     <soap:binding style="document" transport="http:// 
schemas.xmlsoap.org/soap/http"/>
     <wsdl:operation name="query">
     <soap:operation style="document" />
       <wsdl:input>
         <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
         <soap:body use="literal"/>
       </wsdl:output>
       <wsdl:fault name="malformedQueryFault">
         <soap:fault name="malformedQueryFault" use="literal"/>
       </wsdl:fault>
       <wsdl:fault name="queryRequestRefusedFault">
         <soap:fault name="queryRequestRefusedFault" use="literal"/>
       </wsdl:fault>
     </wsdl:operation>
   </wsdl:binding>
</wsdl:definitions>
--------