BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-07-2009, 04:50 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Model: 8120
PIN: N/A
Carrier: a
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 and 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

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

ED42B025 NEW IN BOX - Siemens Circuit Breaker - Free UPS Ground
$130.0
ED42B025    NEW IN BOX - Siemens Circuit Breaker - Free UPS Ground picture25pack 1uf 100v 85c Siemens Axial Orange Jacket Electrolytic Capacitors NEW
$6.99
25pack 1uf 100v 85c Siemens Axial Orange Jacket Electrolytic Capacitors NEW picture1pc Siemens PLC 6ES7 223-1PL22-0XA0
$125.69
1pc Siemens PLC 6ES7 223-1PL22-0XA0 pictureNEW SIEMENS EM232 6ES7 232-0HB22-0XA8 6ES7232-0HB22-0XA8 Extension module ok
$135.0
NEW SIEMENS EM232 6ES7 232-0HB22-0XA8 6ES7232-0HB22-0XA8 Extension module ok pictureSIEMENS SENTRON 225 AMP CIRCUIT BREAKER 3 POLE 600 V FXD63B225 *Tested*
$65.0
SIEMENS SENTRON 225 AMP CIRCUIT BREAKER 3 POLE 600 V FXD63B225 *Tested* picture






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