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

Danfoss Solenoid Valve 032U4923 EV310B
$50.25
Danfoss Solenoid Valve 032U4923 EV310B pictureParker Solenoid Valve H22VXBK023B
$163.51
Parker Solenoid Valve H22VXBK023B pictureNEW FESTO 19758 Solenoid Valve MFH-5-1/8-B ORIGINAL OEM MADE IN GERMANY
$109.99
NEW FESTO 19758 Solenoid Valve MFH-5-1/8-B  ORIGINAL OEM    MADE IN GERMANY  pictureVersa Solenoid Valve E5SM-3011-34-NB3-228L-A120
$60.75
Versa Solenoid Valve E5SM-3011-34-NB3-228L-A120 pictureSporlan Solenoid Valve Less Coil E10S250
$87.75
Sporlan Solenoid Valve Less Coil E10S250 picture






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