axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "prasad c iyer" <pras...@skillnetinc.com>
Subject Problem with WSDL Schema import
Date Thu, 17 Jan 2008 17:53:06 GMT
Hi,
I am using WSDL2Java for generating the stubs and skeleton. Schema for the 
WSDL are implemented in external XSD file. After running the WSDL2Java, WSDL 
file doesn't contain the full path to the XSD file. Same goes if my schema 
imports other XSD files. Following is the example

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="BankServices" 
targetNamespace="http://localhost:8080/my-app/services/BankServices" 
xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:tns="http://localhost:8080/my-app/services/BankServices" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:bank="http://localhost:8080/my-app/services/BankServices/types" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <types>
    <xsd:schema>
   <xsd:import 
namespace="http://localhost:8080/my-app/services/BankServices/types" 
schemaLocation="BankServices?xsd=xsd0.xsd"/>
  </xsd:schema>
  </types>


There is a possible solution which I got from user list like I should update 
the schemaLocation by hand after running the WSDL2Java. But I think it is 
very error prone.
Or I would have to deploy another application which contains only xsd files
But I can't digest either of this solutions.
Is there anyway to tell WSDL2Java to generate the full path for all the 
imports, Well it is changing the path anyway in my XSD files and WSDL file. 
My original WSDL file contains

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:tns="http://localhost:8080/my-app/services/BankServices" 
xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:bank="http://localhost:8080/my-app/services/BankServices/types" 
name="BankServices" 
targetNamespace="http://localhost:8080/my-app/services/BankServices">
 <types>
  <xsd:schema>
   <xsd:import schemaLocation="Bank.xsd" 
namespace="http://localhost:8080/my-app/services/BankServices/types"/>
  </xsd:schema>
 </types>




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message