473,703 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAP/ZSI post/get for Java Web App

All,

I need help concerning SOAP, Python and XML. I am very new to this, so
dumbing it down for me will not offend me!

I'm using Python and want to send a user-inputted string to an
existing Java web app that
will output results to XML. I need to capture elements of the XML and
put
the info into a table. (say I send a single/simple address string to
this
webservice/geocode, which then returns numerous possible matches with
XY
values and score values, and I want to capture that into a table)

How do I go about doing this? I'm told I need to use SOAP. I
discovered that
the best module to use is ZSI (please correct me if I'm wrong). I have
installed the necessary module. Examples I have seen are plenty and
all so different, its not clear to me how to go about. I have been
spinning my wheels for too long on this!

Can someone provide some example code similar to what I need to do? Or
any
guidance would be appreciated.

Thanks!
Jun 27 '08 #1
1 1575
On May 13, 1:02 pm, Jennifer Duerr <jenn.du...@gma il.comwrote:
All,

I need help concerning SOAP, Python and XML. I am very new to this, so
dumbing it down for me will not offend me!

I'm using Python and want to send a user-inputted string to an
existing Java web app that
will output results to XML. I need to capture elements of the XML and
put
the info into a table. (say I send a single/simple address string to
this
webservice/geocode, which then returns numerous possible matches with
XY
values and score values, and I want to capture that into a table)

How do I go about doing this? I'm told I need to use SOAP. I
discovered that
the best module to use is ZSI (please correct me if I'm wrong). I have
installed the necessary module. Examples I have seen are plenty and
all so different, its not clear to me how to go about. I have been
spinning my wheels for too long on this!

Can someone provide some example code similar to what I need to do? Or
any
guidance would be appreciated.

Thanks!
It looks like you have three tasks here:
- get data
- parse it
- store it

SOAP could be the means to accomplish only the first one.

If the service you use exposes the functionality using XML-RPC or some
REST-ful methods I would try them first. If it does not, then
you are stuck with SOAP. Using SOAP in Python is currently
not as straightforward as it could be.

You have chosen to use ZSI and that is fine choice.
In documentation look for "wsdl2py".
Given a URL to a WSDL file it will generate stub class definition
with methods corresponding to the SOAP service methods.
In your code you would instantiate the class, call the method you want
and grab the payload. Your first task is done.

From what I understand the payload will be XML that will need to be
parsed. For that you could use the excellent ElementTree

If I were you I would investigate suds (https://fedorahosted.org/suds)
It promises to be easier to use than ZSI. The README has the usage
example.
Waldemar
Jun 27 '08 #2

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

Similar topics

1
6710
by: Antonio | last post by:
Hi everybody!! First of all, sorry about my english. I promise to improve it. I have a big problem when I try to add an attachment which contains a image in it. I have to solve it as soon as possible so i would really appreciate any help. The mistake thrown is the following:
0
4207
by: bigbinc | last post by:
I have setup a soap machine on linux and similar configuration works properly. on a windows mahcine, I get these erros on the addressbook, samples, any ideas. I am pretty sure my classpaths are setup correctly. using jboss-tomcat engine. This looks like text formatting issues.
2
15446
by: Paul Hale | last post by:
I have a vb.net web service and client that are both working fine. If someone wanted to consume our web service using .NET, no problem. Im a little confused on how non .NET clients would use the web service though. Question 1: Does Java etc have some kind of SOAP tool kit developers could use to access our web service? Question 2: .NET conveniently shows what the serialized xml looks like and what the web service expects (Please see...
3
2204
by: Moshe Kravchik | last post by:
Hi all! I've encountered with what seems to be a compatibility problem between ATL SOAP Web Service and Axis client. The minimal scenario is like that. I create a service having the following function: struct SITest{ int val;
5
12521
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error (that appears in plain text), and causes the client to crash. This C# code has been deployed both as an ASP.NET application and a WinForms app, each of which produced the same result. Further, moving the clients from a Windows XP machine to Windows...
31
2838
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our perspective, should be as simple as defining an object and viewing a parameter on that object. My boss has worked with it and I'm still tryin'... TIA! -- TFWBWY...A
6
43041
by: Peter van der veen | last post by:
Hi I have the following problem. I'm calling a webservice from within a VB.net 2005 Windows program. For this i got a WSDL file and loaded that in VB. Until now i just call the webservice and everything works OK. Now i need to add an extra attribute/header element to the SOAP header before i contact the webservice.
1
12290
by: Florian Grousset | last post by:
Hi, I'm trying to code a simple C# SOAP client wich query an Axis2 Java SOAP Server. Server side code has been generated from a WSDL file. SOAP requests and responses must both contain a simple String array (not very diffucult I think !). What I've done : 1. WSDL file writing (see at the bottom of this post)
1
8284
by: parimalb | last post by:
Hi All, I want to pass an array argument to the java webservice from perl client using SOAP::LITE package. Please let me know if anyone knows about this. The web method declaration in java is like this publishSimpleMetric(Arraylist<String> appinfo,Arraylist<String> metricinfo,String seperator); Now i tried to call the web service from perl client as follows ...
1
3049
by: moorcroft | last post by:
I'm sending the following SOAP request to a webservice (I've had to star out some parts of it for privacy purposes): <?xml version="1.0" encoding="UTF-8"?> <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> <soap-env:Header/><soap-env:Body> <GetAppList xmlns="https://***.***.***.***/***/***.asmx?op=***"> <requestId>1</requestId> <laNumber>5</laNumber> <hashCode>*******</hashCode> </GetAppList>
0
8672
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9123
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5923
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3125
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2462
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.