Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » WSDL code generation weirdness
WSDL code generation weirdness [message #198903] Thu, 23 August 2007 15:35 Go to next message
Michael Marconi is currently offline Michael Marconi
Messages: 4
Registered: July 2009
Junior Member
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 19:20 Go to previous message
David Carver is currently offline David Carver
Messages: 174
Registered: July 2009
Senior Member
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
Previous Topic:scanning for tasks
Next Topic:Best Practice: Custom Publishing
Goto Forum:
  


Current Time: Tue Oct 21 04:05:04 GMT 2014

Powered by FUDForum. Page generated in 0.06923 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software