CXF
  1. CXF
  2. CXF-3812

Problem with DynamicClient failing to invoke service now webservice

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 2.4.2
    • Fix Version/s: Invalid
    • Labels:
      None
    • Environment:

      CXF 2.4.2 on Max OS X 10.6.8

      java version "1.6.0_26"
      Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
      Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)

    • Estimated Complexity:
      Unknown

      Description

      Using CXF dynamic client with CXF service model fails to invoke the ServiceNow public demo web service. It throws a ClassCastException. Attaching a sample project that has test case that shows this problem. Appreciate if you could advice on this behavior. I tried debugging, but it looks like the wrapper helpers (com.service_now.incident.GetRecords_WrapperTypeHelper1) are created on the fly and could not step through.

      Sep 20, 2011 9:47:28 AM org.apache.cxf.jaxb.JAXBUtils logGeneratedClassNames
      INFO: Created classes: com.service_now.incident.DeleteMultiple, com.service_now.incident.DeleteMultipleResponse, com.service_now.incident.DeleteRecord, com.service_now.incident.DeleteRecordResponse, com.service_now.incident.Get, com.service_now.incident.GetKeys, com.service_now.incident.GetKeysResponse, com.service_now.incident.GetRecords, com.service_now.incident.GetRecordsResponse, com.service_now.incident.GetResponse, com.service_now.incident.Insert, com.service_now.incident.InsertResponse, com.service_now.incident.ObjectFactory, com.service_now.incident.Update, com.service_now.incident.UpdateResponse
      com.service_now.incident.GetRecords
      Sep 20, 2011 9:47:29 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
      WARNING: Interceptor for

      {http://www.service-now.com}

      ServiceNow_incident#

      {http://www.service-now.com}

      getRecords has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: com.service_now.incident.GetRecords cannot be cast to java.lang.Boolean
      at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
      at ServiceNowTest.testCXFModelClient(ServiceNowTest.java:59)
      at ServiceNowTest.main(ServiceNowTest.java:23)
      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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: java.lang.ClassCastException: com.service_now.incident.GetRecords cannot be cast to java.lang.Boolean
      at com.service_now.incident.GetRecords_WrapperTypeHelper1.createWrapperObject(Unknown Source)
      at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
      ... 13 more
      Exception in thread "main" org.apache.cxf.interceptor.Fault: com.service_now.incident.GetRecords cannot be cast to java.lang.Boolean
      at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:121)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:519)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:449)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:352)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:304)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
      at ServiceNowTest.testCXFModelClient(ServiceNowTest.java:59)
      at ServiceNowTest.main(ServiceNowTest.java:23)
      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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: java.lang.ClassCastException: com.service_now.incident.GetRecords cannot be cast to java.lang.Boolean
      at com.service_now.incident.GetRecords_WrapperTypeHelper1.createWrapperObject(Unknown Source)
      at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:105)
      ... 13 more

      1. servicenow-cxf.zip
        59 kB
        Arul Dhesiaseelan

        Activity

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Arul Dhesiaseelan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development