OK, I have an example that I don't see how it gets translated by CFMX 
automagically. Take this example document request, generated via Java, I think. 
SOrry for the long post. How does this get translated, or do I ned to 
specfically add stuff like the model name="contacts" attribute, rather than 
just having CFMX pass <model>:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; >
        <soap:Body>
                <contactsAdd filename="contacts" attachmentInfo="false" 
attachmentData="false" ignoreEmptyElements="true" 
xmlns="http://peregrine.com/casm";>
                        <model name="contacts" query="">
                                <keys name="contacts" query="">
                                        <contact.name sctype="string" 
mandatory="false">user,me</contact.name>
                                </keys>
                                <instance name="contacts" query="" 
uniquequery="">
                                        <contact.name sctype="string" 
mandatory="false"/>
                                        <user.id sctype="string" 
mandatory="false">123456</user.id>
                                        <group sctype="string" 
mandatory="false"/>
                                        <shift sctype="string" 
mandatory="false"/>
                                        <dept sctype="string" 
mandatory="false"/>
                                        <last.name sctype="string" 
mandatory="false"/>
                                        <first.name sctype="string" 
mandatory="false"/>
                                        <contact.phone sctype="string" 
mandatory="false"/>
                                        <extension sctype="string" 
mandatory="false"/>
                                        <location sctype="string" 
mandatory="false"/>
                                        <floor sctype="string" 
mandatory="false"/>
                                        <email sctype="string" 
mandatory="false"/>
                                        <home.phone sctype="string" 
mandatory="false"/>
                                        <beeper.phone sctype="string" 
mandatory="false"/>
                                        <car.phone sctype="string" 
mandatory="false"/>
                                        <alternate.contacts/>
                                        <alternate.phones/>
                                        <comments>
                                                <comments sctype="string" 
mandatory="false">This is a comment</comments>
                                        </comments>
                                        <logical.name sctype="string" 
mandatory="false"/>
                                        <title sctype="string" 
mandatory="false"/>
                                        <building sctype="string" 
mandatory="false"/>
                                        <portable.phone sctype="string" 
mandatory="false"/>
                                        <voice.mailbox sctype="string" 
mandatory="false"/>
                                        <pager.type sctype="string" 
mandatory="false"/>
                                        <pager.name sctype="string" 
mandatory="false"/>
                                        <pager.group sctype="string" 
mandatory="false"/>
                                        <pager.pin sctype="string" 
mandatory="false"/>
                                        <fax.phone sctype="string" 
mandatory="false"/>
                                        <company sctype="string" 
mandatory="false"/>
                                        <pager.vendor sctype="string" 
mandatory="false"/>
                                        <email.events/>
                                        <manager sctype="string" 
mandatory="false"/>
                                        <location.code sctype="string" 
mandatory="false"/>
                                        <page.response sctype="boolean" 
mandatory="false"/>
                                        <updated.by sctype="string" 
mandatory="false"/>
                                        <event.updated sctype="boolean" 
mandatory="false"/>
                                        <sysmodtime sctype="dateTime" 
mandatory="false"/>
                                        <wdCustMinExp sctype="decimal" 
mandatory="false"/>
                                        <wdContactTimeStamp sctype="decimal" 
mandatory="false"/>
                                        <wdUD1 sctype="decimal" 
mandatory="false"/>
                                        <wdUD2 sctype="decimal" 
mandatory="false"/>
                                        <wdCustPriority sctype="decimal" 
mandatory="false"/>
                                        <contract.id sctype="decimal" 
mandatory="false"/>
                                        <sysmodcount sctype="decimal" 
mandatory="false"/>
                                        <sysmoduser sctype="string" 
mandatory="false"/>
                                        <valid.from sctype="dateTime" 
mandatory="false"/>
                                        <valid.to sctype="dateTime" 
mandatory="false"/>
                                        <personnel.area sctype="string" 
mandatory="false"/>
                                        <personnel.subarea sctype="string" 
mandatory="false"/>
                                        <company.code sctype="string" 
mandatory="false"/>
                                        <cost.center sctype="string" 
mandatory="false"/>
                                        <aristocratic.title sctype="string" 
mandatory="false"/>
                                        <language sctype="string" 
mandatory="false"/>
                                        <form.of.address sctype="string" 
