Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 80196 invoked from network); 17 Aug 2007 09:13:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Aug 2007 09:13:02 -0000 Received: (qmail 63370 invoked by uid 500); 17 Aug 2007 09:12:59 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 63359 invoked by uid 500); 17 Aug 2007 09:12:59 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 63348 invoked by uid 99); 17 Aug 2007 09:12:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2007 02:12:59 -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 jayawark@gmail.com designates 209.85.198.187 as permitted sender) Received: from [209.85.198.187] (HELO rv-out-0910.google.com) (209.85.198.187) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2007 09:12:54 +0000 Received: by rv-out-0910.google.com with SMTP id c24so381278rvf for ; Fri, 17 Aug 2007 02:12:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=B68xTyNc3fUniETXFGSWwKYR8kKTx2FBMfVx89Cl4S3PRD9KkQY7E1tJpi9LVgTWJQgK30Ykz0G/ZstG1Xdzbvl+FgFSk43vUSBOUlJNws+LvJulrLl3Jo6fDfu7YQGpPo8ljxonfF34TFUbKy1Gb+7Om1rV2DssNV94tlAteDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=twIxuqDLSVudsxkR/GOMuLskogv0dYr13IlwtbUUCPAkcbt3MA3fd1b9HqonC9aSKRbphzeIrj7VMu74iHJrkGoHtHN8Yx24foeRKgoGe8r4jd7ltV+wsYWCEhf/s33/lugjEbMhM52Ao4Vn0F57vfnKXEPRJtYylAJNhuZLwx0= Received: by 10.141.160.9 with SMTP id m9mr1157698rvo.1187341953408; Fri, 17 Aug 2007 02:12:33 -0700 (PDT) Received: by 10.141.163.8 with HTTP; Fri, 17 Aug 2007 02:12:33 -0700 (PDT) Message-ID: <5e8118f30708170212i6b7f0d62y1550f9326b856636@mail.gmail.com> Date: Fri, 17 Aug 2007 14:42:33 +0530 From: "Nandika Jayawardana" To: "Apache AXIS C User List" Subject: Re: SOAP fault builder In-Reply-To: <489947c0708161916m7d5fdb23jc32313f14771a68a@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28091_4870713.1187341953370" References: <489947c0708161916m7d5fdb23jc32313f14771a68a@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_28091_4870713.1187341953370 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Subra, You can create a soap11 fault using following lines. int soap_version = AXIOM_SOAP11; soap_envelope = axiom_soap_envelope_create_default_soap_envelope (env, soap_version); soap_body = axiom_soap_envelope_get_body(soap_envelope, env); soap_fault = axiom_soap_fault_create_default_fault (env, soap_body, "fault code" , "fault reason", soap_version); axis2_msg_ctx_set_fault_soap_envelope(msg_ctx, env, soap_envelope); You can set the fault to the msg_ctx and it will be returned to the client. Regards Nandika On 8/17/07, Subra A Narayanan wrote: > > Hello folks, > > I am trying ti build a SOAP1.1 fault and return to the ws client. I am > having some difficulty understanding how to go about this. I have tryng to > dig through the source code but was wondering if you guys have some sample > code. If you have it that would be very helpful in understanding the usage. > > In the meantime I will continue to dig through the source code to try to > understand. > > Thanks as usual! > > Subra > -- nandika@wso2.com WSO2 Inc: http://www.wso2.com ------=_Part_28091_4870713.1187341953370 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi Subra,
 
You can create a soap11 fault using following lines.
 
int soap_version = AXIOM_SOAP11;

soap_envelope = axiom_soap_envelope_create_default_soap_envelope (env, soap_version);

soap_body = axiom_soap_envelope_get_body(soap_envelope, env);

soap_fault = axiom_soap_fault_create_default_fault (env, soap_body, "fault code" , "fault reason"

, soap_version);

axis2_msg_ctx_set_fault_soap_envelope(msg_ctx, env, soap_envelope);

You can set the fault to the msg_ctx and it will be returned to the client.

Regards

Nandika



 
On 8/17/07, Subra A Narayanan <aswathsn@gmail.com> wrote:
Hello folks,
 
I am trying ti build a SOAP1.1 fault and return to the ws client. I am having some difficulty understanding how to go about this. I have tryng to dig through the source code but was wondering if you guys have some sample code. If you have it that would be very helpful in understanding the usage.
 
In the meantime I will continue to dig through the source code to try to understand.
 
Thanks as usual!
 
Subra



--
nandika@wso2.com
WSO2 Inc: http://www.wso2.com ------=_Part_28091_4870713.1187341953370--