This is how it looks. The search page show all accounts ( calls SiebelAccountQueryByExample ). In this example you can search on Id and Name. You can also click on the Id then the account detail page is loaded.
When the detail page is loaded it calls SiebelAccountQueryById with the Id of the search page.
And the last page is the insert page
I did this by making a web service proxy on the local saved wsdl. To test this web service you have to do a lot.
nl.ordina.siebel.model.proxy.DefaultClient myPort = new nl.ordina.siebel.model.proxy.DefaultClient();
System.out.println("calling " + myPort.getEndpoint());
// Add your own code here
ListOfAccountInterfaceTopElmt inter = new ListOfAccountInterfaceTopElmt();
Account[] result = new Account[1];
Account acc = new Account();
acc.setAccountId("1-7SL");;
result[0]= acc;
inter.setListOfAccountInterface(result);
ListOfAccountInterfaceTopElmtHolder holder = new ListOfAccountInterfaceTopElmtHolder(inter);
myPort.siebelAccountQueryByExample(holder);
Account[] accs = holder.value.getListOfAccountInterface();
acc = accs[0];
This is to complex so I made it a bit easier. I created a java class where I call these ws methods and on this class I am making a datacontrol.
package nl.ordina.siebel;
import nl.ordina.siebel.model.proxy.DefaultClient;
import nl.ordina.siebel.model.proxy.holders.ListOfAccountInterfaceTopElmtHolder;
import nl.ordina.siebel.model.proxy.types.com.siebel.xml.account_interface.Account;
import nl.ordina.siebel.model.proxy.types.com.siebel.xml.account_interface.ListOfAccountInterfaceTopElmt;
public class SiebelActions {
public SiebelActions() {
}
public Account[] SearchAccount( Account msg ){
try {
DefaultClient myPort = new DefaultClient();
System.out.println("calling " + myPort.getEndpoint());
ListOfAccountInterfaceTopElmt inter = new ListOfAccountInterfaceTopElmt();
Account[] result = new Account[1];
result[0]= msg;
inter.setListOfAccountInterface(result);
ListOfAccountInterfaceTopElmtHolder holder = new ListOfAccountInterfaceTopElmtHolder(inter);
myPort.siebelAccountQueryByExample(holder);
return holder.value.getListOfAccountInterface();
}
catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public Account[] GetAccount( String id ){
try {
DefaultClient myPort = new DefaultClient();
System.out.println("calling " + myPort.getEndpoint());
ListOfAccountInterfaceTopElmt result = myPort.siebelAccountQueryById(id);
return result.getListOfAccountInterface();
}
catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public static void main(String[] args) {
SiebelActions sa = new SiebelActions();
Account acc = new Account();
acc.setAccountId("1-7SL");
Account[] result = sa.SearchAccount(acc);
acc = result[0];
System.out.println("account info "+acc.getAlias()+" name "+acc.getName());
result = sa.GetAccount("1-7SL");
acc = result[0];
System.out.println("account info 2 "+acc.getAlias()+" name 2 "+acc.getName());
}
}
I created an ADF Datacontrol on this class and use this datacontrol in the ADF JSF Pages. Because the input parameters of the ws methods are complex types, I had to create a bean with a method which returns the input parameter. In this bean I also added the search parameters field.
getAccount is used in the pagedef as input parameter on SiebelAccountQueryByExample.
package nl.ordina.siebel;
import nl.ordina.siebel.model.proxy.types.com.siebel.xml.account_interface.Account;
public class SiebelBean {
protected java.lang.String accountId;
protected java.lang.String showAccountId;
protected java.lang.String alias;
protected java.lang.String name;
public SiebelBean() {
}
public Account getAccount(){
Account acc = new Account();
acc.setAccountId(accountId);
acc.setAlias(alias);
acc.setName(name);
return acc;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public String getAccountId() {
return accountId;
}
public void setShowAccountId(String showAccountId) {
this.showAccountId = showAccountId;
}
public String getShowAccountId() {
return showAccountId;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getAlias() {
return alias;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
Here is a guide with all the steps I did. And here is the jdeveloper 10.1.3.3 project. To let it work on your own siebel 8 you only have to change the url of the ENDPOINT_ADDRESS_PROPERTY in the stub file created by the web service proxy and put in the right username / password else you can't insert new accounts.
_setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://10.100.17.1/eai_nld/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=normani&Password=normani");