473,401 Members | 2,125 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,401 software developers and data experts.

SOAP using ZSI talking to .NET Web Service

Using Python 2.3 and ZSI 1.2 I am having problems getting information
back from a test web service running on a PC on our LAN.

The SOAP request details (from the .asmxfile) are as follows:

POST /rjetest/rjetestservice.asmx HTTP/1.1
Host: grouse
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://RJE.com/RJETestItDoc"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RJETestItDoc xmlns="http://RJE.com">
<i>int</i>
<extra>string</extra>
</RJETestItDoc>
</soap:Body>
</soap:Envelope>

and the response details (from the .asmx) are:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<RJETestItDocResponse xmlns="http://RJE.com">
<RJETestItDocResult>string</RJETestItDocResult>
</RJETestItDocResponse>
</soap:Body>
</soap:Envelope>
The Python program is:

import sys
from ZSI.client import Binding, TC

class fooRequest:
def __init__(self, i, extra):
self.i = i
self.extra = extra

fooRequest.typecode = TC.Struct(fooRequest, [TC.Integer('i'),
TC.String('extra')], 'RJETestItDoc')
url1 = 'http://grouse/rjetest/rjetestservice.asmx'
soapaction ='http://RJE.com/RJETestItDoc'
namespace = 'http://RJE.com'

host = 'grouse'
port = 80

dict = {
'soap' : 'http://schemas.xmlsoap.org/wsdl/soap/',
's' : 'http://www.w3.org/2001/XMLSchema',
's0' : 'http://RJE.com',
'http' : 'http://schemas.xmlsoap.org/wsdl/http/',
'tm' : 'http://microsoft.com/wsdl/mime/textMatching/',
'mime' : 'http://schemas.xmlsoap.org/wsdl/mime/',
'soapenc' : 'http://schemas.xmlsoap.org/soap/encoding/'
}
i = 10
extra = 'A lovely day at the office'

b = Binding(url=url1, ns=namespace, host=host, port=port, nsdict=dict,
soapaction=soapaction, tracefile=sys.stdout)
b.Send(url1, 'RJETestItDoc', fooRequest(i, extra))
x = b.ReceiveSOAP()
The SOAP response via the Python program is:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><RJETestItDocResponse
xmlns="http://RJE.com">
<RJETestItDocResult>********** A lovely day at the office
**********</RJETestItDocResult>
</RJETestItDocResponse></soap:Body></soap:Envelope>

and looks fine (to me anyway).

However... I can't figure out how to get the text from response. Any
advice would be very much appreciated. The input values are being
correctly received by the web service.
Jul 18 '05 #1
0 1698

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

Similar topics

4
by: Mark | last post by:
i have a very simple web servive Imports System.Web.Services <System.Web.Services.WebService(Namespace:="urn:Example1")> _ Public Class Example1 Inherits System.Web.Services.WebService
0
by: Cleo | last post by:
Hi, I am trying to call a WebService Method written in Weblogic from VB.NET and I am getting the following error. I am using SOAP Caal s from VB.NET. Please find the wsdl file and my code. ...
6
by: john deviney | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I need to insert a soap header on the client side which is expected on the server side. Currently, the Java ws provider, Axis, does...
0
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by...
0
by: kapil singhal via DotNetMonster.com | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I want to make it a stateful service and i found this solution only: 1. the instance IDs are transferred in the SOAP headers. 2....
16
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a...
31
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...
2
by: Enda Manni | last post by:
Hi, I have a gSoap Web Service written using C++, it uses SOAP username and password authentication. I also have a C# form client consuming the web service, all this was working fine until I...
3
by: Enda Manni | last post by:
Hi, I have a gSoap Web Service written using C++, it uses SOAP username and password authentication. I also have a C# form client consuming the web service, all this was working fine until...
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
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
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,...
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
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...
0
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.