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 Tamas Hauer <ta...@cern.ch> on 2003/07/11 16:54:51 UTC
elementFormDefault="qualified" missing
Hi,
I use WSDL2java to produce some services. My wsdl starts like this:
<wsdl:definitions name="com.mammogrid.portal"
targetNamespace="http://mammogrid.com/portal/"
elementFormDefault="qualified"
xmlns:tns="http://mammogrid.com/portal/"
xmlns:ans="http://mammogrid.com/portal/api/"
xmlns:pns="http://mammogrid.com/portal/patient/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<wsdl:types>
All the services are generated fine and deployment is working except
for one thing, the deployed wsdl does not have the
elementFormDefault="qualified"
attribute. Thus, if I generate client code from the original wsdl
then it is OK, but not from the deployed WSDL. If I fetch the wsdl
off the axis endpoint and patch it with this attribute, then it is
working fine.
Is this a bug in axis or is there some switch which I forget about?
Thanks,
Tamas
--
-------------------------------------------------------------------
-- Tamas Hauer ETT Division, CERN
Tamas.Hauer@cern.ch Geneve 23 Switzerland 1211
http://cern.ch/Tamas.Hauer Tel:(41)-227672342 Fax:(41)-227678930
Re: elementFormDefault="qualified" missing
Posted by Tamas Hauer <ta...@cern.ch>.
Jeff Greif wrote:
> I think that elementFormDefault="qualified" should be an attribute of the
> <schema> element that is a child of <types>.
> Jeff
Yes, I tried that too but it does not seem to work either.
Tamas
--
-------------------------------------------------------------------
-- Tamas Hauer ETT Division, CERN
Tamas.Hauer@cern.ch Geneve 23 Switzerland 1211
http://cern.ch/Tamas.Hauer Tel:(41)-227672342 Fax:(41)-227678930
Re: elementFormDefault="qualified" missing
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
I think that elementFormDefault="qualified" should be an attribute of the
<schema> element that is a child of <types>.
Jeff
----- Original Message -----
From: "Tamas Hauer" <ta...@cern.ch>
To: <ax...@ws.apache.org>
Sent: Friday, July 11, 2003 7:54 AM
Subject: elementFormDefault="qualified" missing
> Hi,
>
> I use WSDL2java to produce some services. My wsdl starts like this:
> <wsdl:definitions name="com.mammogrid.portal"
> targetNamespace="http://mammogrid.com/portal/"
> elementFormDefault="qualified"
> xmlns:tns="http://mammogrid.com/portal/"
> xmlns:ans="http://mammogrid.com/portal/api/"
> xmlns:pns="http://mammogrid.com/portal/patient/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >
> <wsdl:types>
>
> All the services are generated fine and deployment is working except
> for one thing, the deployed wsdl does not have the
> elementFormDefault="qualified"
> attribute.
THANKS,Re: elementFormDefault="qualified" missing
Posted by Tamas Hauer <ta...@cern.ch>.
Davanum Srinivas wrote:
>You have 2 choices....
>
>Choice #1 - use wsdlFile tag in your wsdd and point it to your original wsdl. See
>http://www.ftponline.com/javapro/2003_02/online/WSDL_kjones_02_27_03/default_pf.asp for example.
>
>Choice #2 - Make a local fix to Axis's code as shown below (Patch against latest CVS)
>
Thanks a lot! That was really helpful and quick!
Tamas
Re: split wsdl file (WAS: elementFormDefault="qualified" missing)
Posted by Davanum Srinivas <di...@yahoo.com>.
Try multiple files, if it does not work, log a bug
-- dims
--- Tamas Hauer <ta...@cern.ch> wrote:
> Davanum Srinivas wrote:
> > You have 2 choices....
> >
> > Choice #1 - use wsdlFile tag in your wsdd and point it to your original wsdl. See
> > http://www.ftponline.com/javapro/2003_02/online/WSDL_kjones_02_27_03/default_pf.asp for
> example.
>
> This comment made me curious. My wsdl is split into three files: one
> imports another which imports a third. I would not mind keeping this
> structure for the published wsdl. Can I do it with axis? The link
> above is a pointer to the good direction, I can now set my wsdl file
> with
> <service name="Service" provider="java:RPC" style="wrapped"
> use="literal">
> <wsdlFile>/MyWSDL.wsdl</wsdlFile>
> </service>
> But can I put more files there?
>
> Presently what I am doing is publishing the three files on the tomcat
> ROOT directory and my users are directed to use the wsdl from there.
> This works but has the minor aesthetic drawback that Service?wsdl of
> axis returns something different.
>
> Tamas
>
> --
> -------------------------------------------------------------------
> -- Tamas Hauer ETT Division, CERN
> Tamas.Hauer@cern.ch Geneve 23 Switzerland 1211
> http://cern.ch/Tamas.Hauer Tel:(41)-227672342 Fax:(41)-227678930
>
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
split wsdl file (WAS: elementFormDefault="qualified" missing)
Posted by Tamas Hauer <ta...@cern.ch>.
Davanum Srinivas wrote:
> You have 2 choices....
>
> Choice #1 - use wsdlFile tag in your wsdd and point it to your original wsdl. See
> http://www.ftponline.com/javapro/2003_02/online/WSDL_kjones_02_27_03/default_pf.asp for example.
This comment made me curious. My wsdl is split into three files: one
imports another which imports a third. I would not mind keeping this
structure for the published wsdl. Can I do it with axis? The link
above is a pointer to the good direction, I can now set my wsdl file
with
<service name="Service" provider="java:RPC" style="wrapped"
use="literal">
<wsdlFile>/MyWSDL.wsdl</wsdlFile>
</service>
But can I put more files there?
Presently what I am doing is publishing the three files on the tomcat
ROOT directory and my users are directed to use the wsdl from there.
This works but has the minor aesthetic drawback that Service?wsdl of
axis returns something different.
Tamas
--
-------------------------------------------------------------------
-- Tamas Hauer ETT Division, CERN
Tamas.Hauer@cern.ch Geneve 23 Switzerland 1211
http://cern.ch/Tamas.Hauer Tel:(41)-227672342 Fax:(41)-227678930
Re: elementFormDefault="qualified" missing
Posted by Davanum Srinivas <di...@yahoo.com>.
You have 2 choices....
Choice #1 - use wsdlFile tag in your wsdd and point it to your original wsdl. See
http://www.ftponline.com/javapro/2003_02/online/WSDL_kjones_02_27_03/default_pf.asp for example.
Choice #2 - Make a local fix to Axis's code as shown below (Patch against latest CVS):
===============================================================================================
cvs -z9 -q diff -u -wb -i wsdl\fromJava\Emitter.java (in directory
C:\jakarta\xml-axis\java\src\org\apache\axis\)
Index: wsdl/fromJava/Emitter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
retrieving revision 1.95
diff -d -u -b -B -w -u -w -b -i -r1.95 Emitter.java
--- wsdl/fromJava/Emitter.java 11 Jul 2003 12:59:19 -0000 1.95
+++ wsdl/fromJava/Emitter.java 11 Jul 2003 17:50:28 -0000
@@ -291,9 +291,11 @@
// Add Axis version info as comment to beginnning of generated WSDL
Comment wsdlVersion = doc.createComment(Messages.getMessage("wsdlCreated00",
Version.getVersion()));
- doc.getDocumentElement().insertBefore(wsdlVersion,
- doc.getDocumentElement().getFirstChild());
+ Element documentElement = doc.getDocumentElement();
+ documentElement.insertBefore(wsdlVersion,
+ documentElement.getFirstChild());
+ documentElement.setAttribute("elementFormDefault","qualified");
// Return the document
return doc;
}
===============================================================================================
--- Tamas Hauer <ta...@cern.ch> wrote:
> Hi,
>
> I use WSDL2java to produce some services. My wsdl starts like this:
> <wsdl:definitions name="com.mammogrid.portal"
> targetNamespace="http://mammogrid.com/portal/"
> elementFormDefault="qualified"
> xmlns:tns="http://mammogrid.com/portal/"
> xmlns:ans="http://mammogrid.com/portal/api/"
> xmlns:pns="http://mammogrid.com/portal/patient/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >
> <wsdl:types>
>
> All the services are generated fine and deployment is working except
> for one thing, the deployed wsdl does not have the
> elementFormDefault="qualified"
> attribute. Thus, if I generate client code from the original wsdl
> then it is OK, but not from the deployed WSDL. If I fetch the wsdl
> off the axis endpoint and patch it with this attribute, then it is
> working fine.
>
> Is this a bug in axis or is there some switch which I forget about?
>
> Thanks,
>
> Tamas
>
>
> --
> -------------------------------------------------------------------
> -- Tamas Hauer ETT Division, CERN
> Tamas.Hauer@cern.ch Geneve 23 Switzerland 1211
> http://cern.ch/Tamas.Hauer Tel:(41)-227672342 Fax:(41)-227678930
>
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com