WSDL code generation weirdness [message #198903] |
Thu, 23 August 2007 11:35  |
Eclipse User |
|
|
|
Hi
I'm trying to generate a web service skeleton for Axis2 using WTP. I've
defined a WSDL which includes a complex Schema type, 'ServiceResult'. I
would like to be able to send back an unlimited number of logs, so I have
modeled the 'log' element with 'maxOccurs="unbounded".
Unfortunately, the code generation fails to produce my return type
properly, and I land up with the following service signature:
---
public java.lang.String[] startService(java.lang.String value)
throws java.rmi.RemoteException
{
return null;
}
---
If I change the multiplicity back to 1 or add another element to the
sequence, I see the correct code generated:
---
public com.xyz.ServiceResult startService(
java.lang.String value) throws java.rmi.RemoteException
{
return null;
}
---
I can't understand why the multiplicity of a contained element has this
effect!?
Many thanks,
Michael
---------------------------------------
<xs:complexType name="ServiceResult">
<xs:annotation>
<xs:documentation>
The result of manipulating a service
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="log" type="xs:string" maxOccurs="unbounded"
minOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="startTime" type="xs:dateTime">
<xs:annotation>
<xs:documentation>
Time service was started
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="endTime" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Time service ended</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
|
|
|
Re: WSDL code generation weirdness [message #198920 is a reply to message #198903] |
Thu, 23 August 2007 15:20  |
Eclipse User |
|
|
|
Michael Marconi wrote:
> Hi
>
> I'm trying to generate a web service skeleton for Axis2 using WTP. I've
> defined a WSDL which includes a complex Schema type, 'ServiceResult'. I
> would like to be able to send back an unlimited number of logs, so I
> have modeled the 'log' element with 'maxOccurs="unbounded".
>
> Unfortunately, the code generation fails to produce my return type
> properly, and I land up with the following service signature:
>
Are you doing document or rpc literal for your WSDL? It would help to
see the WSDL as well.
Dave
|
|
|
Powered by
FUDForum. Page generated in 0.14348 seconds