hello,
I generate java code out from UML. in order to get the correct and complete result, I have to run the workflow more than once
the first one :: incorrect
public Book getBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "getBook");
rpcClient.getOptions().setAction("urn:getBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{Book.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after getBook invoke");
Book book = (Book) response[0];
}
public String lendBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "lendBook");
rpcClient.getOptions().setAction("urn:lendBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{String.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after lendBook invoke");
}
the second one :: incorrect
public String lendBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "lendBook");
rpcClient.getOptions().setAction("urn:lendBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{String.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after lendBook invoke");
return (String) obj[0];
}
public Book getBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "getBook");
rpcClient.getOptions().setAction("urn:getBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{Book.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after getBook invoke");
Book book = (Book) response[0];
}
the third one :: incorrect
public String lendBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "lendBook");
rpcClient.getOptions().setAction("urn:lendBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{String.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after lendBook invoke");
}
public Book getBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "getBook");
rpcClient.getOptions().setAction("urn:getBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{Book.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after getBook invoke");
Book book = (Book) response[0];
if (book != null) {
System.out.println(book.getBookInfo());
} else {
System.out.println("book is not found ...");
}
return (Book) response[0];
}
another one >>> incorrect
another one >>> incorrect
the following one is correct .. !!
public String lendBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "lendBook");
rpcClient.getOptions().setAction("urn:lendBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{String.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after lendBook invoke");
return (String) obj[0];
}
public Book getBook(String isbn, RPCServiceClient rpcClient)
throws AxisFault {
QName opGet = new QName("http://service.webservice.sample", "getBook");
rpcClient.getOptions().setAction("urn:getBook");
ArrayList args = new ArrayList();
Object[] opGetArgs = new Object[]{isbn};
args.add(isbn);
Class[] returnTypes = new Class[]{Book.class};
Object[] response = rpcClient.invokeBlocking(opGet, opGetArgs,
returnTypes);
System.out.println("after getBook invoke");
Book book = (Book) response[0];
if (book != null) {
System.out.println(book.getBookInfo());
} else {
System.out.println("book is not found ...");
}
return (Book) response[0];
}
where this problem could be located?
Thanx in-advance