BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 04-25-2008, 07:45 AM   #1 (permalink)
New Member
Join Date: Apr 2008
Model: 8800
Carrier: Airtel
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Soap header using ksoap

Please Login to Remove!

we have a requirement here where your guidance is required. We are communicating to a server using web services, for adding and searching data through web services we are using a third party tool KSOAP. Now for updating data the server needs some credentials to be added, i.e. we need to add and soap header with the credentials to an existing soap envelope using KSOAP. Can you help us in this matter in how to add this soap header with the credentials programmatically in blackberry jde.

There is a third party tool XML altova in which we added the header manually and tested the update functionality, now this should be achieved in the Blackberry device.

Soap Input:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="">

<soapenv:Header xmlns:soapenv="">
<wsse:Security soap:mustUnderstand="1" xmlns:soap="" xmlns:wsse="">
<wsse:Username>40084 </wsse:Username>

<m:Updatedata__CompIntfc__SC_LEADCRE_TEST xmlns:m="">

*Red color lines i have included manually

Soap Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:soapenc="" xmlns:xsd="" xmlns:xsi="">
<m:Updatedata__CompIntfc__SC_LEADCRE_TESTRespons e xmlns:m="">

These are the files input and response Soap envelopes for your reference.

I have chked with ksoap api's and foung writeheader and header out...but unable to implement...can anyone help how add these header's

SoapObject rpc = new SoapObject("", "Updatedata__CompIntfc__SC_LEADCRE_TEST");
//rpc.setProperty("USename", "Basic " + login);
rpc.addProperty("PERSON_ID ",sales_user_name);
rpc.addProperty("NAME1", name_1);
rpc.addProperty("LEAD_RATING ",lead_rating);
rpc.addProperty("EST_REVENUE" ,est_revenue);
rpc.addProperty("SC_CONTRACT_ST", contract_stts);

SoapSerializationEnvelope envelope1 = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope1.bodyOut = rpc;
// envelope1.writeHeader(writer);

// Making webservice call

HttpTransport http = new HttpTransport("");
String s=http.requestDump;"LeadUpdateAct.V1", envelope1);

SoapObject result = (SoapObject)envelope1.bodyIn;

updtestatus=result.getProperty("notification").toS tring();

wsdl file given:
<?xml version="1.0" ?>
- <wsdl:definitions name="CI_SC_HANDL_CI.1" targetNamespace=" Get.1" xmlns:M213833.V1="" xmlns:M357026.V1="" xmlns:M972859.V1="" xmlns:plnk="" xmlns:soap="" xmlns:tns=" Get.1" xmlns:wsdl="" xmlns:wsp="">
<wsp:UsagePolicy wsdl:Required="true" />
- <plnk:partnerLinkType name="CI_SC_HANDL_CI_PartnerLinkType">
- <plnk:role name="CI_SC_HANDL_CI_Provider">
<plnk:portType name="tns:CI_SC_HANDL_CI_PortType" />
- <wsdl:types>
- <xsd:schema elementFormDefault="qualified" xmlns:xsd="">
<xsd:import namespace="" schemaLocation="M357026.V1.xsd" />
<xsd:import namespace="" schemaLocation="M972859.V1.xsd" />
<xsd:import namespace="" schemaLocation="M213833.V1.xsd" />
- <wsdl:message name="M357026.V1">
<wsdl:part element="M357026.V1:Find__CompIntfc__SC_HANDL_CI" name="parameter" />
- <wsdl:message name="M972859.V1">
<wsdl:part element="M972859.V1:Find__CompIntfc__SC_HANDL_CIRe sponse" name="parameter" />
- <wsdl:message name="M213833.V1">
<wsdl:part element="M213833.V1:error" name="parameter" />
- <wsdl:portType name="CI_SC_HANDL_CI_PortType">
- <wsdl:operation name="CI_SC_HANDL_CI_F">
<wsdl:input message="tns:M357026.V1" name="M357026.V1" />
<wsdl:output message="tns:M972859.V1" name="M972859.V1" />
<wsdl:fault message="tns:M213833.V1" name="M213833.V1" />
- <wsdl:binding name="CI_SC_HANDL_CI_Binding" type="tns:CI_SC_HANDL_CI_PortType">
<soap:binding style="document" transport="" />
- <wsdl:operation name="CI_SC_HANDL_CI_F">
<soap:operation soapAction="CI_SC_HANDL_CI_F.V3" style="document" />
- <wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptiona l" xmlns:wsu="">
- <wsp:ExactlyOne>
- <wsp:All>
- <wsse:SecurityToken wsp:Usage="wsp:Required" xmlns:wsse="">
- <Claims>
<SubjectName MatchType="wsse:Exact" />
<UsePassword wsp:Usage="wsp:Optional" />
- <wsdl:input name="M357026.V1">
<soap:body encodingStyle="" use="literal" />
- <wsdl:output name="M972859.V1">
<soap:body encodingStyle="" use="literal" />
- <wsdl:fault name="M213833.V1">
<soap:fault encodingStyle="" name="M213833.V1" use="literal" />
- <wsdl:service name="Lead Get">
- <wsdl:port binding="tns:CI_SC_HANDL_CI_Binding" name="CI_SC_HANDL_CI_Port">
<soap:address location="" />

Last edited by venkatravinder@85 : 04-29-2008 at 08:48 AM.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Aastra 9143i Backlit Display SIP VoIP Phone
Aastra 9143i Backlit Display SIP VoIP Phone  pictureAVAYA 9620 IP TELEPHONE - VOIP
AVAYA 9620 IP TELEPHONE - VOIP pictureRevolabs 10-FLX2-200-VOIP Wireless VoIP Sip Systemicrophones VoIP Phone & Devic
Revolabs 10-FLX2-200-VOIP Wireless VoIP Sip Systemicrophones VoIP Phone & Devic pictureAvaya 4610SW IP Office VoIP Business Telephone 700274673 Used
Avaya 4610SW IP Office VoIP Business Telephone   700274673 Used pictureShoretel IP 210 SEV VOIP Phone IP210 Shorephone Black NEW
Shoretel IP 210 SEV VOIP Phone IP210 Shorephone Black NEW picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.