Howdy --

I'm close to solving my UDDI problem, but I've got a syntax problem with 
structures that's stumping me.

The UDDI WSDL/XSD (see excerpts below) says the XML snippet below is a valid 
API call.  Datatype-wise, per the WSDL/XSD,
it's a complex datatype (<name />) within another complex datatype 
(<find_business />).  Only the string within the
<name /> element is a simple string datatype.  Now, according to the CF docs, 
the only way to pass a complex datatype
from CF to a web service is to represent it in CF as a structure.  So, I have 
to transform this:

<find_business generic="2.0" xmlns="urn:uddi-org:api_v2">
  <name>Microsoft</name>
</find_business>

into a CF structure that I'm going to pass as an input argument to the UDDI web 
service in my cfinvoke.  I discovered
that this structure code:

find_business = StructNew();
find_business.generic = "2.0";

properly defines the attribute "generic" in the outermost complextype.  So it's 
clear that what comes after the dot is
the name of an attribute.  But <name /> isn't an attribute; it's a sub-element. 
 What syntax do I use to define within
the structure this inner "name" complextype element?  Doing this:

find_business.name = "Microsoft";

clearly isn't going to work, as that's just the equivalent of inserting another 
attribute, name="Microsoft", within the
find_business tag.  This doesn't work, either:

find_business.name = StructNew();

since then you're stuck with this syntax question:

find_business.name.whatwouldIputhere = "Microsoft";

So: Is it simply not possible in CF to represent the above 
complex-within-complex XML document as a CF structure?

And one other quick question: the UDDI WSDL specifies document style, not rpc 
style, for all method calls.  Example:

<soap:operation soapAction="find_business" style="document" />

Is there a difference between these two styles in how you have to represent 
input arguments of complex datatype?  For
example, do I pass a complex input argument as a CF structure when the WSDL 
uses document style vs. passing it as an XML
document object when the WSDL uses rpc style?

-- Larry Afrin
   Medical University of South Carolina

UDDI v2 WSDL/XSD excerpts:

Note that the UDDI WSDL and XSD define both "find_business" and "name" as 
complex datatypes:

<!-- from http://uddi.org/schema/uddi_v2.xsd -->
  <xsd:element name="name" type="uddi:name" />
  <xsd:complexType name="name">
  <xsd:simpleContent>
  <xsd:extension base="string">
  <xsd:attribute ref="xml:lang" use="optional" />
  </xsd:extension>
  </xsd:simpleContent>
  </xsd:complexType>

<!-- from http://uddi.org/wsdl/inquire_v2.wsdl -->
  <xsd:element name="find_business" type="uddi:find_business" />
  <xsd:complexType name="find_business">
  <xsd:sequence>
  <xsd:element ref="uddi:name" minOccurs="0" maxOccurs="unbounded" />
  </xsd:sequence>
  <xsd:attribute name="generic" type="string" use="required" />
  </xsd:complexType>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:193790
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