cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying Web Service Task - class not found exception

ct1
Champ in-the-making
Champ in-the-making
In Activiti 5.8, I am trying to impement a Web Service task that uses information from a Weather Web Service.  When I attempt to deploy the BPMN20 file in Activiti Explorer, I get an ActivitiClassLoadingException.  Should the deploy throw a Class not found exception when the Web Service returns a response in the form of one of the Web Service classes?  It seems that that might happen when the BPMN20 process is started.  Could you please look at the information below to see what I may have done incorrectly?

Again, this happens when I try to deploy the project in Activiti Explorer.

The BPMN20 file:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:activiti="http://activiti.org/bpmn"
      xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
      xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
      xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
      typeLanguage="http://www.w3.org/2001/XMLSchema"
      expressionLanguage="http://www.w3.org/1999/XPath"
      targetNamespace="http://www.activiti.org/test"
      xmlns:weatherNS="http://wsf.cdyne.com/WeatherWS/"
      xmlns:tns="http://argo.com/thisNS">
      
      <import importType="http://schemas.xmlsoap.org/wsdl/"
            location="http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl"
            namespace="http://wsf.cdyne.com/WeatherWS" />
      
      <message id="findCityWeatherForecastRequestMessage"
         itemRef="tns:GetCityForecastByZIPSoapInItem" />
      <message id="findCityWeatherForecastResponseMessage"
         itemRef="tns:GetCityForecastbyZIPSoapOutItem" />
         
      <itemDefinition id="GetCityForecastByZIPSoapInItem"
         structureRef="weatherNS:GetCityForecastByZIPSoapIn" />
      <itemDefinition id="GetCityForecastbyZIPSoapOutItem"
         structureRef="weatherNS:GetCityForecastByZIPSoapOut" />
         
      <interface name="Find City Forecast"
         implementationRef="weatherNS:Weather">
         <operation id="GetCityForecastByZIP"
                  name="Find City Forecast Operation"
                  implementationRef="weatherNS:GetCityForecastByZIP">
            <inMessageRef>
               tns:findCityWeatherForecastRequestMessage
            </inMessageRef>
            
            <outMessageRef>
               tns:findCityWeatherForecastResponseMessage
            </outMessageRef>
            
         </operation>
      </interface>
      
      <itemDefinition id="cityZip" structureRef="string" />
      <itemDefinition id="zip" structureRef="string" />
      <itemDefinition id="GetCityForecastByZIPResponse"
                     structureRef="string" />
      <itemDefinition id="replyFromService" structureRef="string" />
      
  <process id="UseWeatherWebService" name="UseWeatherWebService">
    <documentation>Place documentation for the 'UseWeatherWebService' process here.</documentation>
    <startEvent id="useWsStart" name="Use WS Start">
      <extensionElements>
        <activiti:formProperty id="zipCode" name="Zip Code of City" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <serviceTask id="callTheWS" name="Call the WS"
          activiti:implementation="##WebService"
          operationRef="weatherNS:GetCityForecastByZIP" >
          
          <ioSpecification>
             <dataInput
                itemSubjectRef="weatherNS:GetCityForecastByZIPSoapIn"
                id="dataInput" />
             
             <dataOutput
                itemSubjectRef="weatherNS:GetCityForecastByZIPSoapOut"
                id="dataOutput" />
                
             <inputSet>
                <dataInputRefs>dataInput</dataInputRefs>
             </inputSet>
             
             <outputSet>
                <dataOutputRefs>dataOutput</dataOutputRefs>
             </outputSet>         
          </ioSpecification>
          
          <dataInputAssociation>
             <sourceRef>cityZip</sourceRef>
             <targetRef>GetCityForecastByZIP</targetRef>        
          </dataInputAssociation>
          <dataOutputAssociation>
             <sourceRef>GetCityForecastByZIPResponse</sourceRef>
             <targetRef>replyFromService</targetRef>
          </dataOutputAssociation>
          
    </serviceTask>
    <scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy">
      <script><![CDATA[print "Weather for ZIP ${cityZip} is ${replyFromWS}.\n"]]></script>
    </scriptTask>
    <endEvent id="useWsEnd" name="Use WS End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="useWsStart" targetRef="callTheWS"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="callTheWS" targetRef="scripttask1"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="scripttask1" targetRef="useWsEnd"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_UseWeatherWebService">
    <bpmndi:BPMNPlane bpmnElement="UseWeatherWebService" id="BPMNPlane_UseWeatherWebService">
      <bpmndi:BPMNShape bpmnElement="useWsStart" id="BPMNShape_useWsStart">
        <omgdc:Bounds height="35" width="35" x="100" y="110"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="callTheWS" id="BPMNShape_callTheWS">
        <omgdc:Bounds height="55" width="105" x="230" y="100"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">
        <omgdc:Bounds height="55" width="105" x="470" y="100"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="useWsEnd" id="BPMNShape_useWsEnd">
        <omgdc:Bounds height="35" width="35" x="720" y="110"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="135" y="127"></omgdi:waypoint>
        <omgdi:waypoint x="230" y="127"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="335" y="127"></omgdi:waypoint>
        <omgdi:waypoint x="470" y="127"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="575" y="127"></omgdi:waypoint>
        <omgdi:waypoint x="720" y="127"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

