Rohan Patel

Greenhorn
+ Follow
since Jun 13, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rohan Patel

thanks
@ Ulf Dittmer Marshal for your reply, actually i set header like this.......

Element h = new Element().createElement(NAMESPACE, "AuthHeader");
Element Username = new Element().createElement(NAMESPACE, "Username");
Username.addChild(Node.TEXT, "MYUSERNAME");
h.addChild(Node.ELEMENT, Username);
Element wssePassword = new Element().createElement(NAMESPACE, "Password");
wssePassword.addChild(Node.TEXT, "MYPASSWORD");
h.addChild(Node.ELEMENT, wssePassword);

envelope.headerOut = new Element[]{h};

but when i called


try {
androidHttpTransport.call(SOAP_ACTION, envelope);//,headerProperty);

Object obj = envelope.bodyIn;
obj.toString();


it gives always null is there any method to send authheader ??
thanks again for your reply .
5 years ago
hi every one, i am a newbie to android i have to fetch auth header from asmx service and i didnt get any link to resolve it.
please help..
thanks in advance.

My service is like

Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GetUserDetail"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthHeader xmlns="http://tempuri.org/">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap:Header>
<soap:Body>
<GetUserDetail xmlns="http://tempuri.org/">
<userid>string</userid>
</GetUserDetail>
</soap:Body>
</soap:Envelope>



and response is like

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetUserDetailResponse xmlns="http://tempuri.org/">
<GetUserDetailResult>
<xsd:schema>schema</xsd:schema>xml</GetUserDetailResult>
</GetUserDetailResponse>
</soap:Body>
</soap:Envelope>



i stuck with this and lost my 2 days for in and nothing with me at present
5 years ago
hi i am a newbie to android and i want to add multiple textviews in single row as
i have 1000's of objects to display like this manner

sample text 1 sample text 2
sample text 3 sample text 4
...
...
...

my layout look likes
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/catagory_linearlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >



<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="266dp" >

<TableLayout
android:id="@+id/maintable"
android:layout_width="wrap_content"
android:layout_height="265dp"
android:shrinkColumns="*"
android:stretchColumns="*" >

<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</TableRow>

</TableLayout>

</ScrollView>

</LinearLayout>


but don't know how to perform it dynamically
i stuck with it please help
thanks in adv
6 years ago
try {

//String a=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:newtest");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from department");
while (rs.next()) {
department.Deptbean u1 = new department.Deptbean();
// a=rs.getString(1);
u1.setDept_id(rs.getString(1));
u1.setName(rs.getString(2));//Problem in this statement
//cant get integet value & rs.getInt() not working

listd.add(u1);
System.out.println("Prob"+rs.getString(1));
}

} catch (Exception ex) {
System.out.println("Prob:"+ex.toString());






Exception is
Prob:java.sql.SQLException: No data found