Round3 DoclitParam interop test failed  in Axis2-Client and Axis2-Server
------------------------------------------------------------------------

         Key: AXIS2-222
         URL: http://issues.apache.org/jira/browse/AXIS2-222
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug
  Components: wsdl  
 Environment: Windows XP, Tomcat 5
    Reporter: Gayan Asanka


Hi All,

I generated codes via Axis2 WSDL2Java, for the Round3 , doclitparam interop 
WSDL (Whitemesa). I filled the skelton and deployed the service successfully  
in axis2 server. When i called those operations, I am getting an Exception in 
the Response. Only the echoVoid operation worked succesfully.Other operations ( 
echoString, echoStruct, echoStringArray) failed.

wsdl :- http://www.whitemesa.net/wsdl/r3/interoptestdoclitparameters.wsdl 

Request envelope for echoStringArray:

POST /axis2/services/WSDLInteropTestDocLitParamPortType HTTP/1.1
User-Agent: Axis/2.0
SOAPAction: http://soapinterop.org/
Connection: Keep-Alive
Host: 127.0.0.1
Content-Length: 790
Content-Type: text/xml;charset=UTF-8

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
      <soapenv:Header>
         <wsa:To 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>http://localhost:8030/axis2/services/WSDLInteropTestDocLitParamPortType</wsa:To>
         <wsa:ReplyTo 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
            
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
         </wsa:ReplyTo>
         <wsa:MessageID 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>1126773575843</wsa:MessageID>
      </soapenv:Header>
      <soapenv:Body>
         <echoStringArray xmlns="http://soapinterop.org/xsd";>
            <param0>
               <string>String 1</string>
               <string>String 2 </string>
               <string>String 3</string>
            </param0>
         </echoStringArray>
      </soapenv:Body>
   </soapenv:Envelope>

 
Response for above req:

HTTP/1.1 500 Internal Server Error
Set-Cookie: JSESSIONID=8D904D17974AC484A5D90A7501F6D5F5; Path=/axis2
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 15 Sep 2005 08:39:35 GMT
Server: Apache-Coyote/1.1
Connection: close

12ef

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
      <soapenv:Header/>
      <soapenv:Body>
         <soapenv:Fault>
            <faultcode>Client</faultcode>
            <faultstring>null; nested exception is: 
&#9;org.apache.xmlbeans.impl.values.XmlValueNotNillableException; nested 
exception is: &#9;org.apache.axis2.AxisFault: null; nested exception is: 
&#9;org.apache.xmlbeans.impl.values.XmlValueNotNillableException</faultstring>
            <faultactor>http://myAxisServer/role/default</faultactor>
            <detail>
               <soapenv:Exception>org.apache.axis2.AxisFault: null; nested 
exception is: &#9;org.apache.xmlbeans.impl.values.XmlValueNotNillableException; 
nested exception is: &#9;org.apache.axis2.AxisFault: null; nested exception is: 
&#9;org.apache.xmlbeans.impl.values.XmlValueNotNillableException&#13;&#9;at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:200)&#13;&#9;at
 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:178)&#13;&#9;at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:709)&#13;&#9;at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)&#13;&#9;at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)&#13;&#9;at
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)&#13;&#9;at
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)&#13;&#9;at
 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)&#13;&#9;at
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)&#13;&#9;at
 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)&#13;&#9;at
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)&#13;&#9;at
 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)&#13;&#9;at
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)&#13;&#9;at
 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)&#13;&#9;at
 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)&#13;&#9;at
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)&#13;&#9;at
 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)&#13;&#9;at
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)&#13;&#9;at
 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&#13;&#9;at
 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)&#13;&#9;at
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)&#13;&#9;at
 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)&#13;&#9;at
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)&#13;&#9;at
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)&#13;&#9;at
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)&#13;&#9;at
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)&#13;&#9;at
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)&#13;&#9;at
 java.lang.Thread.run(Thread.java:534)&#13;Caused by: 
org.apache.axis2.AxisFault: null; nested exception is: 
&#9;org.apache.xmlbeans.impl.values.XmlValueNotNillableException&#13;&#9;at 
org.apache.axis2.AxisFault.makeFault(AxisFault.java:75)&#13;&#9;at 
codegen.WSDLInteropTestDocLitPortTypeMessageReceiver.invokeBusinessLogic(WSDLInteropTestDocLitPortTypeMessageReceiver.java:138)&#13;&#9;at
 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:72)&#13;
&#9;at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:141)&#13;
&#9;at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:194)&#13;
&#9;... 27 more&#13;
Caused by: org.apache.xmlbeans.impl.values.XmlValueNotNillableException&#13;
&#9;at 
org.apache.xmlbeans.impl.values.XmlObjectBase.setNil(XmlObjectBase.java:678)&#13;
&#9;at 
org.apache.xmlbeans.impl.values.XmlObjectBase.set(XmlObjectBase.java:1898)&#13;
&#9;at 
org.soapinterop.xsd.impl.EchoStringArrayResponseDocumentImpl$EchoStringArrayResponseImpl.setReturn(EchoStringArrayResponseDocumentImpl.java:125)&#13;
&#9;at 
codegen.WSDLInteropTestDocLitPortTypeSkeleton.echoStringArray(WSDLInteropTestDocLitPortTypeSkeleton.java:33)&#13;
&#9;at 
codegen.WSDLInteropTestDocLitPortTypeMessageReceiver.invokeBusinessLogic(WSDLInteropTestDocLitPortTypeMessageReceiver.java:67)&#13;
&#9;... 30 more&#13;
</soapenv:Exception>
            </detail>
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>
0

Skelton codes:

public class WSDLInteropTestDocLitPortTypeSkeleton {
    /**
     * Auto generated method signature
     *
     * @param param0
     */
    public org.soapinterop.xsd.EchoVoidResponseDocument echoVoid
            (org.soapinterop.xsd.EchoVoidDocument param0) {
        EchoVoidResponseDocument.EchoVoidResponse voidRes = 
EchoVoidResponseDocument.EchoVoidResponse.Factory.newInstance();
        EchoVoidResponseDocument retDoc = 
EchoVoidResponseDocument.Factory.newInstance();
        retDoc.setEchoVoidResponse(voidRes);
        return retDoc;
    }


    /**
     * Auto generated method signature
     *
     * @param param2
     */
    public org.soapinterop.xsd.EchoStringArrayResponseDocument echoStringArray
            (org.soapinterop.xsd.EchoStringArrayDocument param2) {
        ArrayOfstringLiteral inArrayofLit = 
param2.getEchoStringArray1().getParam0();
        String[] inArray = inArrayofLit.getStringArray();
        String[] retArray = new String[inArray.length];
        for(int i=0;i<inArray.length;i++){
            retArray[i]=inArray[i];
        }
        ArrayOfstringLiteral retArrLit = 
ArrayOfstringLiteral.Factory.newInstance();
        retArrLit.setStringArray(retArray);
        EchoStringArrayResponseDocument.EchoStringArrayResponse arryRes = 
EchoStringArrayResponseDocument.EchoStringArrayResponse.Factory.newInstance();
        arryRes.setReturn(retArrLit);
        EchoStringArrayResponseDocument retDoc = 
EchoStringArrayResponseDocument.Factory.newInstance();
        retDoc.setEchoStringArrayResponse(arryRes);
        return retDoc;
    }


    /**
     * Auto generated method signature
     *
     * @param param4
     */
    public org.soapinterop.xsd.EchoStructResponseDocument echoStruct
            (org.soapinterop.xsd.EchoStructDocument param4) {
        SOAPStruct inSoapStruct = param4.getEchoStruct().getParam0();
        SOAPStruct retSoapStruct = SOAPStruct.Factory.newInstance();
        retSoapStruct.setVarFloat(inSoapStruct.getVarFloat());
        retSoapStruct.setVarInt(inSoapStruct.getVarInt());
        retSoapStruct.setVarString(inSoapStruct.getVarString());
        EchoStructResponseDocument.EchoStructResponse structRes = 
EchoStructResponseDocument.EchoStructResponse.Factory.newInstance();
        structRes.setReturn(retSoapStruct);
        EchoStructResponseDocument retDoc = 
EchoStructResponseDocument.Factory.newInstance();
        retDoc.setEchoStructResponse(structRes);
        return retDoc;
    }


    /**
     * Auto generated method signature
     *
     * @param param6
     */
    public org.soapinterop.xsd.EchoStringResponseDocument echoString
            (org.soapinterop.xsd.EchoStringDocument param6) {
        String str =param6.getEchoString().getParam0();
        EchoStringResponseDocument.EchoStringResponse strRes = 
EchoStringResponseDocument.EchoStringResponse.Factory.newInstance();
        strRes.setReturn(str);
        EchoStringResponseDocument retDoc = 
EchoStringResponseDocument.Factory.newInstance();
        retDoc.setEchoStringResponse(strRes);
        return retDoc;
    }

}

Client Codes:

WSDLInteropTestDocLitPortTypeStub stub = new 
WSDLInteropTestDocLitPortTypeStub();

String[] strArray = {"String 1","String 2", "String 3"};
            ArrayOfstringLiteral strLitArry = 
ArrayOfstringLiteral.Factory.newInstance();
            strLitArry.setStringArray(strArray);
            EchoStringArrayDocument.EchoStringArray strArry = 
EchoStringArrayDocument.EchoStringArray.Factory.newInstance();
            strArry.setParam0(strLitArry);
            EchoStringArrayDocument arryDoc = 
EchoStringArrayDocument.Factory.newInstance();
            arryDoc.setEchoStringArray1(strArry);
            System.out.println(stub.echoStringArray(arryDoc));

Gayan Asanka

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to