AXIS 1.2 : java2wsdl in document/literal - arrays of complex types

2005-05-12 Thread Ephemeris Lappis
Hello.

I know this subject has already been discussed many times. I've been
searching for similar information, but it seems that all the reported
problems or questions only apply to rpc style services with soap arrays...
If it's not the case, sincerly sorry...

First, is it legal, according to WS-I, to return arrays of custom complex
types in document/literal style services ?

If yes, it seems the java2wsdl fails when generating the mappings for the
return element. The generated complex type is the unbounded element that
represents the array, but the complex type itself is not described.

Here is my example...

A bean class named CharacterCount has two members : a string and an integer.

An operation named analyse takes a string argument and returns an array of
CharacterCount :
public CharacterCount[] analyse(String string).

The ant script generates the wsdl using the following target :
target name=wsdl depends=compile
mkdir dir=./wsdl /
property name=my.namespace value=http://ws.moon.net/j2me05; 
/
java2wsdl output=./wsdl/j2me05ws.wsdl
   className=net.moon.me.five.ws.StringTool
   namespace=${my.namespace}
   porttypename=StringUtility
   serviceportname=StringUtilityPort
   serviceelementname=J2ME05
   style=document
   use=literal
   location=http://ws.moon.net/j2me05;
classpath
pathelement 
location=${my.services.compile-directory} /
path refid=my.axis.classpath /
/classpath
complextype 
classname=net.moon.me.five.ws.StringStructure
 namespace=${my.namespace} /
complextype 
classname=net.moon.me.five.ws.CharacterCount
 namespace=${my.namespace} /
/java2wsdl
/target
Note that the CharacterCount mapping is included...

The resulting wsdl file, where the complex type detailled description is
missing :

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://ws.moon.net/j2me05;
xmlns:impl=http://ws.moon.net/j2me05;
xmlns:intf=http://ws.moon.net/j2me05;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
!--WSDL created by Apache Axis version: 1.2RC2
Built on Jan 28, 2005 (07:08:29 CET)--
 wsdl:types
  schema xmlns=http://www.w3.org/2001/XMLSchema;
targetNamespace=http://ws.moon.net/j2me05; elementFormDefault=qualified
   element name=in0 type=xsd:string/
   element name=reverseReturn type=xsd:string/
   complexType name=StringStructure
sequence
 element name=count type=xsd:int/
 element name=string nillable=true type=xsd:string/
/sequence
   /complexType
   element name=in1 type=impl:StringStructure/
   element name=repeatReturn type=xsd:string/
   element name=in2 type=xsd:string/
   complexType name=CharacterCount
sequence
 element name=item type=impl:CharacterCount minOccurs=0
maxOccurs=unbounded/
/sequence
   /complexType
   element name=analyseReturn maxOccurs=unbounded
type=impl:CharacterCount/
  /schema
 /wsdl:types

   wsdl:message name=analyseRequest

  wsdl:part name=in0 element=impl:in2/

   /wsdl:message

   wsdl:message name=reverseRequest

  wsdl:part name=in0 element=impl:in0/

   /wsdl:message

   wsdl:message name=repeatRequest

  wsdl:part name=in0 element=impl:in1/

   /wsdl:message

   wsdl:message name=repeatResponse

  wsdl:part name=repeatReturn element=impl:repeatReturn/

   /wsdl:message

   wsdl:message name=analyseResponse

  wsdl:part name=analyseReturn element=impl:analyseReturn/

   /wsdl:message

   wsdl:message name=reverseResponse

  wsdl:part name=reverseReturn element=impl:reverseReturn/

   /wsdl:message

   wsdl:portType name=StringUtility

  wsdl:operation name=reverse parameterOrder=in0

 wsdl:input name=reverseRequest message=impl:reverseRequest/

 wsdl:output name=reverseResponse
message=impl:reverseResponse/

  /wsdl:operation

  wsdl:operation name=repeat parameterOrder=in0

 wsdl:input name=repeatRequest message=impl:repeatRequest/

 wsdl:output name=repeatResponse message=impl:repeatResponse/

  /wsdl:operation

  wsdl:operation name=analyse parameterOrder=in0

 wsdl:input name=analyseRequest message=impl:analyseRequest/

 wsdl:output name=analyseResponse
message=impl:analyseResponse/

  /wsdl:operation

   /wsdl:portType

   wsdl:binding name=StringUtilityPortSoapBinding
type=impl:StringUtility

  wsdlsoap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http/

  

Re: AXIS 1.2 : java2wsdl in document/literal - arrays of complex types