The Tomcat log:


Jan 9, 2012 4:00:58 PM org.activiti.engine.impl.bpmn.parser.BpmnParse execute
SEVERE: Uknown exception
org.activiti.engine.ActivitiClassLoadingException: Class not found: java.util.List<com.cdyne.ws.weat
herws.WeatherDescription>
        at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:81)
        at org.activiti.engine.impl.webservice.CxfWSDLImporter.importStructure(CxfWSDLImporter.java:
159)
        at org.activiti.engine.impl.webservice.CxfWSDLImporter.importTypes(CxfWSDLImporter.java:146)

        at org.activiti.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:106)
        at org.activiti.engine.impl.webservice.CxfWSDLImporter.importFrom(CxfWSDLImporter.java:69)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseImports(BpmnParse.java:283)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.parseRootElement(BpmnParse.java:213)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:192)
        at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:81)
        at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:3
7)
        at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(Deployment
Manager.java:39)
        at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:58)
        at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java
:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInte
rceptor.java:42)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInter
ceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.j
ava:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.jav
a:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:43)
        at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.ja
va:106)
        at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.deployUploadedFil
e(DeploymentUploadReceiver.java:88)
        at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.uploadFinished(De
ploymentUploadReceiver.java:71)
        at org.activiti.explorer.ui.custom.UploadComponent.uploadFinished(UploadComponent.java:173)
        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.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
        at com.vaadin.ui.Upload.fireUploadSuccess(Upload.java:744)
        at com.vaadin.ui.Upload$1.streamingFinished(Upload.java:1022)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToReceiver(AbstractComm
unicationManager.java:593)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleSimpleMultipartFileUp
load(AbstractCommunicationManager.java:469)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(CommunicationManager
.java:257)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServ
let.java:495)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
va:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: java.util.List<com.cdyne.ws.weatherws.WeatherDescriptio
n>
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:62)
        … 49 more
Jan 9, 2012 4:00:58 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource RenameAFile.png
Jan 9, 2012 4:00:58 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource TestTimerStartEventProcess.png
Jan 9, 2012 4:00:58 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource ResumeScreeningProcess.png
Jan 9, 2012 4:00:58 PM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource Application Screening Process.png


The WSDL of the Web Service:


<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema"
   xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
   xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
   xmlns:tns="http://ws.cdyne.com/WeatherWS/"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
   xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
   targetNamespace="http://ws.cdyne.com/WeatherWS/"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
      <s:schema elementFormDefault="qualified" targetNamespace="http://ws.cdyne.com/WeatherWS/">
         <s:element name="GetWeatherInformation">
            <s:complexType />
         </s:element>
         <s:element name="GetWeatherInformationResponse">
            <s:complexType>
               <s:sequence>
                  <s:element minOccurs="0" maxOccurs="1"
                     name="GetWeatherInformationResult" type="tns:ArrayOfWeatherDescription" />
               </s:sequence>
            </s:complexType>
         </s:element>
         <s:complexType name="ArrayOfWeatherDescription">
            <s:sequence>
               <s:element minOccurs="0" maxOccurs="unbounded" name="WeatherDescription"
                  type="tns:WeatherDescription" />
            </s:sequence>
         </s:complexType>
         <s:complexType name="WeatherDescription">
            <s:sequence>
               <s:element minOccurs="1" maxOccurs="1" name="WeatherID"
                  type="s:short" />
               <s:element minOccurs="0" maxOccurs="1" name="Description"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="PictureURL"
                  type="s:string" />
            </s:sequence>
         </s:complexType>
         <s:element name="GetCityForecastByZIP">
            <s:complexType>
               <s:sequence>
                  <s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
               </s:sequence>
            </s:complexType>
         </s:element>
         <s:element name="GetCityForecastByZIPResponse">
            <s:complexType>
               <s:sequence>
                  <s:element minOccurs="0" maxOccurs="1"
                     name="GetCityForecastByZIPResult" type="tns:ForecastReturn" />
               </s:sequence>
            </s:complexType>
         </s:element>
         <s:complexType name="ForecastReturn">
            <s:sequence>
               <s:element minOccurs="1" maxOccurs="1" name="Success"
                  type="s:boolean" />
               <s:element minOccurs="0" maxOccurs="1" name="ResponseText"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="ForecastResult"
                  type="tns:ArrayOfForecast" />
            </s:sequence>
         </s:complexType>
         <s:complexType name="ArrayOfForecast">
            <s:sequence>
               <s:element minOccurs="0" maxOccurs="unbounded" name="Forecast"
                  nillable="true" type="tns:Forecast" />
            </s:sequence>
         </s:complexType>
         <s:complexType name="Forecast">
            <s:sequence>
               <s:element minOccurs="1" maxOccurs="1" name="Date" type="s:dateTime" />
               <s:element minOccurs="1" maxOccurs="1" name="WeatherID"
                  type="s:short" />
               <s:element minOccurs="0" maxOccurs="1" name="Desciption"
                  type="s:string" />
               <s:element minOccurs="1" maxOccurs="1" name="Temperatures"
                  type="tns:temp" />
               <s:element minOccurs="1" maxOccurs="1"
                  name="ProbabilityOfPrecipiation" type="tns:POP" />
            </s:sequence>
         </s:complexType>
         <s:complexType name="temp">
            <s:sequence>
               <s:element minOccurs="0" maxOccurs="1" name="MorningLow"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="DaytimeHigh"
                  type="s:string" />
            </s:sequence>
         </s:complexType>
         <s:complexType name="POP">
            <s:sequence>
               <s:element minOccurs="0" maxOccurs="1" name="Nighttime"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Daytime"
                  type="s:string" />
            </s:sequence>
         </s:complexType>
         <s:element name="GetCityWeatherByZIP">
            <s:complexType>
               <s:sequence>
                  <s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
               </s:sequence>
            </s:complexType>
         </s:element>
         <s:element name="GetCityWeatherByZIPResponse">
            <s:complexType>
               <s:sequence>
                  <s:element minOccurs="1" maxOccurs="1"
                     name="GetCityWeatherByZIPResult" type="tns:WeatherReturn" />
               </s:sequence>
            </s:complexType>
         </s:element>
         <s:complexType name="WeatherReturn">
            <s:sequence>
               <s:element minOccurs="1" maxOccurs="1" name="Success"
                  type="s:boolean" />
               <s:element minOccurs="0" maxOccurs="1" name="ResponseText"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity"
                  type="s:string" />
               <s:element minOccurs="1" maxOccurs="1" name="WeatherID"
                  type="s:short" />
               <s:element minOccurs="0" maxOccurs="1" name="Description"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Temperature"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="RelativeHumidity"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Wind" type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Pressure"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Visibility"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="WindChill"
                  type="s:string" />
               <s:element minOccurs="0" maxOccurs="1" name="Remarks"
                  type="s:string" />
            </s:sequence>
         </s:complexType>
         <s:element name="ArrayOfWeatherDescription" nillable="true"
            type="tns:ArrayOfWeatherDescription" />
         <s:element name="ForecastReturn" nillable="true"
            type="tns:ForecastReturn" />
         <s:element name="WeatherReturn" type="tns:WeatherReturn" />
      </s:schema>
   </wsdl:types>
   <wsdl:message name="GetWeatherInformationSoapIn">
      <wsdl:part name="parameters" element="tns:GetWeatherInformation" />
   </wsdl:message>
   <wsdl:message name="GetWeatherInformationSoapOut">
      <wsdl:part name="parameters" element="tns:GetWeatherInformationResponse" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPSoapIn">
      <wsdl:part name="parameters" element="tns:GetCityForecastByZIP" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPSoapOut">
      <wsdl:part name="parameters" element="tns:GetCityForecastByZIPResponse" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPSoapIn">
      <wsdl:part name="parameters" element="tns:GetCityWeatherByZIP" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPSoapOut">
      <wsdl:part name="parameters" element="tns:GetCityWeatherByZIPResponse" />
   </wsdl:message>
   <wsdl:message name="GetWeatherInformationHttpGetIn" />
   <wsdl:message name="GetWeatherInformationHttpGetOut">
      <wsdl:part name="Body" element="tns:ArrayOfWeatherDescription" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPHttpGetIn">
      <wsdl:part name="ZIP" type="s:string" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPHttpGetOut">
      <wsdl:part name="Body" element="tns:ForecastReturn" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPHttpGetIn">
      <wsdl:part name="ZIP" type="s:string" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPHttpGetOut">
      <wsdl:part name="Body" element="tns:WeatherReturn" />
   </wsdl:message>
   <wsdl:message name="GetWeatherInformationHttpPostIn" />
   <wsdl:message name="GetWeatherInformationHttpPostOut">
      <wsdl:part name="Body" element="tns:ArrayOfWeatherDescription" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPHttpPostIn">
      <wsdl:part name="ZIP" type="s:string" />
   </wsdl:message>
   <wsdl:message name="GetCityForecastByZIPHttpPostOut">
      <wsdl:part name="Body" element="tns:ForecastReturn" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPHttpPostIn">
      <wsdl:part name="ZIP" type="s:string" />
   </wsdl:message>
   <wsdl:message name="GetCityWeatherByZIPHttpPostOut">
      <wsdl:part name="Body" element="tns:WeatherReturn" />
   </wsdl:message>
   <wsdl:portType name="WeatherSoap">
      <wsdl:operation name="GetWeatherInformation">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets Information
            for each WeatherID</wsdl:documentation>
         <wsdl:input message="tns:GetWeatherInformationSoapIn" />
         <wsdl:output message="tns:GetWeatherInformationSoapOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City Forecast Over the Next 7 Days, which is updated hourly.
            U.S. Only</wsdl:documentation>
         <wsdl:input message="tns:GetCityForecastByZIPSoapIn" />
         <wsdl:output message="tns:GetCityForecastByZIPSoapOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City's Weather, which is updated hourly. U.S. Only
         </wsdl:documentation>
         <wsdl:input message="tns:GetCityWeatherByZIPSoapIn" />
         <wsdl:output message="tns:GetCityWeatherByZIPSoapOut" />
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:portType name="WeatherHttpGet">
      <wsdl:operation name="GetWeatherInformation">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets Information
            for each WeatherID</wsdl:documentation>
         <wsdl:input message="tns:GetWeatherInformationHttpGetIn" />
         <wsdl:output message="tns:GetWeatherInformationHttpGetOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City Forecast Over the Next 7 Days, which is updated hourly.
            U.S. Only</wsdl:documentation>
         <wsdl:input message="tns:GetCityForecastByZIPHttpGetIn" />
         <wsdl:output message="tns:GetCityForecastByZIPHttpGetOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City's Weather, which is updated hourly. U.S. Only
         </wsdl:documentation>
         <wsdl:input message="tns:GetCityWeatherByZIPHttpGetIn" />
         <wsdl:output message="tns:GetCityWeatherByZIPHttpGetOut" />
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:portType name="WeatherHttpPost">
      <wsdl:operation name="GetWeatherInformation">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Gets Information
            for each WeatherID</wsdl:documentation>
         <wsdl:input message="tns:GetWeatherInformationHttpPostIn" />
         <wsdl:output message="tns:GetWeatherInformationHttpPostOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City Forecast Over the Next 7 Days, which is updated hourly.
            U.S. Only</wsdl:documentation>
         <wsdl:input message="tns:GetCityForecastByZIPHttpPostIn" />
         <wsdl:output message="tns:GetCityForecastByZIPHttpPostOut" />
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Allows you to get
            your City's Weather, which is updated hourly. U.S. Only
         </wsdl:documentation>
         <wsdl:input message="tns:GetCityWeatherByZIPHttpPostIn" />
         <wsdl:output message="tns:GetCityWeatherByZIPHttpPostOut" />
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="WeatherSoap" type="tns:WeatherSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="GetWeatherInformation">
         <soap:operation soapAction="http://ws.cdyne.com/WeatherWS/GetWeatherInformation"
            style="document" />
         <wsdl:input>
            <soap:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <soap:operation soapAction="http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP"
            style="document" />
         <wsdl:input>
            <soap:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <soap:operation soapAction="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"
            style="document" />
         <wsdl:input>
            <soap:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding name="WeatherSoap12" type="tns:WeatherSoap">
      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="GetWeatherInformation">
         <soap12:operation
            soapAction="http://ws.cdyne.com/WeatherWS/GetWeatherInformation"
            style="document" />
         <wsdl:input>
            <soap12:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap12:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <soap12:operation
            soapAction="http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP"
            style="document" />
         <wsdl:input>
            <soap12:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap12:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <soap12:operation soapAction="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"
            style="document" />
         <wsdl:input>
            <soap12:body use="literal" />
         </wsdl:input>
         <wsdl:output>
            <soap12:body use="literal" />
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding name="WeatherHttpGet" type="tns:WeatherHttpGet">
      <http:binding verb="GET" />
      <wsdl:operation name="GetWeatherInformation">
         <http:operation location="/GetWeatherInformation" />
         <wsdl:input>
            <http:urlEncoded />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <http:operation location="/GetCityForecastByZIP" />
         <wsdl:input>
            <http:urlEncoded />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <http:operation location="/GetCityWeatherByZIP" />
         <wsdl:input>
            <http:urlEncoded />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:binding name="WeatherHttpPost" type="tns:WeatherHttpPost">
      <http:binding verb="POST" />
      <wsdl:operation name="GetWeatherInformation">
         <http:operation location="/GetWeatherInformation" />
         <wsdl:input>
            <mime:content type="application/x-www-form-urlencoded" />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityForecastByZIP">
         <http:operation location="/GetCityForecastByZIP" />
         <wsdl:input>
            <mime:content type="application/x-www-form-urlencoded" />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="GetCityWeatherByZIP">
         <http:operation location="/GetCityWeatherByZIP" />
         <wsdl:input>
            <mime:content type="application/x-www-form-urlencoded" />
         </wsdl:input>
         <wsdl:output>
            <mime:mimeXml part="Body" />
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="Weather">
      <wsdl:port name="WeatherSoap" binding="tns:WeatherSoap">
         <soap:address location="http://wsf.cdyne.com/WeatherWS/Weather.asmx" />
      </wsdl:port>
      <wsdl:port name="WeatherSoap12" binding="tns:WeatherSoap12">
         <soap12:address location="http://wsf.cdyne.com/WeatherWS/Weather.asmx" />
      </wsdl:port>
      <wsdl:port name="WeatherHttpGet" binding="tns:WeatherHttpGet">
         <http:address location="http://wsf.cdyne.com/WeatherWS/Weather.asmx" />
      </wsdl:port>
      <wsdl:port name="WeatherHttpPost" binding="tns:WeatherHttpPost">
         <http:address location="http://wsf.cdyne.com/WeatherWS/Weather.asmx" />
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

Thank you.
12 REPLIES 12

jbarrez
Star Contributor
Star Contributor
It does seem that CXF has issues with interpreting the List web param.

What does happen if you don't use a list? Does it work then?

krull80
Champ in-the-making
Champ in-the-making
Hello,

As Joram said, there is a problem with XSd types that are using a list. for example:
<code>
<complextype>
   <sequence>
      <element name="sample" maxOccurrs="unbounded"/>
</sequence>
</complextype>
</code>

If you have a type defined like above and you are using it as a message input type in your wsdl the parser will fail, in fact, I have debugged it and it will give you an error in the method <code>CxfWSDLImporter.importStructure</code> while invoking <code>ReflectUtil.loadClass</code> as the java.util.list<your type list> doesn't exist.

The problem was solved after changing the list for a single element ( but you loose the possibility of using lists). I'm checking a workaround for this problem, so I will let you know if I find it.

Regards
Luis

krull80
Champ in-the-making
Champ in-the-making
Hello Again,

I have discovered the root cause of the problem and a work around for it ( it worked for a similar problem I had). In your wsdl definition, where you have:

<code>
<s:element name="ArrayOfWeatherDescription" nillable="true"
    type="tns:ArrayOfWeatherDescription" />
</code>

you need to do:

<code>
<s:element name="ArrayOfWeatherDescription" nillable="true"
    type="tns:ArrayOfWeatherDescriptionListType" />
<s:complexType name="ArrayOfWeatherDescriptionListType">
       <s:sequence>
              <s:element name="ArrayOfweatherDescriptionList" type="tns:ArrayOfWeatherDescription"/>
       </s:sequence>
</s:complexType>
</code>

This will add an extra wrapper <i>ArrayOfweatherDescriptionList</i> that will avoid the problem, but unfortunately it will change the contract definition. This is a problem that should be solved  , but in the mean time , at list you can continue working on it.

Regards