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

Radio Shack AC Ammeter Probe Analog Multimeter #22-602
$22.99
Radio Shack AC Ammeter Probe Analog Multimeter #22-602 pictureVintage Weston Model 322 Micro ammeter in cherry wood box
$39.0
Vintage Weston Model 322 Micro ammeter in cherry wood box pictureNew 7 Function Digital Voltmeter Ohmmeter Ammeter, Battery and Transistor Tester
$6.95
New 7 Function Digital Voltmeter Ohmmeter Ammeter, Battery and Transistor Tester picturePro Digital Multimeter Backlight AC/DC Ammeter Voltmeter Ohm Portable Meter hot*
$0.99
Pro Digital Multimeter Backlight AC/DC Ammeter Voltmeter Ohm Portable Meter hot* pictureRadio Shack AC Ammeter w/detachable Multimeter 22-602 tested
$28.0
Radio Shack AC Ammeter w/detachable Multimeter 22-602 tested picture






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