Your makeCall() method has a reference to serviceClient. 

HTH,
Robert
http://www.braziloutsource.com/

Em Sexta 17 Março 2006 06:55, o Filipp Akinfiev escreveu:
> the method finalizeInvoke(MessageContent) or finalize() is not visible from
> my class...
>
> Am Freitag 17 März 2006 05:10 schrieb Deepal Jayasinghe:
> > you can call;
> >
> > serviceClient.finalizeInvoke();
> >
> > Filipp Akinfiev wrote:
> > >Hi all,
> > >in my client class  i have function like :
> > >  public TFileSendResponse storeFile(int type, String fileName, String
> > >pathToFile) {
> > >           TFileSendResponse response = null;
> > >           try {
> > >                   response = 
> > > FileSend.response(makeCall(FileSend.request(new
> > > TFileSend("", "", type, fileName, pathToFile)), "storeFile"));
> > >           } catch (Exception e) {
> > >                   e.printStackTrace();
> > >           }
> > >           return response;
> > >   }
> > >
> > >it's call function makeCall:
> > >
> > >    private MessageContext makeCall(MessageContext requestContext,
> > > String action) {
> > >           ServiceClient client;
> > >           MessageContext result = null;
> > >           try {
> > >                   // creating the Service
> > >                   AxisService service = new AxisService("IXMLWS2");
> > >
> > >                   // creating the operations
> > >                   AxisOperation operation = new OutInAxisOperation();
> > >                   operation.setName(new
> > >javax.xml.namespace.QName("urn:XMLWSIntf-IXMLWS", action));
> > >                   service.addOperation(operation);
> > >                   client = new ServiceClient(new
> > >ConfigurationContextFactory().createConfigurationContextFromFileSystem(A
> > >XI S2_HOME), service);
> > >                   client.getOptions().setTo(targetEPR);
> > >                   
> > > client.getOptions().setSoapAction("urn:XMLWSIntf2-IXMLWS2#" +
> > > action); client.getOptions().setExceptionToBeThrownOnSOAPFault(true);
> > > client.getOptions().setTransportInProtocol(Constants.TRANSPORT_TCP);
> > >
> > >client.getOptions().setProperty(org.apache.axis2.context.MessageContextC
> > >on stants.CHUNKED,org.apache.axis2.Constants.VALUE_FALSE);
> > > client.getOptions().setProperty(Constants.Configuration.ENABLE_MTOM,
> > > Constants.VALUE_TRUE);
> > >
> > >                   OperationClient opClient = client.createClient(new
> > >javax.xml.namespace.QName("urn:XMLWSIntf-IXMLWS", action));
> > >
> > >                   opClient.addMessageContext(requestContext);
> > >                   opClient.execute(true);
> > >
> > >                   return
> > > opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); }
> > > catch (AxisFault e) {
> > >                   e.printStackTrace();
> > >           }
> > >           return result;
> > >    }
> > >
> > >after execute, i have open connection to axis server, how can i
> > > terminate it ?
> > >
> > >thanks in advance!

-- 

Reply via email to