Hi Woden Devs,

There seems to be a problem in the schema resolver (SchemaResolverAdapter)
when the jar URL scheme is used. As most of you know Axis2 packs all service
specific files in a .aar file with the WSDL and the associated schema files
in the META-INF directory. The following is an example of this senario and
woden fails to resolve the URI. I tried debugging through this, line 145 of
the SchemaResolverAdapter class resolves the URL as return new
URI(baseUri).resolve(new URI(schemaLocation)); Debugging the scenario below
had the baseUri as
jar:file://file:/opt/apache-tomcat-6.0.10/webapps/axis2/WEB-INF/services/lgws.aar!/META-INF/lgws.wsdl
and schemaLocation as genelist.xsd. But this resolves to /opt/apache-
tomcat-6.0.10/webapps/axis2/WEB-INF/services/genelist.xsd. Is this an issue
with the resolver class when the jar URL scheme is used?

Thanks,
Keith.

---------- Forwarded message ----------
From: Hans-Ulrich Klein <[EMAIL PROTECTED]>
Date: Dec 24, 2007 10:34 PM
Subject: [axis2] wsdl2 and inline schema
To: [EMAIL PROTECTED]


Hi List,

I have some path problems when deploying my service. My attached
wsdl2-File (lgws.wsdl) includes a schema (genelist.xsd). Both are
located in the same local folder. I tried the following:

$  /opt/axis2-SNAPSHOT/bin/wsdl2java.sh -uri src/META-INF/lgws.wsdl -p
de.wwu.imib.lgws.service -d adb -s -ss -sd -wv 2.0 -ns2p
http://imib.uni-muenster.de/lgws/xml=de.wwu.imib.lgws.service.xml

and

$  ant jar.server

This works fine so far. Though, copying the resulting lgws.aar to the
axis2 services folder to deploy it leads to this error message:

Woden[Error],0:0,WSDL521,Could not parse an inline schema in the WSDL at
URL
"jar:file://file:/opt/apache-tomcat-6.0.10
/webapps/axis2/WEB-INF/services/lgws.aar!/META-INF/lgws.wsdl".,
java.lang.RuntimeException:org.apache.ws.commons.schema.XmlSchemaException:

/opt/apache-tomcat-6.0.10/webapps/axis2/WEB-INF/services/genelist.xsd
(No such file or directory)
Woden[Error],0:0,Endpoint-1061,The address 'lgws' specified for this
endpoint is not an absolute IRI. The address must be absolute.
[INFO] Trouble processing wsdl file :null
[INFO] Deploying Web service: lgws.aar -
file:/opt/apache-tomcat-6.0.10/webapps/axis2/WEB-INF/services/lgws.aar

Obviously, the path to the genelist.xsd is wrong. What is the right path
and where can I change it? The xsd-file is packed in the lgws.aar:

$  unzip lgws.aar
...
 inflating: META-INF/genelist.xsd
 inflating: META-INF/lgws.wsdl
 inflating: META-INF/services.xml
...

