Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74605 invoked from network); 5 May 2008 08:03:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 May 2008 08:03:30 -0000 Received: (qmail 11266 invoked by uid 500); 5 May 2008 08:03:23 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 11245 invoked by uid 500); 5 May 2008 08:03:23 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 11163 invoked by uid 99); 5 May 2008 08:03:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 01:03:22 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pjinsc@gmail.com designates 209.85.198.249 as permitted sender) Received: from [209.85.198.249] (HELO rv-out-0708.google.com) (209.85.198.249) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 08:02:37 +0000 Received: by rv-out-0708.google.com with SMTP id c5so859095rvf.28 for ; Mon, 05 May 2008 01:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=KW6k+GmoXw+BjPsOCN6TiqRg1XWaJjufzAtLG+VAyi4=; b=jT0KIJQPx7Gg1JkE8yM9DD8VStqLy/w4vqrkJq2BKcge3e38tekQCiYy9oXrOdfuz+W6dNr8Ol7JsMo+AlIh65EMW/VOUzckHWWl5YSuZfYOQhOBDwxvbQ8Oxrbz8/6UtuO/T8fBi/PPhO+rWUNiZhIZ4dBESbtVIhHotrvpsMQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=srFqEbyMicM9MlkNawAeb8F8IoQ0vnRV/EiqPhnFZa6MXRqOkoKGo6wMqnTz8RKmt1y1HjxaNvtQkMmag6udIbmg7NlqlF3XQKYFS1Hc05XQbaIyXauqxZqjrZKThMW6BTxj1tLigHMlvqgSdcYC3nu79aRh3ECoqi3QxPvWquw= Received: by 10.141.63.20 with SMTP id q20mr2661708rvk.291.1209974571923; Mon, 05 May 2008 01:02:51 -0700 (PDT) Received: by 10.141.33.4 with HTTP; Mon, 5 May 2008 01:02:51 -0700 (PDT) Message-ID: Date: Mon, 5 May 2008 10:02:51 +0200 From: "Paulo Carvalho" To: axis-user@ws.apache.org Subject: OMException: Error while writing to the OutputStream (Tomcat + WS Vs Standalone application) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13340_33309949.1209974571884" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13340_33309949.1209974571884 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello I am having a problem with a web service. I have a web service deployed in a tomcat server. This web service make some stuff and also calls another web service. Here is the code used by my web service calling the other web service: Options options = new Options(); EndpointReference targetEPR = new EndpointReference(sURL); options.setTo(targetEPR); options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_SWA, org.apache.axis2.Constants.VALUE_TRUE); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTimeOutInMilliSeconds(5000); options.setProperty(HTTPConstants.CHUNKED, false); options.setAction("urn:process"); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP); MessageContext mc = new MessageContext(); SOAPFactory fac = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope env = fac.getDefaultEnvelope(); OMNamespace omNs = fac.createOMNamespace(Paths.WS_NAMESPACE, "swa"); OMElement uploadFile = fac.createOMElement("process", omNs); OMElement nameEle = fac.createOMElement("message", omNs); nameEle.setText(sMessage); uploadFile.addChild(nameEle); env.getBody().addChild(uploadFile); mc.setEnvelope(env); mepClient.addMessageContext(mc); logger.debug("(callWS) before"); mepClient.execute(true); --> Line where the OMException is thrown ("OMException: Error while writing the OutputStream") I also have this code on a standalone Java Application. The code is exactly the same and the web service call works fine. The differences here between the 2 approaches are: - In the first solution the presented code is executed by a web service. In the second solution the code is executed by a standalone java application - In the first solution the first web service is deployed on a tomcat server. Anyone can help me to solve this problem? Thanks Best regards ------=_Part_13340_33309949.1209974571884 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello
 
I am having a problem with a web service.
I have a web service deployed in a tomcat server. This web service make some stuff and also calls another web service.
Here is the code used by my web service calling the other web service:
 

Options options = new Options();
EndpointReference targetEPR = new EndpointReference(sURL);
options.setTo(targetEPR);
          
options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_SWA, org.apache.axis2.Constants.VALUE_TRUE);
options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
options.setTimeOutInMilliSeconds(5000);
options.setProperty(HTTPConstants.CHUNKED, false);
options.setAction("urn:process");
ServiceClient sender = new ServiceClient();
sender.setOptions(options);

OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP);
MessageContext mc = new MessageContext();
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope env = fac.getDefaultEnvelope();
OMNamespace omNs = fac.createOMNamespace(Paths.WS_NAMESPACE, "swa");
OMElement uploadFile = fac.createOMElement("process", omNs);
OMElement nameEle = fac.createOMElement("message", omNs);
nameEle.setText(sMessage);
uploadFile.addChild(nameEle);
env.getBody().addChild(uploadFile);
mc.setEnvelope(env);
          
mepClient.addMessageContext(mc);
logger.debug("(callWS) before");
mepClient.execute(true);         --> Line where the OMException is thrown ("OMException: Error while writing the OutputStream")

 

I also have this code on a standalone Java Application. The code is exactly the same and the web service call works fine. The differences here between the 2 approaches are:

  - In the first solution the presented code is executed by a web service. In the second solution the code is executed by a standalone java application

  - In the first solution the first web service is deployed on a tomcat server.

 

Anyone can help me to solve this problem?

Thanks

Best regards
------=_Part_13340_33309949.1209974571884--