2005-05-12 Thread Davanum Srinivas
Please create a bug report...my suggestion for a work around is to get
a initial wsdl from  java2wsdl and tweak it to your hearts content
(and follow WS-I recommendations if you wan t to).

thanks,
dims

On 5/12/05, Ephemeris Lappis [EMAIL PROTECTED] wrote:
 Hello.
 
 I know this subject has already been discussed many times. I've been
 searching for similar information, but it seems that all the reported
 problems or questions only apply to rpc style services with soap arrays...
 If it's not the case, sincerly sorry...
 
 First, is it legal, according to WS-I, to return arrays of custom complex
 types in document/literal style services ?
 
 If yes, it seems the java2wsdl fails when generating the mappings for the
 return element. The generated complex type is the unbounded element that
 represents the array, but the complex type itself is not described.
 
 Here is my example...
 
 A bean class named CharacterCount has two members : a string and an integer.
 
 An operation named analyse takes a string argument and returns an array of
 CharacterCount :
 public CharacterCount[] analyse(String string).
 
 The ant script generates the wsdl using the following target :
 target name=wsdl depends=compile
 mkdir dir=./wsdl /
 property name=my.namespace 
 value=http://ws.moon.net/j2me05; /
 java2wsdl output=./wsdl/j2me05ws.wsdl
className=net.moon.me.five.ws.StringTool
namespace=${my.namespace}
porttypename=StringUtility
serviceportname=StringUtilityPort
serviceelementname=J2ME05
style=document
use=literal
location=http://ws.moon.net/j2me05;
 classpath
 pathelement 
 location=${my.services.compile-directory} /
 path refid=my.axis.classpath /
 /classpath
 complextype 
 classname=net.moon.me.five.ws.StringStructure
  namespace=${my.namespace} /
 complextype 
 classname=net.moon.me.five.ws.CharacterCount
  namespace=${my.namespace} /
 /java2wsdl
 /target
 Note that the CharacterCount mapping is included...
 
 The resulting wsdl file, where the complex type detailled description is
 missing :
 
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions targetNamespace=http://ws.moon.net/j2me05;
 xmlns:impl=http://ws.moon.net/j2me05;
 xmlns:intf=http://ws.moon.net/j2me05;
 xmlns:apachesoap=http://xml.apache.org/xml-soap;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 !--WSDL created by Apache Axis version: 1.2RC2
 Built on Jan 28, 2005 (07:08:29 CET)--
  wsdl:types
   schema xmlns=http://www.w3.org/2001/XMLSchema;
 targetNamespace=http://ws.moon.net/j2me05; elementFormDefault=qualified
element name=in0 type=xsd:string/
element name=reverseReturn type=xsd:string/
complexType name=StringStructure
 sequence
  element name=count type=xsd:int/
  element name=string nillable=true type=xsd:string/
 /sequence
/complexType
element name=in1 type=impl:StringStructure/
element name=repeatReturn type=xsd:string/
element name=in2 type=xsd:string/
complexType name=CharacterCount
 sequence
  element name=item type=impl:CharacterCount minOccurs=0
 maxOccurs=unbounded/
 /sequence
/complexType
element name=analyseReturn maxOccurs=unbounded
 type=impl:CharacterCount/
   /schema
  /wsdl:types
 
wsdl:message name=analyseRequest
 
   wsdl:part name=in0 element=impl:in2/
 
/wsdl:message
 
wsdl:message name=reverseRequest
 
   wsdl:part name=in0 element=impl:in0/
 
/wsdl:message
 
wsdl:message name=repeatRequest
 
   wsdl:part name=in0 element=impl:in1/
 
/wsdl:message
 
wsdl:message name=repeatResponse
 
   wsdl:part name=repeatReturn element=impl:repeatReturn/
 
/wsdl:message
 
wsdl:message name=analyseResponse
 
   wsdl:part name=analyseReturn element=impl:analyseReturn/
 
/wsdl:message
 
wsdl:message name=reverseResponse
 
   wsdl:part name=reverseReturn element=impl:reverseReturn/
 
/wsdl:message
 
wsdl:portType name=StringUtility
 
   wsdl:operation name=reverse parameterOrder=in0
 
  wsdl:input name=reverseRequest message=impl:reverseRequest/
 
  wsdl:output name=reverseResponse
 message=impl:reverseResponse/
 
   /wsdl:operation
 
   wsdl:operation name=repeat parameterOrder=in0
 
  wsdl:input name=repeatRequest message=impl:repeatRequest/
 
  wsdl:output name=repeatResponse message=impl:repeatResponse/
 
   /wsdl:operation
 
  