I spend a whole day for this problem without success :( I tried it with
axis2-1.4 and also with a nightly build.

Thank you very much in advance,
Hans-Ulrich


<schema xmlns="http://www.w3.org/2001/XMLSchema";
       xmlns:lgs="http://imib.uni-muenster.de/lgws/xml";
       targetNamespace="http://imib.uni-muenster.de/lgws/xml";
       elementFormDefault="qualified"
       attributeFormDefault="qualified">

       <element name="genelist" type="lgs:GenelistType"/>

       <complexType name="GenelistType">
       <sequence>
               <element name="id" type="int"/>
               <element name="name" type="string"/>
               <element name="description" type="string"/>
               <element name="pubmed" type="int"/>

               <element name="group" type="lgs:GroupType" minOccurs="1"
maxOccurs="unbounded"/>
               <element name="microarray" type="lgs:MicroarrayType"/>
               <element name="listEntry" type="lgs:ListEntryType"
minOccurs="1" maxOccurs="unbounded"/>
       </sequence>
       </complexType>

   <complexType name="GroupType">
       <sequence>
               <element name="id" type="int"/>
               <element name="name" type="string"/>
               <element name="description" type="string"/>
               <element name="ageGroup" type="string"/>
               <element name="material" type="string"/>
               <element name="leukemia" type="string"/>
               <element name="size" type="int"/>
       </sequence>
   </complexType>

   <complexType name="MicroarrayType">
       <sequence>
               <element name="name" type="string"/>
               <element name="description" type="string"/>
               <element name="manufacturer" type="string"/>
               <element name="numberFeatures" type="int"/>
       </sequence>
   </complexType>

   <complexType name="ListEntryType">
       <sequence>
               <element name="accessionNumber" type="string" minOccurs="1"
maxOccurs="1"/>
               <element name="geneSymbol" type="string" nillable="true"
minOccurs="1" maxOccurs="1"/>
               <element name="rank" type="int" minOccurs="0" maxOccurs="1"/>
               <element name="upregulatedGroup" type="int" minOccurs="0"
maxOccurs="1"/>
               <element name="featureId" type="string" minOccurs="0"
maxOccurs="1"/>
       </sequence>
   </complexType>

</schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/
<?xml version="1.0" encoding="utf-8" ?> 
<description 
    xmlns="http://www.w3.org/ns/wsdl";
    targetNamespace="http://imib.uni-muenster.de/lgws/wsdl"; 
    xmlns:tns="http://imib.uni-muenster.de/lgws/wsdl";
    xmlns:lgs="http://imib.uni-muenster.de/lgws/xml";
    xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions";
    xmlns:wsoap="http://www.w3.org/ns/wsdl/soap";
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>

	<documentation>
    	soon
  	</documentation>
  
	<types>
    	<schema xmlns="http://www.w3.org/2001/XMLSchema";
        	    xmlns:lgs="http://imib.uni-muenster.de/lgws/xml";
        	    targetNamespace="http://imib.uni-muenster.de/lgws/xml";
        	    elementFormDefault="qualified"
                attributeFormDefault="qualified">

   			<include schemaLocation="genelist.xsd"/>
      		
      		<element name="genelistIds" type="lgs:GenelistIdsType"/>	
      		<complexType name="GenelistIdsType">
      			<sequence>
	      			<element name="id" type="int" minOccurs="1" maxOccurs="unbounded"/>
	      		</sequence>
      		</complexType>
      	
      		<element name="genelists" type="lgs:GenelistsType"/>	
      		<complexType name="GenelistsType">
      			<sequence>     
	          		<element name="genelist" type="lgs:GenelistType" minOccurs="0" maxOccurs="unbounded"/>
	          	</sequence>      
      		</complexType>
      		       
      		<element name="internalFault" type="string"/>    

    	</schema>    
  	</types>
 

 	<interface name="lgwsInterface">
      	<fault name="internalFault" element="lgs:internalFault"/> 
	    <operation name="getGenelists" 
                   pattern="http://www.w3.org/ns/wsdl/in-out";
                   style="http://www.w3.org/ns/wsdl/style/iri";
                   wsdlx:safe="true">
        	<input messageLabel="In" element="lgs:genelistIds"/>
            <output messageLabel="Out" element="lgs:genelists"/>
        	<outfault ref="tns:internalFault" messageLabel="Out"/>
    	</operation>
  	</interface>
  	
  	
  	<binding name="lgwsBinding" 
             interface="tns:lgwsInterface"
             type="http://www.w3.org/ns/wsdl/soap";
             wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/";>

    	<operation ref="tns:getGenelists" 
      	           wsoap:mep="http://www.w3.org/2003/05/soap/mep/soap-response"/>
  
    	<fault ref="tns:internalFault" wsoap:code="soap:Sender"/>
  	</binding>
  	
  	
  	<service name="lgws" interface="tns:lgwsInterface">
	     <endpoint name="lgwsEndpoint" 
                   binding="tns:lgwsBinding"
                   address ="http://localhost:8080/axis2/services/lgws"/>
  	</service>
 
</description>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to