mandatory="false"/>
                                        <sap.language sctype="string" 
mandatory="false"/>
                                        <sap.communications>
                                                <sap.communications>
                                                        <phone.type 
sctype="string" mandatory="false">sapphonetype</phone.type>
                                                        <phone.no 
sctype="string" mandatory="false">sapphoneno</phone.no>
                                                </sap.communications>
                                        </sap.communications>
                                        <home.address.1 sctype="string" 
mandatory="false"/>
                                        <home.city sctype="string" 
mandatory="false"/>
                                        <home.state sctype="string" 
mandatory="false"/>
                                        <home.zip sctype="string" 
mandatory="false"/>
                                        <home.address.2 sctype="string" 
mandatory="false"/>
                                        <home.address.3 sctype="string" 
mandatory="false"/>
                                        <home.address.4 sctype="string" 
mandatory="false"/>
                                        <erp.system sctype="string" 
mandatory="false"/>
                                        <operator.id sctype="string" 
mandatory="false"/>
                                        <soc.sec.no sctype="string" 
mandatory="false"/>
                                        <office.cube sctype="string" 
mandatory="false"/>
                                        <active sctype="boolean" 
mandatory="false"/>
                                        <pay.type sctype="string" 
mandatory="false"/>
                                        <contact.severity sctype="boolean" 
mandatory="false"/>
                                        <cost.centre sctype="string" 
mandatory="false"/>
                                        <payroll.no sctype="string" 
mandatory="false"/>
                                        <user.type sctype="string" 
mandatory="false"/>
                                        <requires.entitlement sctype="boolean" 
mandatory="false"/>
                                        <address.1 sctype="string" 
mandatory="false"/>
                                        <address.2 sctype="string" 
mandatory="false"/>
                                        <address.3 sctype="string" 
mandatory="false"/>
                                        <postcode sctype="string" 
mandatory="false"/>
                                        <city sctype="string" 
mandatory="false"/>
                                        <format sctype="string" 
mandatory="false"/>
                                        <room sctype="string" 
mandatory="false"/>
                                        <corp.structure sctype="string" 
mandatory="false"/>
                                        <location.full.name sctype="string" 
mandatory="false"/>
                                        <dept.name sctype="string" 
mandatory="false"/>
                                        <attachments/>
                                </instance>
                                <messages severity="0" module=""/>
                        </model>
                </contactsAdd>
        </soap:Body>
</soap:Envelope>


>First, see the documentation for more info.
>
>Second, what you are constructing with the CFML data is something that the
>runtime can translate in to the *Java* arguments to the web service stub
>generated by the Apache Axis web service engine that lies at the heart of
>the CFMX web service support.
>
>The Axis WSDL2Java command is executed on the WSDL file specified in the
>admin or the cfinvoke.  This produces Java source files which are then
>compiled (only the first time) and examined for the function signature that
>matches the arguments you passed in to cfinvoke.
>
>For instance if you have the following schema in your WSDL:
>      <complexType name="SOAPStruct">
>        <all>
>          <element name="varString" type="string"/>
>          <element name="varInt" type="int"/>
>          <element name="varFloat" type="float"/>
>        </all>
>      </complexType>
>
>This causes a JavaBean to be created that has 3 data items in it:
>    String varString;
>    int varInt;
>    float varFloat;
>
>If this were one of the arguments to an operation, say echo, then the Java
>function that CFMX is looking at could have the signature:
>   SOAPStruct echo(SOAPStruct in)
>
>If you create a CFML structure like this:
>  s = StructNew();
>  s.varString = "hi";
>  s.varInt = 123;
>  s.varFloat = 45.678;
>
>Then CFMX will call the setter method for each of the keys in the struct and
>create a SOAPStruct Java object that it will pass in to the function.
>
>As far as attributes (not child elements) are concerned, the JavaBean will
>be created by Axis with setter functions for the attributes as well as the
>children.  So for example if there was an attribute in the schema named
>myattr, you would add
>  s.myattr = "value";
>
>and CFMX would just treat it like another value in the JavaBean.  Axis on
>the other hand will have the metadata to know that it should be serialized
>on the wire as an attribute.
>
>Hope that helps.
>
>
>Tom Jordahl
>Macromedia Server Development 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198519
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