[ 
https://issues.apache.org/jira/browse/AXIS2-5063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070412#comment-13070412
 ] 

Sagara Gunathunga  commented on AXIS2-5063:
-------------------------------------------

Hi , 

Did you test with latest code base ? 

Please refer my results for the mentioned service. 

Server side - 

public Query testEchoQuery(Query testQuery) {
        String[] str = testQuery.getStr();
        System.out.println(Arrays.asList(str));

        Object[][] val = testQuery.getVal();
        for (Object[] objects : val) {
            System.out.println(Arrays.asList(objects));
        }

        return testQuery;
    }

client side - 
                  Query testQuery10 = new Query();
                  String[] paramStr = { "a", "b"};
                  String[] paramStrVal = { "c", "d"};
                  testQuery10.setStr(paramStr);
                  ArrayOfObject val = new ArrayOfObject();
                  val.setArray(paramStrVal);
                  ArrayOfObject[] paramVal = { val };
                  testQuery10.setVal(paramVal);
                  Query res = stub.testEchoQuery(testQuery10);
                  System.out.println(Arrays.asList(res.getStr()));
                  System.out.println(Arrays.asList(res.getVal()[0].getArray()));


 request - response 

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
      <soapenv:Body>
         <ns3:testEchoQuery xmlns:ns3="http://sample";>
            <ns3:testQuery>
               <ns1:str xmlns:ns1="http://sample/xsd";>a</ns1:str>
               <ns1:str xmlns:ns1="http://sample/xsd";>b</ns1:str>
               <val xmlns="http://sample/xsd";>
                  <array xmlns:s1="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:s2="http://www.w3.org/2001/XMLSchema"; s1:type="s2:string">c</array>
                  <array xmlns:s3="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:s4="http://www.w3.org/2001/XMLSchema"; s3:type="s4:string">d</array>
               </val>
            </ns3:testQuery>
         </ns3:testEchoQuery>
      </soapenv:Body>
   </soapenv:Envelope>


<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
      <soapenv:Body>
         <ns:testEchoQueryResponse xmlns:ns="http://sample";>
            <ns:return xmlns:ax21="http://sample/xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:type="ax21:Query">
               <ax21:str>a</ax21:str>
               <ax21:str>b</ax21:str>
               <ax21:val>
                  <ax21:array xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">c</ax21:array>
                  <ax21:array xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xsi:type="xs:string">d</ax21:array>
               </ax21:val>
            </ns:return>
         </ns:testEchoQueryResponse>
      </soapenv:Body>
   </soapenv:Envelope>


> Provide support for complex object types.
> -----------------------------------------
>
>                 Key: AXIS2-5063
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5063
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.4, 1.6.0
>            Reporter: Muhammed Shariq
>            Assignee: Sagara Gunathunga 
>             Fix For: 1.7.0
>
>
> It is not possible to pass complex type objects via a web service invocation. 
> The following error is thrown while attempting to do so.
> [ERROR] Exception occurred while trying to invoke service method echoArray
> org.apache.axis2.AxisFault: Unknow type 
> {http://www.w3.org/2001/XMLSchema}string
>       at 
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:349)
>       at 
> org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:827)
>       at 
> org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:717)
>       at 
> org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:655)
>       at 
> org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
>       at 
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:206)
>       at 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
>       at 
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>       at 
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
>       at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
>       at 
> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
>       at 
> org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
>       at 
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
>       at 
> org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to