Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Problem calling Web Service

Suneet Shah

2010-03-19


Author LoginPost Reply
Hello

I am trying to use GroovyWS to invoke a service operation that accepts
complex object. I am getting the error below. Any thoughts on whats
causing this and how I can get past it?

Thanks

// script

import groovyx.net.ws.WSClient
@Grab(group='org.codehaus.groovy.modules', module='groovyws',
version='0.5.1')


def getProxy(wsdl, classLoader) {
new WSClient(wsdl, classLoader)
}
proxy = getProxy("http://suneet-laptop:8088/mockIdentitySOAP?WSDL",
this.class.classLoader)
proxy.initialize()


def loginManager = context.getBean("loginManager")
def userManager = context.getBean("userManager")

def request =
proxy.create("com.multiplan.service.identity.SendNotificationRequest")
def idType =
proxy.create("com.multiplan.xmlschema.identity.UserIdentifierXMLType")
def idListType =
proxy.create("com.multiplan.xmlschema.identity.UserIdentifierListXMLType")



loginList = loginManager.getLockedUserSince(lastExecTime)
if (loginList != null ) {
  for ( lg in loginList) {
   System.out.println("userId=" + lg.userId)

    idType.userID = lg.userId
    idListType.userIdentifier.add(idType)
   
    request.userIdentifierList = idListType
    request.notificationType = "LOCK"

    proxy.SendNotification(request)
   
  }
}



/// Error

SEVERE: Could not compile java files for
http://rck-dev-esb-01:8080/ccx/Identity?WSDL.
Mar 18, 2010 10:14:02 PM org.quartz.core.JobRunShell run
SEVERE: Job DEFAULT.minuteJobDetail threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException:
Invocation of method 'execute' on target class [class
org.openiam.batch.account.MinuteJob] failed; nested exception is
java.lang.IllegalStateException: Unable to create JAXBContext for
generated packages: "com.multiplan.xmlschema.client" doesnt contain
ObjectFactory.class or jaxb.index
  at
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:269)
  at
org.springframework.scheduling.quartz.QuartzJobBean.execute (QuartzJobBean.java:86)
  at org.quartz.core.JobRunShell.run (JobRunShell.java:202)
  at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: java.lang.IllegalStateException: Unable to create JAXBContext
for generated packages: "com.multiplan.xmlschema.client" doesnt contain
ObjectFactory.class or jaxb.index
  at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient (DynamicClientFactory.java:352)
  at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient (DynamicClientFactory.java:196)
  at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient (DynamicClientFactory.java:175)
  at
groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:198)
  at groovyx.net.ws.WSClient.initialize(WSClient.java:107)
  at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
  at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:40)
  at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:117)
  at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:121)
  at accountLockedNotification.run(accountLockedNotification.groovy:12)
  at groovy.util.GroovyScriptEngine.run (GroovyScriptEngine.java:421)
  at
org.openiam.script.GroovyScriptEngineIntegration.execute(GroovyScriptEngineIntegration.java:73)
  at org.openiam.batch.account.MinuteJob.execute(MinuteJob.java:92)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke (Method.java:597)
  at org.springframework.util.MethodInvoker.invoke (MethodInvoker.java:276)
  at
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)
  ... 3 more
Caused by: javax.xml.bind.JAXBException:
"com.multiplan.xmlschema.client" doesnt contain ObjectFactory.class or
jaxb.index
  at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:197)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.