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

ICSH044A Five key navigation key module for Blackberry Trackball Breakout Board
$10.55
ICSH044A Five key navigation key module for Blackberry Trackball Breakout Board pictureBlackberry Q10 Rogers Network
$44.99
Blackberry Q10 Rogers Network pictureBlackberry Trackball breakout board four spindles 2.5V~5.25V
$6.8
Blackberry Trackball breakout board four spindles 2.5V~5.25V picture10pcs Blackberry Trackball Breakout Board Four spindles 2.5V~5.25V
$50.99
10pcs Blackberry Trackball Breakout Board Four spindles 2.5V~5.25V picture38 Faux Blackberries With Stems, Decor, Realistic Food Display, Prop
$17.99
38 Faux Blackberries With Stems, Decor, Realistic Food Display, Prop  picture






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