Umer,

If it is an enumeration type (I need to see the actual Schema) then CFMX 6.l
doesn't handle it, but CFMX 7 should do it fine.  We will construct the Java
enumeration type that the Axis generated stub requires using the String
constructor.  This code was missing from 6.1.

Lawrence is incorrect that CFMX can't handle a complex type inside a complex
type.  The Web service code should correctly make a JavaBean type from any
struct that you pass, even if that struct is inside another struct.

In short, most of the problems with invoking web services with complex types
are in guessing the CFML structures that will match the JavaBeans generated
by the Axis engine.

One of the methods for debugging complex data types is to invoke the Apache
Axis "WSDL2Java" program directly on the WSDL you are trying to consume.
This will generate Java classes (sometimes lots of classes) that you can
then examine to find out what exactly is required for the service.

Here is how:

Set your CLASSPATH environment variable to include the following jar files
cfusion/lib/axis.jar
cfusion/lib/saaj.jar
cfusion/lib/jaxrpc.jar
cfusion/lib/xercesImpl.jar
cfusion/lib/wsdl4j.jar
cfusion/lib/commons-logging-1.0.2.jar
cfusion/lib/commons-discovery.jar

For example on Windows, change directory to CFusionMX7\lib:
C:\CFusionMX7\lib>set
CLASSPATH=axis.jar;saaj.jar;jaxrpc.jar;xercesImpl.jar;wsdl4j.jar;commons-log
ging-1.0.2.jar;commons-discovery.jar

Then run
 java org.apache.axis.wsdl.WSDL2Java -v -o myoutput http://host/to/my/wsdl


Replace the URL with the URL of your WSDL file and "myoutput" with the
directory you want the files generate to go to.  Then take a look at the
files generated.  In particular you can look for the "interface" that will
contain all of the operations of the web service.  You can then see the Java
types that CFMX is trying to create from your CFML.

Hope this helps.


Tom Jordahl
Macromedia Server Development 

-----Original Message-----
From: Umer Farooq [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 19, 2005 8:40 PM
To: CF-Talk
Subject: Re: Webservices Complex data Types

Hi,

It could have one of the following values..

ReturnAll       
ItemReturnDescription   
......

which I've set.. I need to figure out.. how to pass.. a attribute.. that 
in it self is a complex type..

I did test.. the SOAP gateway.. using XMLSpy and writing out the 
evenlope.. it works fine..

Since the service is over SSL.. can't really use TCPmon to look at the 
packet.. is there any way to grab the SOAPEnvelope.. or the body..


Dave Watts wrote:
>>    How would one pass data for the following..
>>
>>     WSDL Element:
>>      <ns:VerifyAddItemRequest>
>>              <ns:ErrorLanguage>xs:string</ErrorLanguage>
>>              <ns:MessageID>xs:string</MessageID>
>>              <ns:Version>xs:string</Version>
>>              <ns:DetailLevel>ns:DetailLevelCodeType</DetailLevel>
> 
> 
> You should read the rest of the schema to figure out what
> "ns:DetailLevelCodeType" should contain.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> 
> Fig Leaf Software provides the highest caliber vendor-authorized 
> instruction at our training centers in Washington DC, Atlanta, 
> Chicago, Baltimore, Northern Virginia, or on-site at your location. 
> Visit http://training.figleaf.com/ for more information!
> 
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195754
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to