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
PIN: N/A
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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">


<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security soap:mustUnderstand="1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>40084 </wsse:Username>
<wsse:Password>reddy</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>


<SOAP-ENV:Body>
<m:Updatedata__CompIntfc__SC_LEADCRE_TEST xmlns:m="http://xmlns.oracle.com/Enterprise/Tools/schemas/M185604.V1">
<m:LEAD_ID/>
<m:DESCR50/>
<m:PERSON_ID/>
<m:NAME1/>
<m:LEAD_RATING/>
<m:EST_REVENUE/>
<m:SC_CONTRACT_ST/>
</m:Updatedata__CompIntfc__SC_LEADCRE_TEST>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

*Red color lines i have included manually


Soap Response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<m:Updatedata__CompIntfc__SC_LEADCRE_TESTRespons e xmlns:m="http://xmlns.oracle.com/Enterprise/Tools/schemas/M842239.V1">
<m:notification>1</m:notification>
<m:detail/>
</m:Updatedata__CompIntfc__SC_LEADCRE_TESTResponse>
</soapenv:Body>
</soapenv:Envelope>



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





CODE:
SoapObject rpc = new SoapObject("http://xmlns.oracle.com/Enterprise/Tools/schemas/M185604.V1", "Updatedata__CompIntfc__SC_LEADCRE_TEST");
//rpc.setProperty("USename", "Basic " + login);
rpc.addProperty("LEAD_ID",lead_id);
rpc.addProperty("DESCR50",description);
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("http://myxsell.com/PSIGW/PeopleSoftServiceListeningConnector/PSFT_CR/CI_SC_LEADCRE_TEST.1.wsdl");
String s=http.requestDump;
http.call("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="http://xmlns.oracle.com/Enterprise/Tools/services/Lead Get.1" xmlns:M213833.V1="http://xmlns.oracle.com/Enterprise/Tools/schemas/M213833.V1" xmlns:M357026.V1="http://xmlns.oracle.com/Enterprise/Tools/schemas/M357026.V1" xmlns:M972859.V1="http://xmlns.oracle.com/Enterprise/Tools/schemas/M972859.V1" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Enterprise/Tools/services/Lead Get.1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<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" />
</plnk:role>
</plnk:partnerLinkType>
- <wsdl:types>
- <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas/M357026.V1" schemaLocation="M357026.V1.xsd" />
<xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas/M972859.V1" schemaLocation="M972859.V1.xsd" />
<xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas/M213833.V1" schemaLocation="M213833.V1.xsd" />
</xsd:schema>
</wsdl:types>
- <wsdl:message name="M357026.V1">
<wsdl:documentation>M357026</wsdl:documentation>
<wsdl:part element="M357026.V1:Find__CompIntfc__SC_HANDL_CI" name="parameter" />
</wsdl:message>
- <wsdl:message name="M972859.V1">
<wsdl:documentation>M972859</wsdl:documentation>
<wsdl:part element="M972859.V1:Find__CompIntfc__SC_HANDL_CIRe sponse" name="parameter" />
</wsdl:message>
- <wsdl:message name="M213833.V1">
<wsdl:documentation>M213833</wsdl:documentation>
<wsdl:part element="M213833.V1:error" name="parameter" />
</wsdl:message>
- <wsdl:portType name="CI_SC_HANDL_CI_PortType">
- <wsdl:operation name="CI_SC_HANDL_CI_F">
<wsdl:documentation>CI_SC_HANDL_CI_F</wsdl:documentation>
<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:operation>
</wsdl:portType>
- <wsdl:binding name="CI_SC_HANDL_CI_Binding" type="tns:CI_SC_HANDL_CI_PortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <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="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <wsp:ExactlyOne>
- <wsp:All>
- <wsse:SecurityToken wsp:Usage="wsp:Required" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:TokenType>wsse:UserNameToken</wsse:TokenType>
- <Claims>
<SubjectName MatchType="wsse:Exact" />
<UsePassword wsp:Usage="wsp:Optional" />
</Claims>
</wsse:SecurityToken>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
- <wsdl:input name="M357026.V1">
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:input>
- <wsdl:output name="M972859.V1">
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal" />
</wsdl:output>
- <wsdl:fault name="M213833.V1">
<soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="M213833.V1" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Lead Get">
<wsdl:documentation>CI_SC_HANDL_CI</wsdl:documentation>
- <wsdl:port binding="tns:CI_SC_HANDL_CI_Binding" name="CI_SC_HANDL_CI_Port">
<soap:address location="http://myxsell.com/PSIGW/PeopleSoftServiceListeningConnector/PSFT_CR" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Last edited by venkatravinder@85 : 04-29-2008 at 08:48 AM.
Offline  
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

CISCO TELEPRESENCE CONTENT SERVER SR1630GP 74-8004-01 XEON X3450 2.67GHZ HDD
$250.0
 CISCO TELEPRESENCE CONTENT SERVER SR1630GP 74-8004-01 XEON X3450 2.67GHZ HDD pictureNew HP Proliant DL380 Gen4/ML370 Server Intel Xeon Processor 311584-B21
$41.99
New HP Proliant DL380 Gen4/ML370 Server Intel Xeon Processor 311584-B21 pictureDell PowerEdge 1950 E1624 Server (9423)
$24.95
Dell PowerEdge 1950 E1624 Server (9423) pictureHamamatsu C6979 Industrial PSU Regulated Current Xeon Lamp Power Supply Unit
$499.99
Hamamatsu C6979 Industrial PSU Regulated Current Xeon Lamp Power Supply Unit pictureNortel Avaya Callpilot 1005r DUAL Xeon 3.2GHz 4Gb RAM Server T1G12U L5201010228D
$115.0
Nortel Avaya Callpilot 1005r DUAL Xeon 3.2GHz 4Gb RAM Server T1G12U L5201010228D picture






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