I've managed to consume a webservice that uses a complex data
type as one of its input parameters on my
DEVELOPMENT machine
(WinXP, CF Dev 7,0,0,91690). I get the following error when I move
the code up to our
STAGING server (Win2003,
CF Standard 7,0,2,142559):
Error converting CFML arguments to Java classes for web service
invocation.
Unable to create web service argument class
[Ljava.lang.String;. Error: java.lang.InstantiationException:
[Ljava.lang.String;. Often this is because the web service defines
an abstract complexType as an input to an operation. You must
create an actual instance of this type in Java.
It looks like my development server is creating the propper
stub objects for the complex types (i.e. class files in the
C:\CfusionMX7\stubs\ directory) , but the staging server is not.
I'm hiting the same WSDL from both servers and the complex type is
clearly defined in the wsdl, so I don't know why one server would
interpret it correctly and the other can not. Is this a bug in CF
webservice implementation?
Can anyone tell me:
1) How I can get my staging server (Win2003, CF Standard
7,0,2,142559) to generate the propper stubs
or
2) A work around? I know I CAN use wsdl2java.exe to generate
the stubs manually, I'm just having a hard time with the HOW:
- I've executed wsdl2java.exe [url-of-wsdl] to create the
java files
- From what I've read on the forums, I think I should be able
to use the code below to compile the java objects into stubs, but
it doesn't seem to work:
- I can generate the class file for the specific missing stub,
then move it to the correct directory in cfusionmx7/stubs, but I
still get the same error[/li]
- If i try to generate stubs for all the java files, I get
errors.[/li]
The code I use to compile the java files is listed below:
javac -source 1.4 -deprecation -classpath
C:/CFusionMX7/lib/axis.jar;C:/CFusionMX7/lib/xml-apis.jar;C:/CFusionMX7/lib/saaj.jar;C:/CFusionMX7/lib/jaxrpc.jar;.
C:/CFusionMX7/runtime/bin/com/mycompany/mypackage/util/*.java
Anyone have any ideas? Of course, to make matters worse, the
reference I normally use to deal with complex data types in CF has
gone all 404:
http://hcc.musc.edu/research/shared_resources/xml_complex_types_to_cf_structure_notes.cfm.
If anyone knows of a good reference for this material, I'd love to
see it.
Thanks all,