Title: Message
Hi Jagannath.
 
See the bottom of this messsage for the description of how I imported the Set schema.
 
Can anyone else help us make the process of importing external XML scemas into the wsdl file automatic? How should this be done with the Ant builds? My feeling is that most of people maintain their wsdl files manually. Am I right?
 
I created a file called utilSchema.xsd, which contained the definition for the Set class as follows.

<?xml version="1.0" encoding="UTF-8"?>
<schema elementFormDefault="qualified"
targetNamespace="urn:datatypes:sequencer"
xmlns=
http://www.w3.org/2001/XMLSchema
xmlns:tns1="urn:datatypes:sequencer">
<complexType name="Collection">
<sequence>
<element name="cel" minOccurs="0" maxOccurs="unbounded" type="anyType"
nillable="true"/>
</sequence>
</complexType>
<complexType name="Set">
<complexContent>
<extension base="tns1:Collection"/>
</complexContent>
</complexType>
</schema>

I imported this file in my wsdl file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:sequencer"
xmlns=
http://schemas.xmlsoap.org/wsdl/
xmlns:apachesoap=
http://xml.apache.org/xml-soap
xmlns:impl="urn:sequencer" xmlns:intf="urn:sequencer"
xmlns:soapenc=
http://schemas.xmlsoap.org/soap/encoding/
xmlns:tns1=
http://data.sequencer.waterford.org
xmlns:tns2=
http://base.data.sequencer.waterford.org
xmlns:tns3="urn:datatypes:sequencer"
xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/
xmlns:wsdlsoap=
http://schemas.xmlsoap.org/wsdl/soap/
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<import namespace="urn:datatypes:sequencer" location="utilSchema.xsd"/>

<wsdl:types>

<schema targetNamespace="http://base.data.sequencer.waterford.org" xmlns="http://www.w3.org/2001/XMLSchema">

<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

<complexType abstract="true" name="BaseCurriculum">
<sequence>
<element name="objectives" nillable="true" type="tns3:Set"/>

</sequence>
</complexType>
</wsdl:types>

<!-- remaining part -->

</wsdl:definitions>

Hope this helps.

Oleg

-----Original Message-----
From: jagannath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 12:23 AM
To: Oleg Lebedev
Cc: [EMAIL PROTECTED]
Subject: Re: java2wsdl include wsd file

Dear Oleg,

I am also facing the same problem as mentioned by you below. As I am new to SOAP can you provide me details on how you created the wsd file which provides xml mapping for tns3:Set and the way you imported it to the wdsl file.

Greatly appreciating your time.

Regards.
Jagannath

Oleg Lebedev wrote:
Hi.
 
I asked a similar question a couple of days ago, but haven't received an answer. I've made some progress on fixing the problem, so now I got a different question.
 
I have a method in my Java class, which returns java.util.Set. When I run Ant task java2wsdl, I get the following warning:
[axis-java2wsdl] - The class java.util.Set is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.

However, instead of usnig anyType, type tns3:Set is used in the generated wsdl and therefore crashes the following axis-wsdl2java task execution.
 
To solve this problem I created a wsd file, which provides an xml mapping for the type tns3:Set. After importing this wsd file in my wsdl file I was able to run wsdl2java successfully.
 
Now, I want to be able to tell axis-java2wsdl where to look for the "tns3:Set" type mapping when generating the wsdl. What is the standard way to do this?
 
I would like to avoid manual editing of the wsdl file. Can anyone share any experience on how to import external types via Ant tasks?
 
Thanks.
 
Oleg
 
 
*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************

 
*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************

Reply via email to