How can one explicitly define the data type of a parameter for use in a web 
service?

I am trying to access this web service 
[http://geocoder.us/dist/eg/clients/GeoCoder.wsdl].  

I have tried both the following code blocks.

<cfscript>
 ws = CreateObject("webservice", 
"http://geocoder.us/dist/eg/clients/GeoCoder.wsdl";);
 test = ws.geocode("1625 Stockton Blvd, Sacramento CA");
</cfscript>

AND 

<cfinvoke webservice="http://geocoder.us/dist/eg/clients/GeoCoder.wsdl"; 
returnvariable="test" method="geocode">
        <cfinvokeArgument name="location" value="1625 Stockton Blvd, Sacramento 
CA" />
</cfinvoke>

When I run either of these I get the following error.
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.IllegalArgumentException: array element type mismatch
 faultActor: 
 faultNode: 
 faultDetail: 
        
{http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException: 
array element type mismatch
        at java.lang.reflect.Array.set(Native Method)
        at 
org.apache.axis.utils.ArrayUtil.convertArrayToObject(ArrayUtil.java:271)
        at org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:371)
        at org.apache.axis.client.Call.invoke(Call.java:2580)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at 
us.geocoder.rpc.Geo.Coder.US.GeoCode_BindingStub.geocode(GeoCode_BindingStub.java:218)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unk...  
 

The only bit I understand in all that is the "array element type mismatch" and 
the only thing I can think that means is that the webservice is not 
understanding the data type of my parameter.

Otherwise it is a pretty straight forward webservice, so I would have thought 
it was easy to use.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240444
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to