Re: AXIS 1.2 : java2wsdl in document/literal - arrays of complex types

2005-05-12 Thread Davanum Srinivas
Looping Guillaume for jonas.
-- dims

On 5/12/05, Ephemeris Lappis [EMAIL PROTECTED] wrote:
 Before i open a new report, i will test it again with a more simple case.
 Indeed, i'm using axis with jonas, and as i'm not sure this last doesn't
 interfere during the service endpoint generation, i will test it again.
 I've already build a simple case with a similar construction, and it seems
 the last axis generates a good wsdl with the intermediate custom complex
 type and the return sequence. Now the problem seems to be the translation of
 this wsdl during the wsdl2java step. When i run it using the standalone axis
 it seems to work, but through jonas, some classes seem invalid or missing.
 As i have also tried to do the same using the two axis versions (the final
 1.2 and the RC? that comes with jonas), and both seem to work, i have posted
 a message on the jonas list to have an echo from there about the wsdl
 processing.
 With more information, if the problem is confirmed, i'll post report either
 for jonas or for axis.
 Thanks anyway.
 
 --
 Ephemeris Lappis
 
  -Message d'origine-
  De : Davanum Srinivas [mailto:[EMAIL PROTECTED]
  Envoyé : jeudi 12 mai 2005 13:38
  À : axis-user@ws.apache.org
  Objet : Re: AXIS 1.2 : java2wsdl in document/literal - arrays of complex
  types
 
 
  Please create a bug report...my suggestion for a work around is to get
  a initial wsdl from  java2wsdl and tweak it to your hearts content
  (and follow WS-I recommendations if you wan t to).
 
  thanks,
  dims
 
  On 5/12/05, Ephemeris Lappis [EMAIL PROTECTED] wrote:
   Hello.
  
   I know this subject has already been discussed many times. I've been
   searching for similar information, but it seems that all the reported
   problems or questions only apply to rpc style services with
  soap arrays...
   If it's not the case, sincerly sorry...
  
   First, is it legal, according to WS-I, to return arrays of
  custom complex
   types in document/literal style services ?
  
   If yes, it seems the java2wsdl fails when generating the
  mappings for the
   return element. The generated complex type is the unbounded
  element that
   represents the array, but the complex type itself is not described.
  
   Here is my example...
  
   A bean class named CharacterCount has two members : a string
  and an integer.
  
   An operation named analyse takes a string argument and
  returns an array of
   CharacterCount :
   public CharacterCount[] analyse(String string).
  
   The ant script generates the wsdl using the following target :
   target name=wsdl depends=compile
   mkdir dir=./wsdl /
   property name=my.namespace
  value=http://ws.moon.net/j2me05; /
   java2wsdl output=./wsdl/j2me05ws.wsdl
  className=net.moon.me.five.ws.StringTool
  namespace=${my.namespace}
  porttypename=StringUtility
  serviceportname=StringUtilityPort
  serviceelementname=J2ME05
  style=document
  use=literal
  location=http://ws.moon.net/j2me05;
   classpath
   pathelement
  location=${my.services.compile-directory} /
   path refid=my.axis.classpath /
   /classpath
   complextype
  classname=net.moon.me.five.ws.StringStructure
namespace=${my.namespace} /
   complextype
  classname=net.moon.me.five.ws.CharacterCount
namespace=${my.namespace} /
   /java2wsdl
   /target
   Note that the CharacterCount mapping is included...
  
   The resulting wsdl file, where the complex type detailled
  description is
   missing :
  
   ?xml version=1.0 encoding=UTF-8?
   wsdl:definitions targetNamespace=http://ws.moon.net/j2me05;
   xmlns:impl=http://ws.moon.net/j2me05;
   xmlns:intf=http://ws.moon.net/j2me05;
   xmlns:apachesoap=http://xml.apache.org/xml-soap;
   xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   !--WSDL created by Apache Axis version: 1.2RC2
   Built on Jan 28, 2005 (07:08:29 CET)--
wsdl:types
 schema xmlns=http://www.w3.org/2001/XMLSchema;
   targetNamespace=http://ws.moon.net/j2me05;
  elementFormDefault=qualified
  element name=in0 type=xsd:string/
  element name=reverseReturn type=xsd:string/
  complexType name=StringStructure
   sequence
element name=count type=xsd:int/
element name=string nillable=true type=xsd:string/
   /sequence
  /complexType
  element name=in1 type=impl:StringStructure/
  element name=repeatReturn type=xsd:string/
  element