java 2 wsdl
Hello, I'm not even sure where to begin this plea for assistance. So I will start with The known's. I'm trying to use the WSDL2Java utility (ANT file below). However, I'm trying to connect to a HTTPS wsdl and I'm getting an error about the certificates. Javax.net.ssl.SSLHandshakeException: sun.security.provider.certpath.SunCertPathBuilderException: Unable to find valid certification path to requested target. I can open my web browser and it works fine to the wsdl file. I have the cert loaded on the machine. The system administrator did that. It's a windows server 2003. Can anyone offer any assistance ? Thank you ?xml version=1.0 encoding=UTF-8? !-- = -- !-- wsdl2java -- !-- = -- project name=xxxWSDL2Java default=main basedir=. !-- -- !-- creates axis stubs for webservices -- !-- -- target name=generateWebServiceStubs depends= java classname=org.apache.axis.wsdl.WSDL2Java fork=true classpath pathelement location=axis.jar/ pathelement location=axis-ant.jar / pathelement location=jaxrpc.jar / pathelement location=commons-logging-1.0.4.jar / pathelement location=commons-discovery-0.2.jar / pathelement location=wsdl4j-1.5.1.jar / /classpath arg value=https://pathtoremotewebserver?WSDL/ arg value=-o$\{src.dir\}/main / /java /target target name=main depends=generateWebServiceStubs echo Building /echo /target /project
Re: Fw: [Axis2] IWAB0399E Error in generating Java from WSDL
Hi Anne, Thank you for the advise. I noticed that my existing codes were not following java bean convention. Also, i even used Singleton. After a few adjustments, this should work fine. Joseph Anne Thomas Manes [EMAIL PROTECTED] 07/13/2006 01:09 PM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: Fw: [Axis2] IWAB0399E Error in generating Java from WSDL The problem is with this reference in the WSDL: element name=setEmail complexType sequence element maxOccurs=unbounded name=email type=tns1:Email/ /sequence /complexType /element Your WSDL imports the tns1 namespace, but does not provide a location for the schema. I assume that the Eclipse tool can't figure out how to resolve the reference, so gives you the error. You need to make sure that your define the Email object as a bean and include the bean in your project before attempting to generate the service. Anne On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Attached are screen shots on how i encountered the error + the .wsdl file. This is how it came to be: 1. I created a new Dynamic Web Project, 2. copied my src folder from existing project, 3. chose the class i want to expose as webservice and tried to create a new web service from it. 4. error IWAB0399E ... referenced but not defined thank you, Joseph Anne Thomas Manes [EMAIL PROTECTED] 07/13/2006 04:07 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: [Axis2] IWAB0399E Error in generating Java from WSDL Please post your WSDL. On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've already done a webservice using Eclipse 3.2. Used Dynamic Web Project then created Web Service from it. It was ok and went smooth. Now i'm trying to convert my existing codes to a webservice. I got stuck n kept on encountering this error: IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://package.morepackage}MyClass is referenced but not defined. How do i go about? Please advise thanks, Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] IWAB0399E Error in generating Java from WSDL
Please post your WSDL. On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've already done a webservice using Eclipse 3.2. Used Dynamic Web Project then created Web Service from it. It was ok and went smooth. Now i'm trying to convert my existing codes to a webservice. I got stuck n kept on encountering this error: IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://package.morepackage}MyClass is referenced but not defined. How do i go about? Please advise thanks, Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] IWAB0399E Error in generating Java from WSDL
Hi, Attached are screen shots on how i encountered the error + the .wsdl file. This is how it came to be: 1. I created a new Dynamic Web Project, 2. copied my src folder from existing project, 3. chose the class i want to expose as webservice and tried to create a new web service from it. 4. error IWAB0399E ... referenced but not defined thank you, Joseph Anne Thomas Manes [EMAIL PROTECTED] 07/13/2006 04:07 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: [Axis2] IWAB0399E Error in generating Java from WSDL Please post your WSDL. On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've already done a webservice using Eclipse 3.2. Used Dynamic Web Project then created Web Service from it. It was ok and went smooth. Now i'm trying to convert my existing codes to a webservice. I got stuck n kept on encountering this error: IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://package.morepackage}MyClass is referenced but not defined. How do i go about? Please advise thanks, Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: [Axis2] IWAB0399E Error in generating Java from WSDL
The problem is with this reference in the WSDL: element name=setEmail complexType sequence element maxOccurs=unbounded name=email type=tns1:Email/ /sequence /complexType /elementYour WSDL imports the tns1 namespace, but does not provide a location for the schema. I assume that the Eclipse tool can't figure out how to resolve the reference, so gives you the error. You need to make sure that your define the Email object as a bean and include the bean in your project before attempting to generate the service.AnneOn 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Attached are screen shots on how i encountered the error + the .wsdl file. This is how it came to be: 1. I created a new Dynamic Web Project, 2. copied my src folder from existing project, 3. chose the class i want to expose as webservice and tried to create a new web service from it. 4. error IWAB0399E ... referenced but not defined thank you, Joseph Anne Thomas Manes [EMAIL PROTECTED] 07/13/2006 04:07 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: [Axis2] IWAB0399E Error in generating Java from WSDL Please post your WSDL. On 7/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've already done a webservice using Eclipse 3.2. Used Dynamic Web Project then created Web Service from it. It was ok and went smooth. Now i'm trying to convert my existing codes to a webservice. I got stuck n kept on encountering this error: IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://package.morepackage}MyClass is referenced but not defined. How do i go about? Please advise thanks, Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] IWAB0399E Error in generating Java from WSDL
Hi, I've already done a webservice using Eclipse 3.2. Used Dynamic Web Project then created Web Service from it. It was ok and went smooth. Now i'm trying to convert my existing codes to a webservice. I got stuck n kept on encountering this error: IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://package.morepackage}MyClass is referenced but not defined. How do i go about? Please advise thanks, Joseph
Re: [Axis2 1.0]Bug? when generating java from WSDL
Jose,The schema has two identical definitions of the FTAction type. Which is obviously an error. The WSDL also imports another schema with a namespace of http://ft.tomas.org/xsd , which also defines the FTAction type, and your elements reference this imported type rather than one from the http://tomas.org/faultTolerance/Service/Types namespace. Did you create a new interface and class to generate your WSDL or did you use the class previously generated by Axis1? I suggest you start completely from scratch. Or better yet -- start from the WSDL from your working web service. AnneOn 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: I have a working web service deployed in Axis 1.3 so I tested if I canport it to Axis2.I downloaded the Axis2 binary distribution and ecipse plugin. First Icreated the FaultToleranceService interface and the FTAction class that were the starting point of my old service. They are attached.Using the Eclipse generation wizard, I successfully created theattached wsdl file but when I try to generate the java server and stubcode from it I get the following error: Exception in thread mainorg.apache.axis2.wsdl.codegen.CodeGenerationException:java.lang.RuntimeException: java.lang.RuntimeException: Schema fornamespace ' http://tomas.org/faultTolerance/Service/Types' alreadycontains type 'FTActionI tried with the Eclipse code generation wizard and manually with thewsdl2java class and the result is the same.I understand that, as the wsdl code is generated from an Axis2 tool, it must be understood by another Axis2 tool without this kind ofproblems.--Regards.José Antonio Sánchez
Re: [Axis2 1.0]Bug? when generating java from WSDL
If I start with the wsdl from the working service, I get the same error. The two classes (FTAction and FaultToleranceService interface) are written by me, although they were writter for the Axis1 service, they are not generated at all and so, they should generate a good WSDL file with Axis2. On 5/5/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Jose, The schema has two identical definitions of the FTAction type. Which is obviously an error. The WSDL also imports another schema with a namespace of http://ft.tomas.org/xsd , which also defines the FTAction type, and your elements reference this imported type rather than one from the http://tomas.org/faultTolerance/Service/Types namespace. Did you create a new interface and class to generate your WSDL or did you use the class previously generated by Axis1? I suggest you start completely from scratch. Or better yet -- start from the WSDL from your working web service. Anne On 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: I have a working web service deployed in Axis 1.3 so I tested if I can port it to Axis2. I downloaded the Axis2 binary distribution and ecipse plugin. First I created the FaultToleranceService interface and the FTAction class that were the starting point of my old service. They are attached. Using the Eclipse generation wizard, I successfully created the attached wsdl file but when I try to generate the java server and stub code from it I get the following error: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.RuntimeException: Schema for namespace ' http://tomas.org/faultTolerance/Service/Types' already contains type 'FTAction I tried with the Eclipse code generation wizard and manually with the wsdl2java class and the result is the same. I understand that, as the wsdl code is generated from an Axis2 tool, it must be understood by another Axis2 tool without this kind of problems. -- Regards. José Antonio Sánchez -- Saludos. José Antonio Sánchez
Re: [Axis2 1.0]Bug? when generating java from WSDL
On 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: If I start with the wsdl from the working service, I get the same error. The two classes (FTAction and FaultToleranceService interface) are written by me, although they were writter for the Axis1 service, they are not generated at all and so, they should generate a good WSDL file with Axis2. On 5/5/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Jose, The schema has two identical definitions of the FTAction type. Which is obviously an error. The WSDL also imports another schema with a namespace of http://ft.tomas.org/xsd , which also defines the FTAction type, and your elements reference this imported type rather than one from the http://tomas.org/faultTolerance/Service/Types namespace. Did you create a new interface and class to generate your WSDL or did you use the class previously generated by Axis1? I suggest you start completely from scratch. Or better yet -- start from the WSDL from your working web service. Anne On 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: I have a working web service deployed in Axis 1.3 so I tested if I can port it to Axis2. I downloaded the Axis2 binary distribution and ecipse plugin. First I created the FaultToleranceService interface and the FTAction class that were the starting point of my old service. They are attached. Using the Eclipse generation wizard, I successfully created the attached wsdl file but when I try to generate the java server and stub code from it I get the following error: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.RuntimeException: Schema for namespace ' http://tomas.org/faultTolerance/Service/Types' already contains type 'FTAction I tried with the Eclipse code generation wizard and manually with the wsdl2java class and the result is the same. I understand that, as the wsdl code is generated from an Axis2 tool, it must be understood by another Axis2 tool without this kind of problems. -- Regards. José Antonio Sánchez -- Saludos. José Antonio Sánchez -- Saludos. José Antonio Sánchez
Re: [Axis2 1.0]Bug? when generating java from WSDL
I checked it with the wsdl generated by Axis 1.3. It's attached and it seems to work. So the problem is not with the wsdl2java but with the java2wsdl process. On 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: If I start with the wsdl from the working service, I get the same error. The two classes (FTAction and FaultToleranceService interface) are written by me, although they were writter for the Axis1 service, they are not generated at all and so, they should generate a good WSDL file with Axis2. On 5/5/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Jose, The schema has two identical definitions of the FTAction type. Which is obviously an error. The WSDL also imports another schema with a namespace of http://ft.tomas.org/xsd , which also defines the FTAction type, and your elements reference this imported type rather than one from the http://tomas.org/faultTolerance/Service/Types namespace. Did you create a new interface and class to generate your WSDL or did you use the class previously generated by Axis1? I suggest you start completely from scratch. Or better yet -- start from the WSDL from your working web service. Anne On 5/5/06, José Antonio Sánchez [EMAIL PROTECTED] wrote: I have a working web service deployed in Axis 1.3 so I tested if I can port it to Axis2. I downloaded the Axis2 binary distribution and ecipse plugin. First I created the FaultToleranceService interface and the FTAction class that were the starting point of my old service. They are attached. Using the Eclipse generation wizard, I successfully created the attached wsdl file but when I try to generate the java server and stub code from it I get the following error: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.RuntimeException: Schema for namespace ' http://tomas.org/faultTolerance/Service/Types' already contains type 'FTAction I tried with the Eclipse code generation wizard and manually with the wsdl2java class and the result is the same. I understand that, as the wsdl code is generated from an Axis2 tool, it must be understood by another Axis2 tool without this kind of problems. -- Regards. José Antonio Sánchez -- Saludos. José Antonio Sánchez -- Saludos. José Antonio Sánchez ?xml version=1.0 encoding=UTF-8? wsdl:definitions targetNamespace=http://tomas.org/faultTolerance/Service; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:impl=http://tomas.org/faultTolerance/Service; xmlns:intf=http://tomas.org/faultTolerance/Service; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; !--WSDL created by Apache Axis version: 1.3 Built on Oct 05, 2005 (05:23:37 EDT)-- wsdl:types schema targetNamespace=http://tomas.org/faultTolerance/Service; xmlns=http://www.w3.org/2001/XMLSchema; import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=FTAction sequence element name=action nillable=true type=soapenc:string/ element name=value type=xsd:int/ /sequence /complexType complexType name=ArrayOfFTAction complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:FTAction[]/ /restriction /complexContent /complexType /schema /wsdl:types wsdl:message name=doFTActionResponse wsdl:part name=doFTActionReturn type=impl:ArrayOfFTAction/ /wsdl:message wsdl:message name=doFTActionRequest wsdl:part name=in0 type=impl:ArrayOfFTAction/ /wsdl:message wsdl:portType name=FaultToleranceService wsdl:operation name=doFTAction parameterOrder=in0 wsdl:input message=impl:doFTActionRequest name=doFTActionRequest/ wsdl:output message=impl:doFTActionResponse name=doFTActionResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=FTServiceSoapBinding type=impl:FaultToleranceService wsdlsoap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=doFTAction wsdlsoap:operation soapAction=/ wsdl:input name=doFTActionRequest wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=http://tomas.org/faultTolerance/Service; use=encoded/ /wsdl:input wsdl:output name=doFTActionResponse wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=http://tomas.org/faultTolerance/Service; use=encoded/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=FaultToleranceServiceService wsdl:port binding=impl:FTServiceSoapBinding name=FTService wsdlsoap:address location=http://localhost:8080/axis/services/FTService/ /wsdl:port
Inconsistent behavior of Java v. WSDL
My WSDL, relevant portions below, defines an object member with a set of claim objects called claims, i.e.: member claims claim/claim ... claim/claim /claims /member But when Axis returns XML from a web service call, the XML is in this format: member claims claims/claims ... claims/claims /claims /member Any idea why that may occur? Thanks, Greg ***WSDL*** ?xml version=1.0 encoding=UTF-8? !-- Automatically generated by parsing Clover-ETL output with XSL script -- wsdl:definitions targetNamespace=http://d2hawkeye.com/api/vmr/; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:apachesoap=http://xml.apache.org/xml-soap; xmlns:impl=http://d2hawkeye.com/api/vmr/; xmlns:intf=http://d2hawkeye.com/api/vmr/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; wsdl:types schema targetNamespace=http://d2hawkeye.com/api/vmr/; xmlns=http://www.w3.org/2001/XMLSchema; element name=Claim complexType sequence element maxOccurs=1 minOccurs=0 name=SN type=xsd:float / ... ... element maxOccurs=1 minOccurs=0 name=RECEIVEDMONTH type=xsd:date / /sequence /complexType /element element name=Claims complexType sequence element maxOccurs=unbounded minOccurs=0 ref=impl:Claim/ /sequence /complexType /element element name=Member complexType sequence element maxOccurs=1 minOccurs=1 name=memberID type=xsd:string/ element maxOccurs=1 minOccurs=0 ref=impl:Claims/ /sequence /complexType /element /schema /wsdl:types wsdl:message name=getVMRRequest wsdl:part name=MemberReq element=impl:Member/ /wsdl:message wsdl:message name=getVMRResponse wsdl:part name=MemberRes element=impl:Member/ /wsdl:message wsdl:portType name=VMR wsdl:operation name=getVMR wsdl:input message=impl:getVMRRequest name=getVMRRequest/ wsdl:output message=impl:getVMRResponse name=getVMRResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=VMRServiceSoapBinding type=impl:VMR wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=getVMR wsdlsoap:operation soapAction=/ wsdl:input name=getVMRRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=getVMRResponse wsdlsoap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=VMRService wsdl:port binding=impl:VMRServiceSoapBinding name=VMRService wsdlsoap:address location=http://localhost:8084/services/VMRService/ /wsdl:port /wsdl:service /wsdl:definitions ***WSDL*** ***WSDD*** !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from VMRService WSDL service -- service name=VMRService provider=java:RPC style=document use=literal parameter name=wsdlTargetNamespace value=http://d2hawkeye.com/api/vmr// parameter name=wsdlServiceElement value=VMRService/ parameter name=schemaUnqualified value=http://d2hawkeye.com/api/vmr// parameter name=wsdlServicePort value=VMRService/ parameter name=className value=com.d2hawkeye.api.vmr.VMRServiceSoapBindingSkeleton/ parameter name=wsdlPortType value=VMR/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value=*/ parameter name=scope value=Session/ typeMapping xmlns:ns=http://d2hawkeye.com/api/vmr/; qname=ns:claim type=java:com.d2hawkeye.api.vmr.Claim serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=http://d2hawkeye.com/api/vmr/; qname=ns:member type=java:com.d2hawkeye.api.vmr.Member serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / arrayMapping xmlns:ns=http://d2hawkeye.com/api/vmr/; qname=ns:claims type=java:com.d2hawkeye.api.vmr.Claim[] innerType=cmp-ns:claim xmlns:cmp-ns=http://d2hawkeye.com/api/vmr/; encodingStyle= / /service /deployment ***WSDD***
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
On Fri, 2005-09-02 at 08:54 -0400, Anne Thomas Manes wrote: I suggest that you file a feature enhancement request to add a parameter to generate minOccurs=0. Btw, where should this parameter be used? It would be used when the schema generated, so it's related to the Serializer.writeSchema and the ElementDesc.minOccurs. But i do not see the location where the parameter would be introduced. Do you have some suggestions? Thanx, Martin Anne On 8/31/05, Martin Grotzke [EMAIL PROTECTED] wrote: On Wed, 2005-08-31 at 10:57 -0400, Mike Woinoski wrote: Martin Grotzke wrote: Btw, the concrete problem that we had has to do with C# / .NET 1.1: if you send an empty xml-element (as you showed below) for some primitive C#-type (e.g. int, long), then the .NET deserializer crashes, as it cannot parse the empty value. If you do not send this empty element (which is forced by minOccurs=0 as it seems), the .NET deserializer does his job. I've only seen Java2WSDL define nillable=true on non-primitives (Strings, value types, etc.) If Java2WSDL is adding nillable=true to primitives, it may be an Axis bug. You may want to look on Bugzilla to see if anyone has reported it yet. In java we use the wrapper types, not the primitives. But a java Integer is represented by an xsd:int, which is mapped to the C# primitive int. So it's not an axis bug... Cheers, Martin Regards, Mike Thanx again, Martin On Tue, 2005-08-30 at 10:16 -0400, Mike Woinoski wrote: Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDFf4R7FvOl7Te +pYRAjTlAJwOEU5rLSqG27uBdANQYpJtf3v7DwCfVdg5 xfTXy/ZJKgVjB5E2GlN0rXM= =ie28 -END PGP SIGNATURE- -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
On Fri, 2005-09-02 at 08:54 -0400, Anne Thomas Manes wrote: I suggest that you file a feature enhancement request to add a parameter to generate minOccurs=0. good idea, just submitted. cheers, martin Anne On 8/31/05, Martin Grotzke [EMAIL PROTECTED] wrote: On Wed, 2005-08-31 at 10:57 -0400, Mike Woinoski wrote: Martin Grotzke wrote: Btw, the concrete problem that we had has to do with C# / .NET 1.1: if you send an empty xml-element (as you showed below) for some primitive C#-type (e.g. int, long), then the .NET deserializer crashes, as it cannot parse the empty value. If you do not send this empty element (which is forced by minOccurs=0 as it seems), the .NET deserializer does his job. I've only seen Java2WSDL define nillable=true on non-primitives (Strings, value types, etc.) If Java2WSDL is adding nillable=true to primitives, it may be an Axis bug. You may want to look on Bugzilla to see if anyone has reported it yet. In java we use the wrapper types, not the primitives. But a java Integer is represented by an xsd:int, which is mapped to the C# primitive int. So it's not an axis bug... Cheers, Martin Regards, Mike Thanx again, Martin On Tue, 2005-08-30 at 10:16 -0400, Mike Woinoski wrote: Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDFf4R7FvOl7Te +pYRAjTlAJwOEU5rLSqG27uBdANQYpJtf3v7DwCfVdg5 xfTXy/ZJKgVjB5E2GlN0rXM= =ie28 -END PGP SIGNATURE- -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
Martin Grotzke wrote: Thank you for your answer, Mike! We're using beehive for webservice development, and until now we tried to do as most as possible starting from java. If there's no way to tell java2wsdl to use minOccurs, it's probably the best to define the types using schema, to go partially the contract-first way. In many cases, this seems to be the most reliable way to get what you want. Btw, the concrete problem that we had has to do with C# / .NET 1.1: if you send an empty xml-element (as you showed below) for some primitive C#-type (e.g. int, long), then the .NET deserializer crashes, as it cannot parse the empty value. If you do not send this empty element (which is forced by minOccurs=0 as it seems), the .NET deserializer does his job. I've only seen Java2WSDL define nillable=true on non-primitives (Strings, value types, etc.) If Java2WSDL is adding nillable=true to primitives, it may be an Axis bug. You may want to look on Bugzilla to see if anyone has reported it yet. Regards, Mike Thanx again, Martin On Tue, 2005-08-30 at 10:16 -0400, Mike Woinoski wrote: Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
On Wed, 2005-08-31 at 10:57 -0400, Mike Woinoski wrote: Martin Grotzke wrote: Btw, the concrete problem that we had has to do with C# / .NET 1.1: if you send an empty xml-element (as you showed below) for some primitive C#-type (e.g. int, long), then the .NET deserializer crashes, as it cannot parse the empty value. If you do not send this empty element (which is forced by minOccurs=0 as it seems), the .NET deserializer does his job. I've only seen Java2WSDL define nillable=true on non-primitives (Strings, value types, etc.) If Java2WSDL is adding nillable=true to primitives, it may be an Axis bug. You may want to look on Bugzilla to see if anyone has reported it yet. In java we use the wrapper types, not the primitives. But a java Integer is represented by an xsd:int, which is mapped to the C# primitive int. So it's not an axis bug... Cheers, Martin Regards, Mike Thanx again, Martin On Tue, 2005-08-30 at 10:16 -0400, Mike Woinoski wrote: Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin
Re: java to wsdl: How to generate minOccurs=0 instead of nillable=true
Thank you for your answer, Mike! We're using beehive for webservice development, and until now we tried to do as most as possible starting from java. If there's no way to tell java2wsdl to use minOccurs, it's probably the best to define the types using schema, to go partially the contract-first way. Btw, the concrete problem that we had has to do with C# / .NET 1.1: if you send an empty xml-element (as you showed below) for some primitive C#-type (e.g. int, long), then the .NET deserializer crashes, as it cannot parse the empty value. If you do not send this empty element (which is forced by minOccurs=0 as it seems), the .NET deserializer does his job. Thanx again, Martin On Tue, 2005-08-30 at 10:16 -0400, Mike Woinoski wrote: Martin, I don't think there is a Java2WSDL option that adds minOccurs=0 to an element definition. However, you can edit the WSDL manually and add it yourself (sounds like a good job for an Ant task or shell script.) BTW, an element can have both nillable=true and minOccurs=0. The semantics of these attributes is different: nillable=true allows an XML element to have a value equivalent to a Java null reference: ... xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; myelement xsi:nil=true/ This is different than a plain empty element: myelement/ which is equivalent to a Java String object with length 0. Mike Martin Grotzke wrote: Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin -- Martin Grotzke Hohenesch 38, 22765 Hamburg Tel. +49 (0) 40.39905668 Mobil +49 (0) 170.9365656 E-Mail[EMAIL PROTECTED] Onlinehttp://www.javakaffee.de signature.asc Description: This is a digitally signed message part
java to wsdl: How to generate minOccurs=0 instead of nillable=true
Hello, when creating the wsdl from java classes, is there's any way to change the default behavior from generating nillable=true to minOccurs=0 (for interop with .net)? thanx in advance, martin signature.asc Description: This is a digitally signed message part
RE: java to wsdl
You dont need to worry about the imports. But you could have easily tested it..why wait for reply? -Original Message- From: wsdl nerd [SMTP:[EMAIL PROTECTED] Sent: Thursday, May 05, 2005 12:38 PM To: axisgroup Subject: java to wsdl Good Afternoon to all, I'm happy about joining the group, looking forward for some help from you all. I've the following queries when i need to expose a java component into web service. I use axis for the task[using java2wsdl and wsdl2java] The following are my queries: 1. If i obtain a wsdl file from a class that has all the implementation in it, should I bother about the Interface and the Implementation obtained from wsdl2java? 2. Say the java file that i want to expose as webservice is a part of a big package, What should i do about the import stuff in the file that i have to convert to web service?? Has it got something to do with the classpath.. Eagerly Waiting for reply, Thank you.. Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony Confidential: This electronic message and all contents contain information from Syntel, Inc. which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee only. If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify the sender immediately and destroy the original message and all copies.
java to wsdl
Good Afternoon to all, I'm happy about joining the group, looking forward for some help from you all. I've the following queries when i need to expose a java component into web service. I use axis for the task[using java2wsdl and wsdl2java] The following are my queries: 1. If i obtain a wsdl file from a class that has all the implementation in it, should I bother about the Interface and the Implementation obtained from wsdl2java? 2. Say the java file that i want to expose as webservice is a part of a big package, What should i do about the import stuff in the file that i have to convert to web service?? Has it got something to do with the classpath.. Eagerly Waiting for reply, Thank you.. Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony
Java to WSDL documentation
Question: Is there a Java to WSDL documentation tool? I have not used SOAP much at all, is there a tool that will generate WSDL documentation that is generated from the original Java classes used to produce the WSDL? I did some axis-user archive searching and most of the posts are rather dated, so I am hoping for a new encouraging answer ;) In other words, if I publish my WSDL is there some means that the user of the WSDL can locate usage documentation through a reference in the WSDL? And, I hope there is some automated process that will produce the documentation from the Java classes I used to build the WSDL. Possibly a tool which inserts the WSDL documentation tag the Java Doc text that is defined in the Java classes? Any ideas? Thanks, Jim