473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WSDL parsing problem


Y'all,

Problem: Reading complex data types returned from WSDL

I'll present this in 3 sections.

1. Output of WSDL parser on Google API
2. Output of WSDL parser on Custom API
3. WSDL parser code

1. Output of WSDL parser on Google API
So far I have a very simple WSDL reader which gathers the commnads and
arguments of the WSDL. For instance, running against the google API
generates:
Commands: [u'doGoogleSearch', u'doGetCachedPage',
u'doSpellingSuggestion']

Arguments for "doGoogleSearch":
key (u'http://www.w3.org/2001/XMLSchema', u'string')
q (u'http://www.w3.org/2001/XMLSchema', u'string')
start (u'http://www.w3.org/2001/XMLSchema', u'int')
maxResults (u'http://www.w3.org/2001/XMLSchema', u'int')
filter (u'http://www.w3.org/2001/XMLSchema', u'boolean')
restrict (u'http://www.w3.org/2001/XMLSchema', u'string')
safeSearch (u'http://www.w3.org/2001/XMLSchema', u'boolean')
lr (u'http://www.w3.org/2001/XMLSchema', u'string')
ie (u'http://www.w3.org/2001/XMLSchema', u'string')
oe (u'http://www.w3.org/2001/XMLSchema', u'string')

With this it is easy to create a command and send it the proper value
types. You still have to know what each does, but the type is
obvious.
2. Output of WSDL parser on Custom API
When I run this against my company's custom API, though, I see the
comnmands fine:

Commands: [u'getCustomerInformation']

But the argument names and types look like:
getCustomerInformationRequest
(u'java:com.productname.productversion.soap', u'ge
tCustomerInformation')

Now, according to my developers this is because they treat each api
call like a separate document which returns several values, whereas
the google API treats each as a separate data type (string).

The WSDL would look like this:
<xsd:complexType name="CustomerInfo">
<xsd:sequence>
<xsd:element type="xsd:string" name="email" minOccurs="1"
maxOccurs="1" nillable="true" />
<xsd:element type="xsd:string" name="firstName" minOccurs="1"
maxOccurs="1" nillable="true" />
<xsd:element type="xsd:string" name="lastName" minOccurs="1"
<xsd:element type="xsd:string" name="phoneNumber" minOccurs="1"
maxOccurs="1" nillable="true" />
</xsd:sequence>
</xsd:complexType>

Can I somehow parse the response from the WSDL to get at the atomic
data types? The goal is to do this programmatically to provide a GUI
front end for the APIs for testing.

3. WSDL reader
#!/usr/bin/env python
#http level debugging
import httplib
httplib.HTTPConnection.debuglevel = 1

from SOAPpy import WSDL
server = WSDL.Proxy('d:/googleapi/GoogleSearch.wsdl')
print server.methods.keys()
callInfo = server.methods['doGoogleSearch']
for arg in callInfo.inparams:
print arg.name.ljust(15), arg.type

Any help at all would be appreciated.

Sincerely,

Nick

Jul 18 '05 #1
0 1828

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: trexim | last post by:
Hi, I am trying to create a Web Reference for CSTA using the URL http://www.ecma-international.org/standards/ecma-348/csta-wsdl/csta-wsdl-all-operations.wsdl Visual .Net complains that: "...
1
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
5
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use...
0
by: Andreas | last post by:
Hi, Im trying to consume a webservice described by the WSDL below, however When i try to add the WSDL it does not work, tried to run it through WSDL.EXE It validates in XMLSpy, but WSDL.exe...
1
by: padmagvs | last post by:
I am working on some code which parses wsdl . I have a complex wsdl which is failing to parse . I have to modify this wsdl for parsing . wanted to know the complex wsdl i am using is as per...
0
by: Geoffrey Summerhayes | last post by:
I'm writing on a wsdl parser in javascript and the relevant portions of the file I'm trying to parse is <?xml version="1.0" encoding="utf-8" ?> <wsdl:definitions...
0
by: StephenLiversidge | last post by:
Hi im having a problem with my wsdl, It generates perfectly and I can create the objects needed from the contract perfectly. The problem comes when I try to pass the object back into the...
3
by: Thomas Guettler | last post by:
Hi, I looked for a solution to talk to a web service which offers its signature with a wsdl file. I googled for 'wsdl python' and found ZSI. This project uses code generation. That's...
0
by: Sebastian Schulze | last post by:
Hey. I know it's possible to generate WSDL 2.0, but has someone made any experience with PHP, consuming WSDL 2.0 Files? I tried, using the example from the W3 WSDL TR:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.