On 09/14/2009 03:06 PM, Brian Tieman wrote:
Warning: noob here!
Hey Brian,
Welcome to suds!
Have you looked at the documentation here:
https://fedorahosted.org/suds/wiki/Documentation
You should just be able to do:
from suds.client import Client
client = Client(url)
print client ############################# this will show you the service, methods etc.
print client.service.addComplexType(2,3)
since x & y are simple types. Although, I'd need to see the wsdl to be sure.
Hope this helps,
Jeff
I have a test service method defined as
int addComplexType (TwoNumbers input)
Where TwoNumbers is defined in XMDComplexTypes.xsd as
<schema targetNamespace="http://gov.anl.aps.tieman/XDMXomplexTypes"
elementForDefault="quilified"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://gov.anl.aps.tieman/XMDComplexTypes">
...
<complexType name="TestComplexType">
<sequence>
<element name="X" type="int"></element>
<element name="Y" type="int"></element>
</sequence>
</complexType>
<element name="TwoNumbers" type="tns:TestComplexType">
</element>
...
</schema>
When I create a client from the WSDL and print it, the method
addComplexType is defined as
...
ns1 = "http://XMD.tieman.aps.anl.gov/XDMService"
...
ns6 = "http://gov.anl.aps.tieman/XMDComplexTypes"
...
methods
addComplexType (ns1:input input, )
...
types
ns6:TestComplexType
...
Where does the type ns1:input come from? It's not defined anywhere in
the schema. Do I need to use the ImportDoctor to fix this? How?
Going on, I can then use the factory to create a variable of the correct
type
twoNumbers = client.factor.create ('ns6:TestComplexType')
and use that as an argument
client.service.addComplexType (twoNumbers)
but, of course, it bombs. The error I get is "Invalid element in
gov.anl.aps.tieman.XMD.stubs.AddComplexTypeRequestInput - X'
Any help would be greatly appreciated!
Brian
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list