Hi Danushka, It seems there is an issue in the sample code provided under docs. As mentioned in the description, you need specify it as "SOAPHeaders" property, not HTTPHeaders property.
/Ruchira On Wed, Oct 1, 2014 at 6:12 PM, Danushka Fernando <danush...@wso2.com> wrote: > Hi all > I was trying to do $subject as mentioned in [1]. > According to [1] > > > - SOAPHeaders - Used to specify custom SOAP headers to be send along > with the SOAP message. This should be an array of elements. You can specify > a header as an XML object or just as an object in the following structure. > valueObject could be either a String or an XML object > > options["HTTPHeaders"] = [ > <MyHeader1 xmlns="http://example.com">headerValue</MyHeader1>, > ... > {qName : new QName("http://example.com", "MyHeader2"), value : > valueObject}, > ... > ]; > > > So I wrote following code. > > var mutualAuthHeader = {qName : new > QName(MUTUALSSL_HEADER_USERNAME_URL, "UserName", "tns"), value : username}; > httpHeaders.push(mutualAuthHeader); > options["HTTPHeaders"] = httpHeaders; > > > But when I call the service it fails with following error. > > TID: [0] [Carbon] [2014-10-01 18:03:39,059] ERROR > {org.jaggeryjs.modules.ws.WSRequestHostObject} - Invalid declaration for > HTTPHeaders property {org.jaggeryjs.modules.ws.WSRequestHostObject} > > > Any ideas? Am I doing something wrong or don't jaggery support this > feature. We are using the version 0.9.0.ALPHA4_wso2v6. > > > [1] http://jaggeryjs.org/documentation.jag?api=ws > > Thanks & Regards > Danushka Fernando > Software Engineer > WSO2 inc. http://wso2.com/ > Mobile : +94716332729 > -- *Ruchira Wageesha**Associate Technical Lead* *WSO2 Inc. - lean . enterprise . middleware | wso2.com <http://wso2.com>* *email: ruch...@wso2.com <ruch...@wso2.com>, blog: ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>, mobile: +94 77 5493444*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev