Using wsdl2java cxf tool to generate my service and everything runs fine, and 4 of the 5 services work. But I get this runtime error when I hit the RetrieveSfAccounts operation:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1.1:java (default-cli) on project sf-account-soap: An exception occured while executing the Java class. null: InvocationTargetException: Marshalling Error: Instance of "com.cn.dsa.sfaccount.InputRetrieveSfAccounts" is substituting "java.lang.Object", but "com.cn.dsa.sfaccount.InputRetrieveSfAccounts" is bound to an anonymous type. ->
In the wsdl:
<xs:complexType name="Account">
<xs:sequence>
<xs:element type="xs:string" name="id"/>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="firstName"/>
<xs:element type="xs:string" name="lastName"/>
<xs:element type="xs:string" name="workEmail"/>
</xs:sequence>
</xs:complexType>
Here's the method I wrote in the Processor class (camel) handling the actual service:
/****************** GET ALL ACCOUNTS ******************/
if ("InputRetrieveSfAccounts".equals(operationName)) {