KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > any > SoapBindingImpl


1 /**
2  * SoapBindingImpl.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis axis-1_2_1 Jun 07, 2005 (05:25:16 IST) WSDL2Java emitter.
6  */

7
8 package test.wsdl.any;
9
10 import org.apache.axis.message.MessageElement;
11
12 public class SoapBindingImpl implements test.wsdl.any.Soap{
13     public test.wsdl.any.QueryResult query(java.lang.String JavaDoc queryString) throws java.rmi.RemoteException JavaDoc {
14         QueryResult qr = new QueryResult();
15         qr.setDone(true);
16         
17         SObject record = new SObject();
18         record.setType("Contact");
19         record.setId("00330000006jryXAAQ");
20         
21         try{
22         MessageElement m1 = new MessageElement("Id", "sf", "urn:partner.soap.sforce.com");
23         MessageElement m2 = new MessageElement("FirstName", "sf", "urn:partner.soap.sforce.com");
24         MessageElement m3 = new MessageElement("LastName", "sf", "urn:partner.soap.sforce.com");
25         m1.addTextNode("00330000006jryXAAQ");
26         m2.addTextNode("Fred");
27         m3.addTextNode("A>B");
28         MessageElement[] me = new MessageElement[]{m1, m2, m3};
29         record.set_any(me);
30         } catch(javax.xml.soap.SOAPException JavaDoc e){
31             
32         }
33         
34         SObject[] records = new SObject[]{record};
35         qr.setRecords(records);
36         
37         qr.setSize(1);
38         
39         return qr;
40     }
41
42 }
43
Popular Tags