Error consuming a webservice

415 views
Skip to first unread message

Michael Hnat

unread,
Feb 6, 2015, 9:37:43 AM2/6/15
to lu...@googlegroups.com
Hi,

after all the Lucee posts about filextensions, etc. I have a coding question :-)

I'm trying to connect to the cleverreach API, but I stuck in the first line of code.


results in the following error, and I have no clue what it is:

Lucee 4.5.0.042 Error (java.io.IOException)
Message Type {http://schemas.xmlsoap.org/wsdl/}string is referenced but not defined.
Cause java.io.IOException


Stacktrace:
Type {http://schemas.xmlsoap.org/wsdl/}string is referenced but not defined.
     at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665):665
     at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545):545
     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518):518
     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495):495
     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361):361
     at java.lang.Thread.run(Unknown Source):-1
     at lucee.runtime.exp.NativeException.(Unknown Source):-1
     at lucee.runtime.op.Caster.toPageException(Unknown Source):-1
     at lucee.runtime.net.rpc.client.Axis1Client.run(Unknown Source):-1
     at lucee.runtime.net.rpc.client.Axis1Client.(Unknown Source):-1
     at lucee.runtime.net.rpc.client.WSClient.getInstance(Unknown Source):-1
     at lucee.runtime.functions.other.CreateObject.doWebService(Unknown Source):-1
     at lucee.runtime.functions.other.CreateObject.call(Unknown Source):-1
     at lucee.runtime.functions.other.CreateObject.call(Unknown Source):-1
     at cleverreach.api_cfm$cf.call(D:\Desktop\lucee-4.5.0.042-express\webapps\ROOT\cleverreach\api.cfm:64):64


Happy about any idea or hint.

Thanks,
Michi

Kai Koenig

unread,
Feb 6, 2015, 11:06:03 PM2/6/15
to lu...@googlegroups.com
I’m assuming that’s not an issue with Lucee, but the provided WSDL looks as if it could be the issue.

The error message tells your that the WSDL parser is looking for an element string in the namespace http://schemas.xmlsoap.org/wsdl and can’t find it.

As far as I can see, all string references are properly namespaced with xsd: but this one:

<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]/>

In the WSDL spec there is a wsdl:arrayType, nevertheless I would think the string[] should be xsd:string[] though and it seems to me with the string[] not being namespaced, Axis would try to interpret it as part of the WSDL namespace (and spec).

Cheers
Kai



--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/9bedba56-b048-43c3-b9b2-3cda83aeb50b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hnat

unread,
Feb 9, 2015, 8:32:16 AM2/9/15
to lu...@googlegroups.com
Thanks for the hint.
I got in contact with the guys of Cleverreach and there is no problem when using the latest wsdl2java 1.6.2 and even the Apache CXF 3.0.3.
The Problem seems to be the axis version used in Railo/Lucee which is dated as:
Name: org/apache/axis
Implementation-Title: Apache Axis
Implementation-Version: 1.4 1855 April 22 2006
Implementation-Vendor: Apache Web Services


Is there a way to replace it with the current version? I read, that it's not easy to do this, but currently I'm screwed, since I'm not able to communicate with cleverreach. Am I the only one who has to communicate with cleverreach?

Still, any help welcome.

Judith Barnett

unread,
Feb 9, 2015, 8:38:29 AM2/9/15
to lu...@googlegroups.com
According to Axis website, 1.4 dated April 22, 2006 is the latest version.
https://axis.apache.org/axis/

Michael Hnat

unread,
Feb 9, 2015, 8:47:45 AM2/9/15
to lu...@googlegroups.com
It is for Axis 1.
But the service I have to consume requires Axis 2, which is currently version 1.6.2, dated April 2012

Trying this with the latest Axis2 1.6.2 works fine:
'./bin/wsdl2java.sh -uri "http://api.cleverreach.com/soap/interface_v5.1.php?wsdl&literal=true"';


still screwed,
Michi

Michael Hnat

unread,
Feb 9, 2015, 9:36:21 AM2/9/15
to lu...@googlegroups.com
Hi,

not screwed anymore :-)
Kai, thanks. It was exactly what you mentioned and cleverreach changed it to make their API Axis 1.4 compatible.

Thanks,
Michi

Kai Koenig

unread,
Feb 9, 2015, 1:24:45 PM2/9/15
to lu...@googlegroups.com
Axis 2 is a _very_ different implementation of Webservices than Axis 1 is. From experience working with both, it’s not a trivial thing to just “switch” it in Railo.

A suggestion I can make is to write (or get you someone to write you) a Java proxy using Axis 2 that handles the communication with your service that runs on some port on your server and Railo communicating with the endpoint on that port. I’ve had to do similar with ACF that only supported Axis 1 until version 9 or so and I needed to communicate with certain WS-* endpoints.

Cheers
Kai

Kai Koenig

unread,
Feb 9, 2015, 1:25:26 PM2/9/15
to lu...@googlegroups.com
Oh, cool! So, ignore my alternative suggestion from the previous mail then :)

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages