BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-30-2009, 06:47 AM   #1
JaiHo!
New Member
 
Join Date: Apr 2009
Model: 8120
PIN: N/A
Carrier: a
Posts: 5
Default SOAP Fault:Server

Please Login to Remove!

Hi all ,

I am new to BlackeBerry developement. I am trying to invoke a webservice through Blackberry code.

i am testing the webservice in SoapUI tool. It is working fine there. But while invoking it through Midlet code, it is giveing a SOAP Fault of type Server.

Please help me reagarding this error . I need to know the route cause ofthis error ans its remedy.

The code for reference is as here:

public void run(){
try {

SoapObject rpc = new SoapObject("__my message holder___", "_my metod name __");

/* These are input fields*/
rpc.addProperty("OPPORTUNITY_ID","NEXT");
rpc.addProperty("OPPORTUNITY_NAME","q");
rpc.addProperty("OPPORTUNITY_STATUS","0");

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
System.out.println("SOAP HEADER ++++");
envelope.headerOut = new Element[1];
// header code here-----
envelope.headerOut[0] = headerSec;
envelope.setOutputSoapObject(rpc);
envelope.bodyOut = rpc;
//envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.XSD;

HttpTransport http = new HttpTransport("--my wsdl");
http.call("--my soap action",envelope);
SoapObject result = (SoapObject)envelope.bodyIn;

--contined to get O/P

}
catch (SoapFault sf){
resultItem.setLabel("FAULT:\n");
String faultString = "Code: " + sf.faultcode + "\nString: " + sf.faultstring;
resultItem.setText(faultString);
System.out.println("SOAP Fault");
System.out.println(sf.faultcode+ "\n" + sf.faultstring);
}
catch (Exception e) {
//e.printStackTrace();
resultItem.setLabel("Error:");
resultItem.setText(e.toString());
System.out.println("Exception!!");
System.out.println(e.toString());
}


}
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Vintage Weller DEC1001 Soldering Station Power Unit Working
$99.99
Vintage Weller DEC1001 Soldering Station Power Unit Working pictureCaterpillar Truck News And Engine News Booklets From 1999 Sept Oct Dec - Vintage
$7.99
Caterpillar Truck News And Engine News Booklets From 1999 Sept Oct Dec - Vintage pictureVintage RED Fan Belt ~ Patent Dated Dec 14 1926 ~ Dunlap 1/2 x 46
$12.5
Vintage RED Fan Belt ~ Patent Dated Dec 14 1926 ~ Dunlap 1/2 x 46 pictureDATED DEC 20th,1910: Vintage Brass Pressure Gauge By ASHCROFT, Antique Steampunk
$69.99
DATED DEC 20th,1910: Vintage Brass Pressure Gauge By ASHCROFT, Antique Steampunk pictureVintage Starrett 113 Micrometer Caliper - Pat. May 4, 1897 & Dec 20, 1907
$16.0
Vintage Starrett 113 Micrometer Caliper - Pat. May 4, 1897 & Dec 20, 1907 picture






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