473,804 Members | 2,257 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 1582
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
6716
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
4210
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
15453
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
2210
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
12527
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
2860
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
43068
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
12293
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
8288
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
3057
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
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
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
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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...
0
10089
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...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
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
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4308
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

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.