Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2012-02-21T12:27:05Z by R12F_Sabir_Ali
R12F_Sabir_Ali
R12F_Sabir_Ali
3 Posts
ACCEPTED ANSWER

Pinned topic Calling Webservice in miniloan web application

‏2012-02-21T11:18:24Z |
hi,
I use trail version of ILog JRule 7.1.2,
i am trying to call webservice, i have a wsdl file and its schema. generate classes through wsimport, copy all generated classes in java project attached metro libs on class path. make jar file from java project and this jar file to miniloan web project
replace code in MiniloanBean with
public String validate()
String result = "accepted";
try
{
ResourceBundle bundle = ResourceBundle.getBundle("miniloanweb/configuration");
System.out.println(bundle.getString("wsdl_location"));
JetMUBREManager_Service service = new JetMUBREManager_Service(new URL(bundle.getString("wsdl_location")), new QName("http://tempuri.org/", "JetMUBREManager"));
JetMUBREManager port = service.getBasicHttpBindingJetMUBREManager();
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, bundle.getString("wsdl_location"));
port.processAutoAdjudicatedApplication(37707);
}
catch(Exception e)
{
e.printStackTrace();
//throw e;
System.out.println("Current time"+new Date().getMinutes());
}
/* Loan loan = new Loan(loanAmount, loanDuration, loanYearlyInterestRate);
Borrower borrower = new Borrower(borrowerName, borrowerCreditScore, borrowerYearlyIncome);
String result = "";
if (usejrules) {
result = validateWithJRules (loan, borrower);
} else {
result = validateWithJava (loan,borrower);
}*/
return result;
}

when i change the build.xml file, this exception occure
nstance.java:867)
java at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKern
el.java:239)
java at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.jav
a:342)
java at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)

java at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:37)
java at java.lang.reflect.Method.invoke(Method.java:599)
java at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.inv
oke(ReflectionMethodInvoker.java:34)
java at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBean
Operation.java:124)
java at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanI
nstance.java:867)
java at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKern
el.java:239)
java at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanG
BeanBridge.java:172)
java at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(
DefaultMBeanServerInterceptor.java:848)
java at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.
java:773)
java at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMI
ConnectionImpl.java:1437)
java at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIC
onnectionImpl.java:83)
java at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOpera
tion.run(RMIConnectionImpl.java:1275)
java at java.security.AccessController.doPrivileged(AccessController.
java:284)
java at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOpe
ration(RMIConnectionImpl.java:1377)
java at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConne
ctionImpl.java:799)
java at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)

java at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:37)
java at java.lang.reflect.Method.invoke(Method.java:599)
java at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
a:310)
java at sun.rmi.transport.Transport$1.run(Transport.java:171)
java at java.security.AccessController.doPrivileged(AccessController.
java:284)
java at sun.rmi.transport.Transport.serviceCall(Transport.java:167)
java at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
t.java:547)
java at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCP
Transport.java:802)
java at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
ransport.java:661)
java at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
PoolExecutor.java:896)
java at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool
Executor.java:918)
java at java.lang.Thread.run(Thread.java:735)
java java.lang.Exception: Could not load 1/0/org/apache/xml/resolver/tool
s/ResolvingXMLFilter.class
java at java.lang.Throwable.<init>(Throwable.java:67)
java at org.apache.xbean.finder.ClassFinder.readClassDef(ClassFinder.
java:712)
java at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:1
41)
java at org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discove
rWebServices(WARWebServiceFinder.java:160)

that is not a full stack trace copy from sample server.
I have attach the source of my application, please any one resolve this issue.
Updated on 2012-02-21T12:27:05Z at 2012-02-21T12:27:05Z by R12F_Sabir_Ali
  • R12F_Sabir_Ali
    R12F_Sabir_Ali
    3 Posts
    ACCEPTED ANSWER

    Re: Calling Webservice in miniloan web application

    ‏2012-02-21T12:27:05Z  in response to R12F_Sabir_Ali
    I will review the article and adjust the deployment plan to "hide" those conflicting classes from the Geronimo stack such that the JAR files contained in my /WEB-INF/lib (inside the WAR) will take precedence. I specifically don't want those in the stack - I want the Sun reference implementation - JAX-WS Metro.
    In the below link, he mention that use geronimo deployment plan that can hide the colliding packages in web.xml and geronimo-web.xml file, but contents not shown

    http://objectmix.com/websphere/729310-jax-ws-web-service-deployed-ce-2-1-classpath-issue.html

    my generated classes from wsdl project is attached bellow