[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-java-user
Subject:    [wsf-java-user] How can I return complex data structure and
From:       dnldyang () yahoo ! com (donaldyy)
Date:       2007-01-03 20:16:18
Message-ID: listhandler=12&site=wso2.org&nid=461&pid=&cid=&uid=482&tid=&0353ab4cbed5beae847a7ff6e220b5cf () wso2 ! org
[Download RAW message or body]


I know I can achieve that using AXIOM, for example,public class Service1{??? .....??? \
public OMElement method1(...)???? {??? ??? //construct return OMElement for the \
complex data structure and attachment???????  OMElement returnElement; ?????? \
.....???????? return returnElement??? }?}? But the data type of method1Response \
in the generated WSDL is anyType, this will make third party developer difficulty to \
use my web service as he doesn't know what the method will return. One \
possible alternative way is return one java class object, not OMElement, for \
example,public class Method1Response{??? int i1;??? double d1;??? ....? }?public \
class Service1{??? ....??? public Method1Response method1(...)??? {??? ??? ....??? \
??? //construct Method1Response object and return it???  ???? .... ??? }???? \
....?}? But I don't how to set the data type of attachment variable in the \
class Method1Response,?if the data type of attachment variable? is FILE, one \
exception will be thrown out.if the data type of attachement varible is OMText,? the \
binary data is sent by value, not by reference. And if the size of attachment is big, \
the following exception is thrown,?org.apache.axis2.transport.http.AxisServlet \
doPostInfo: org.apache.axis2.AxisFault: null; nested exception \
is:com.ctc.wstx.exe.WstxIOException: null could anyone give me help or refer \
some documents for me? many thanks in advance. best \
regardsdonald?    


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic