[ 
https://issues.apache.org/jira/browse/AXIS-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oilid Adsi closed AXIS-2616.
----------------------------

    Resolution: Won't Fix

No one of the apache-team seems to solve this problem!

> download of a big soap-attachment hangs always at the second time on a 
> WSDL2Java generated client
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2616
>                 URL: https://issues.apache.org/jira/browse/AXIS-2616
>             Project: Axis
>          Issue Type: Bug
>    Affects Versions: 1.3, 1.4
>         Environment: windows XP / linux (debian) / Java 1.5.0_08 and 1.5.0_10
>            Reporter: Oilid Adsi
>         Attachments: attachment.zip
>
>
> The download of a soap-attachment with 8,5 MB size (zip-file) runs the first 
> time correctly but every second attempt hangs.
> In this case the download will not terminate (hanging on the return of the 
> datahandler-type). With a small attachment (e.g. 100kb) this problem will not 
>  appear. This described scenario belongs to a with WSDL2Java generated client.
> If a dynamic axis-client (own instance of axis-service- and call-object) is 
> used this whole problem doesn't appear even if the attachment has that big 
> size as described above.
> Can somebody gives a solution to this problem? Is this a bug?
> Thanks!
> Here are code-samples and the WSDL to reproduce:
> // $Id$
> package de.freenet.whitelabel.test;
> import java.io.File;
> import java.net.URL;
> import javax.activation.DataHandler;
> import javax.xml.namespace.QName;
> import javax.xml.rpc.ParameterMode;
> import junit.framework.TestCase;
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> import org.apache.axis.constants.Style;
> import org.apache.axis.constants.Use;
> import org.apache.axis.encoding.ser.BeanDeserializerFactory;
> import org.apache.axis.encoding.ser.BeanSerializerFactory;
> import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
> import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
> import org.apache.log4j.Logger;
> import de.freenet.soapclients.micos.attachment.beans.RAPSearchCondition;
> import 
> de.freenet.soapclients.micos.attachment.exceptions.GenericServerException;
> import 
> de.freenet.soapclients.micos.attachment.service.AttachmentServiceImplServiceLocator;
> import 
> de.freenet.soapclients.micos.attachment.service.AttachmentServiceSoapBindingStub;
> import de.freenet.whitelabel.hivemind.ISSLConfigurationService;
> import de.freenet.whitelabel.util.HiveMindServices;
> /**
>  * <p>testing micos-attachment-service</p>
>  *
>  * <p>Copyright by freenet.de AG, 2006. All rights reserved.</p>
>  */
> public class MicosAttachmentServiceTest extends TestCase {
>       private static final Logger logger = 
> Logger.getLogger(MicosAttachmentServiceTest.class);
>       private DataHandler dataHandler;
>       private final String endpointAddress = 
> "https://195.4.64.13:8443/axis/services/AttachmentService";;
>       private final static int TIME_OUT = 3300000;
>       public void setUp() {
>               ((ISSLConfigurationService) 
> HiveMindServices.getInstance().getService(ISSLConfigurationService.class)).configure();
>       }
>       
>       /**
>        * this client is not working for big attachments (8,5 MB)
>        * on the second attempt
>        */
>       public void testReadAllPersons() {
>               
>               RAPSearchCondition searchCondition = new RAPSearchCondition();
>               try {
>                       AttachmentServiceSoapBindingStub _micosService = 
> (AttachmentServiceSoapBindingStub) new 
> AttachmentServiceImplServiceLocator().getAttachmentService(new 
> URL(endpointAddress));
>                       _micosService.setTimeout(TIME_OUT);
>                       for (int i = 0; i <= 2; i++) {
>                               logger.info("starting method readAllPersons[" + 
> i + "]");
>                               dataHandler = 
> _micosService.readAllPersons(searchCondition);
>                               File f = new File(dataHandler.getName());
>                               logger.info("downloaded file " + 
> f.getAbsolutePath());
>                               logger.info("execution of readAllPersons[" + i 
> + "] finished");
>                       }
>               } catch (Exception e) {
>                       e.printStackTrace();
>                       fail(e.getMessage());
>               }
>       }
>       
>       /**
>        * this client is working for every attempt
>        */
>       public void testReadAllPersonsDynamic() {
>               RAPSearchCondition searchCondition = new RAPSearchCondition();
>               
>               QName qnDh = new QName("http://xml.apache.org/xml-soap";, 
> "DataHandler");
>               QName qnEx = new QName("http://pool.connection.javora";, 
> "GenericServerException");
>               QName qnRs = new QName("http://core.bo.unionall";, 
> "RAPSearchCondition");
>               QName qnFa = new QName("", "fault");
>               Service service = new Service();
>               try {
>                       Call call = (Call) service.createCall();
>                       call.setTargetEndpointAddress(new URL(endpointAddress));
>                       call.setOperationName("readAllPersons");
>                       call.setReturnType(qnDh, DataHandler.class);
>                       call.registerTypeMapping(DataHandler.class, qnDh, 
> JAFDataHandlerSerializerFactory.class, 
> JAFDataHandlerDeserializerFactory.class);
>                       call.registerTypeMapping(GenericServerException.class, 
> qnEx, BeanSerializerFactory.class, BeanDeserializerFactory.class, false);
>                       call.addFault(qnFa, GenericServerException.class, qnEx, 
> true);
>                       call.setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT, 
> Call.ATTACHMENT_ENCAPSULATION_FORMAT_MIME);
>                       call.setProperty(Call.SEND_TYPE_ATTR, "false");
>                       call.setOperationStyle(Style.RPC);
>                       call.setOperationUse(Use.LITERAL);
>                       call.addParameter("searchCondition", qnRs, 
> RAPSearchCondition.class, ParameterMode.IN);
>                       call.registerTypeMapping(RAPSearchCondition.class, 
> qnRs, BeanSerializerFactory.class, BeanDeserializerFactory.class, false);
>                       call.setTimeout(TIME_OUT);
>                       for (int i = 0; i <= 2; i++) {
>                               logger.info("starting method readAllPersons[" + 
> i + "]");
>                               dataHandler = (DataHandler) call.invoke(new 
> Object[] { searchCondition });
>                               File f = new File(dataHandler.getName());
>                               logger.info("downloaded file " + 
> f.getAbsolutePath());
>                               logger.info("execution of readAllPersons[" + i 
> + "] finished");
>                       }
>               } catch (Exception e) {
>                       e.printStackTrace();
>                       fail(e.getMessage());
>               }
>       }
> }
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://ws.micos"; 
> xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
> xmlns:impl="http://ws.micos"; xmlns:intf="http://ws.micos"; 
> xmlns:tns1="http://core.bo.unionall"; 
> xmlns:tns2="http://pool.connection.javora"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> <!--WSDL created by Apache Axis version: 1.4
> Built on Apr 22, 2006 (06:55:48 PDT)-->
>  <wsdl:types>
>   <schema targetNamespace="http://ws.micos"; 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="http://xml.apache.org/xml-soap"/>
>    <import namespace="http://pool.connection.javora"/>
>    <import namespace="http://core.bo.unionall"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="ArrayOf_xsd_string">
>     <sequence>
>      <element maxOccurs="unbounded" minOccurs="0" name="item" 
> type="xsd:string"/>
>     </sequence>
>    </complexType>
>   </schema>
>   <schema targetNamespace="http://core.bo.unionall"; 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="http://xml.apache.org/xml-soap"/>
>    <import namespace="http://pool.connection.javora"/>
>    <import namespace="http://ws.micos"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="RAPSearchCondition">
>     <sequence>
>      <element name="channels" nillable="true" type="impl:ArrayOf_xsd_string"/>
>      <element name="companyName" nillable="true" type="xsd:string"/>
>      <element name="dobEnd" nillable="true" type="xsd:dateTime"/>
>      <element name="dobStart" nillable="true" type="xsd:dateTime"/>
>      <element name="firstName" nillable="true" type="xsd:string"/>
>      <element name="identifiers" nillable="true" 
> type="impl:ArrayOf_xsd_string"/>
>      <element name="lastName" nillable="true" type="xsd:string"/>
>      <element name="login" nillable="true" type="xsd:string"/>
>      <element name="personTypes" nillable="true" 
> type="impl:ArrayOf_xsd_string"/>
>      <element name="states" nillable="true" type="impl:ArrayOf_xsd_string"/>
>      <element name="statusEnd" nillable="true" type="xsd:dateTime"/>
>      <element name="statusStart" nillable="true" type="xsd:dateTime"/>
>     </sequence>
>    </complexType>
>   </schema>
>   <schema targetNamespace="http://pool.connection.javora"; 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="http://xml.apache.org/xml-soap"/>
>    <import namespace="http://ws.micos"/>
>    <import namespace="http://core.bo.unionall"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="GenericServerException">
>     <sequence>
>      <element name="code" type="xsd:int"/>
>      <element name="serverMessage" nillable="true" type="xsd:string"/>
>     </sequence>
>    </complexType>
>   </schema>
>  </wsdl:types>
>    <wsdl:message name="GenericServerException">
>       <wsdl:part name="fault" type="tns2:GenericServerException"/>
>    </wsdl:message>
>    <wsdl:message name="readAllPersonsRequest">
>       <wsdl:part name="searchCondition" type="tns1:RAPSearchCondition"/>
>    </wsdl:message>
>    <wsdl:message name="readAllPersonsResponse">
>       <wsdl:part name="readAllPersonsReturn" type="apachesoap:DataHandler"/>
>    </wsdl:message>
>    <wsdl:portType name="AttachmentServiceImpl">
>       <wsdl:operation name="readAllPersons" parameterOrder="searchCondition">
>          <wsdl:input message="impl:readAllPersonsRequest" 
> name="readAllPersonsRequest"/>
>          <wsdl:output message="impl:readAllPersonsResponse" 
> name="readAllPersonsResponse"/>
>          <wsdl:fault message="impl:GenericServerException" 
> name="GenericServerException"/>
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="AttachmentServiceSoapBinding" 
> type="impl:AttachmentServiceImpl">
>       <wsdlsoap:binding style="rpc" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
>       <wsdl:operation name="readAllPersons">
>          <wsdlsoap:operation soapAction=""/>
>          <wsdl:input name="readAllPersonsRequest">
>             <wsdlsoap:body namespace="http://ws.micos"; use="literal"/>
>          </wsdl:input>
>          <wsdl:output name="readAllPersonsResponse">
>             <wsdlsoap:body namespace="http://ws.micos"; use="literal"/>
>          </wsdl:output>
>          <wsdl:fault name="GenericServerException">
>             <wsdlsoap:fault name="GenericServerException" use="literal"/>
>          </wsdl:fault>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="AttachmentServiceImplService">
>       <wsdl:port binding="impl:AttachmentServiceSoapBinding" 
> name="AttachmentService">
>          <wsdlsoap:address 
> location="https://195.4.64.13:8443/axis/services/AttachmentService"/>
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
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