Did you try creating a CFC named DataNode and using cfproperty to define all
of the elements in the DataNode class?  We use a similar method to
communicate to a fairly complex WS.

Try the attached files...

Roland

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nando
Sent: Friday, October 14, 2005 10:01 AM
To: [email protected]
Subject: [CFCDev] communicating with a .NET web service


If anyone can shed some light on this ... 

Here's the url to the WSDL

http://igo2.dotnet31.hostbasket.com/data.asmx?wsdl

I'm trying to figure out how to pass data into the Write method. It's some
sort of structure / array / component mix, but i haven't been able to
decipher it.

Just to say, i've asked and received from the .NET developer a simplier
interface with a flat structure and have it working, the WriteContact
method, so this isn't essential, but after spending a day with this, i'm
still wondering how to figure this out - if someone here has some practical
experience.

There's a nice, complex article here on the topic  ...
http://hcc.musc.edu/research/shared_resources/xml_complex_types_to_cf_struct
ure_notes.cfm

.. that in the end, suggests to use WSDL2Java, which i did, but i don't
really get how decipher the java back to CF. 

Maybe i'm over my head here. If i am, just tell me and i'll get out of the
water.

Here's some output from the WSDL2Java tool, just in case it makes perfect
sense to someone how to translate this back into CF:

/**
 * ArrayOfDataNode.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC2 Dec 17, 2004 (12:21:34 EST) WSDL2Java emitter.
 */

package com.invigo.ws;

public class ArrayOfDataNode  implements java.io.Serializable {
    private com.invigo.ws.DataNode[] dataNode;

    public ArrayOfDataNode() {
    }

    public ArrayOfDataNode(
           com.invigo.ws.DataNode[] dataNode) {
           this.dataNode = dataNode;
    }


    /**
     * Gets the dataNode value for this ArrayOfDataNode.
     * 
     * @return dataNode
     */
    public com.invigo.ws.DataNode[] getDataNode() {
        return dataNode;
    }


    /**
     * Sets the dataNode value for this ArrayOfDataNode.
     * 
     * @param dataNode
     */
    public void setDataNode(com.invigo.ws.DataNode[] dataNode) {
        this.dataNode = dataNode;
    }

    public com.invigo.ws.DataNode getDataNode(int i) {
        return this.dataNode[i];
    }

    public void setDataNode(int i, com.invigo.ws.DataNode _value) {
        this.dataNode[i] = _value;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ArrayOfDataNode)) return false;
        ArrayOfDataNode other = (ArrayOfDataNode) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.dataNode==null && other.getDataNode()==null) || 
             (this.dataNode!=null &&
              java.util.Arrays.equals(this.dataNode, other.getDataNode())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getDataNode() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getDataNode());
                 i++) {
                java.lang.Object obj =
java.lang.reflect.Array.get(getDataNode(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(ArrayOfDataNode.class,
true);

    static {
        typeDesc.setXmlType(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "ArrayOfDataNode"));
        org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
        elemField.setFieldName("dataNode");
        elemField.setXmlName(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "DataNode"));
        elemField.setXmlType(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "DataNode"));
        elemField.setMinOccurs(0);
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


/**
 * DataNode.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC2 Dec 17, 2004 (12:21:34 EST) WSDL2Java emitter.
 */

package com.invigo.ws;

public class DataNode  implements java.io.Serializable {
    private java.lang.String path;
    private java.lang.Object data;
    private boolean reconcKey;

    public DataNode() {
    }

    public DataNode(
           java.lang.String path,
           java.lang.Object data,
           boolean reconcKey) {
           this.path = path;
           this.data = data;
           this.reconcKey = reconcKey;
    }


    /**
     * Gets the path value for this DataNode.
     * 
     * @return path
     */
    public java.lang.String getPath() {
        return path;
    }


    /**
     * Sets the path value for this DataNode.
     * 
     * @param path
     */
    public void setPath(java.lang.String path) {
        this.path = path;
    }


    /**
     * Gets the data value for this DataNode.
     * 
     * @return data
     */
    public java.lang.Object getData() {
        return data;
    }


    /**
     * Sets the data value for this DataNode.
     * 
     * @param data
     */
    public void setData(java.lang.Object data) {
        this.data = data;
    }


    /**
     * Gets the reconcKey value for this DataNode.
     * 
     * @return reconcKey
     */
    public boolean isReconcKey() {
        return reconcKey;
    }


    /**
     * Sets the reconcKey value for this DataNode.
     * 
     * @param reconcKey
     */
    public void setReconcKey(boolean reconcKey) {
        this.reconcKey = reconcKey;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof DataNode)) return false;
        DataNode other = (DataNode) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.path==null && other.getPath()==null) || 
             (this.path!=null &&
              this.path.equals(other.getPath()))) &&
            ((this.data==null && other.getData()==null) || 
             (this.data!=null &&
              this.data.equals(other.getData()))) &&
            this.reconcKey == other.isReconcKey();
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getPath() != null) {
            _hashCode += getPath().hashCode();
        }
        if (getData() != null) {
            _hashCode += getData().hashCode();
        }
        _hashCode += (isReconcKey() ? Boolean.TRUE :
Boolean.FALSE).hashCode();
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(DataNode.class, true);

    static {
        typeDesc.setXmlType(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "DataNode"));
        org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
        elemField.setFieldName("path");
        elemField.setXmlName(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "Path"));
        elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("data");
        elemField.setXmlName(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "Data"));
        elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "anyType"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("reconcKey");
        elemField.setXmlName(new
javax.xml.namespace.QName("http://invigo.com/ws/";, "ReconcKey"));
        elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "boolean"));
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Attachment: DataNode.cfc
Description: application/cfc

Attachment: test.cfm
Description: application/cfm

Reply via email to