Consuming Web Service - Array of Complex object Issue

Hi,

I am a newbie to Lucee. I am looking for an open source platform where I can host coldfusion. I am trying to run a POC and had success for most of parts except web service integrations.

The application hosted on Lucee currently required a third party web service integration and we used to use following code.

wsobject = CreateObject("webservice", "URL to web service");

What I can share with you is that the web service returns an Array of a complex object. I am getting an error as below.

org.apache.axis.AxisFault: 
  ; nested exception is: 
    org.xml.sax.SAXException: 
      Unable to create JavaBean of type [La1jutmohj4zmcj.validateaddressPOC;. Missing default constructor? 
      Error was: java.lang.InstantiationException: [La1jutmohj4zmcj.validateaddressPOC

validateaddressPOC is the class name.

I noticed that Axis creates an java class under cfclasses/RPC. It is very strange though that the package name space does not match at all. I decompiled java class and notice that package namespace is a1jutmohj4zmcj. That is without ‘[L’.

Has anyone had similar issue? If so, have you resolved this issue?

Kind Regards

Just to confirm, is this existing code that worked on Adobe ColdFusion already? If so, which specific version?

Which version of Lucee are you running, if it’s not the latest version can you try that?

Basically, it would be really helpful if you could post the webservice URL? I understand
that may not be possible on the public mailing list

Can I suggest filing a bug in jira ( https://luceeserver.atlassian.net/ ) and then whoever
triages the problem can contact you directly and attempt to reproduce the problem.

Hi Andrew,

Yes, existing code works without any issues. The code was there since coldfusion MX era.

Hi Zac,

thank you. We are using the latest version of Lucee. In terms of service URL, I cannot provide you that because it is hidden behind firewall. This SOAP web service is not public web service but internal one that our coldfusion front end consumes.

The web service returns array of complex object and it seems like Axis 1.4 may not be able to handle this, especially when array object is a nested object. Below is operation SOAP.

> <element name="validateAddressDetailsResponse">
> <complexType>
> <sequence>
> <element name="result" nillable="true" type="xsd:string"/>
> <element name="plAddressOK" nillable="true" type="xsd:boolean"/>
> <element name="pcAddressError" nillable="true" type="xsd:string"/>
> <element name="ttAddressMaster" nillable="true" type="**S2:validateAddressDetails_ttAddressMasterParam**"/>
> <element name="piAddrMatch" nillable="true" type="xsd:int"/>
> <element name="plMoreAddress" nillable="true" type="xsd:boolean"/>
> </sequence>
> </complexType>
> </element>

> <complexType name="**validateAddressDetails_ttAddressMasterParam**">
> <sequence>
> **<element maxOccurs="unbounded" minOccurs="0" name="ttAddressMasterRow" type="S2:validateAddressDetails_ttAddressMasterRow"/>**
> </sequence>
> </complexType>

Maybe Axis 1.4 is not designed for consuming this type of web service? Do you know if this is an unknown issue?

Hi Eric,

I’ve had a quick chat with the development team and we think this is as you have said, the lack of Axis2 support, so we need to look at adding Axis2 support. I see you have raised a ticket for this on the Lucee bug tracker, [LDEV-1251] - Lucee, which I’ve pointed out to the developers and product manager (@IamSigmund), so hopefully, we can address it in an upcoming sprint.

Kind regards,

Andrew.

1 Like

Facing a similar or same problem when trying to consume web services with Lucee.

IN ACF a call to web service like:

pws = CreateObject("webservice","#wsPermWsdl#");
return pws.getAllProposalPermissions("#arguments.pid#");

dumps:
getAllPermissionsDump - object of com.xxxxx.xxxx.server.permission.UserPerm
Class Name com.xxxxx.xxxxxx.server.permission.UserPerm
Methods Method Return Type


equals(java.lang.Object) boolean
getDeserializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName) org.apache.axis.encoding.Deserializer
getPermActions(int) java.lang.String
getPermActions() java.lang.String[]
getSerializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName) org.apache.axis.encoding.Serializer
getTypeDesc() org.apache.axis.description.TypeDesc
getUserId() java.lang.String
hashCode() int
isGroup() boolean
setGroup(boolean) void
setPermActions(java.lang.String[]) void
setPermActions(int, java.lang.String) void
setUserId(java.lang.String) void


In Lucee 5 the same call the web service returns:

Lucee 5.2.7.63 Error (org.apache.axis.AxisFault)
Message ; nested exception is:
java.lang.NullPointerException


What is the work around for this bug?

I have the same issue now, did you found an easy woraround?