Skip to main content
Participating Frequently
April 20, 2015
Question

Error when consuming a web service in CF 11

  • April 20, 2015
  • 1 reply
  • 1107 views

I am consuming a web service in ColdFusion what was written in .NET.  Some methods of the web service work fine, but some we get the below error.  We have identified the issue is the name of one of the properties in the web service appears to be the issue.  The property name is ID.  This is a very common property name so I would think someone has run across this before.  It appears that maybe ID is a default property for Axis?  I can dump the method that works and I see there is a getID() method with a return type of org.apache.axis.types.Id.

If we change the name of the property to something other than ID it works, but this will cause us to refactor a lot of code.

Here is the error I get when I try to call GetRoles method, which contains an ID property:

Cannot perform web service invocation GetRoles. The fault returned when invoking the web service operation is:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: For input string: "i1"
java.lang.NumberFormatException: For input string: "i1"
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: For input string: "i1"
java.lang.NumberFormatException: For input string: "i1"
at org.apache.axis.encoding.ser.BeanDeserializer.onStartElement(BeanDeserializer.java:462)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message... ''

I am running CF 11 Update 4.

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    May 2, 2015

    You may have passed "i1" where the service is expecting a number.

    DwightAuthor
    Participating Frequently
    May 2, 2015

    ‌thanks for the reply.  I will check on the i1 but the service works fine when called from .net.  Also this is not the only one that gives this error.  It looks like it is the ones that returns a field from the database called ID.  If we do not return the ID field with the service to works.  I was thinking ID or rather getID() was a reserved word or something.

    BKBK
    Community Expert
    Community Expert
    May 2, 2015

    I see what you mean. Nevertheless, the service is complaining about the string "i1" being passed as a number.

    A common mistake is to pass "i1" instead of "valueOfVariable(i1)". In Coldfusion terms, passing "i1" instead of "#i1#".