473,651 Members | 3,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling .Net web service using a PERL client.

I need to call a .Net web service that takes an array or object as a
parameter from a PERL client. I have been trying to use the PERL SOAP::Lite
package to do this without success. I can call one that takes a simple
type, such as int or string, but not an array or object. Please help!!! My
code that I have written to call the web service and the SOAP packets that
get sent and received are below. It seems like no matter what I do I cannot
get it to recognize the array that I pass. Please CC my email address with
any responses. My address is as follows with the $# removed:
J$#im.Fo$#wl$#e r@E$#D$#S$#.c$# o$#m
Thanks in advance for any assistance.

use SOAP::Lite;

my @web;
@web[0] = '234234';
@web[1] = 'Test1';
@web[2] = '3454545';
@web[3] = 'Test2';

my $s = SOAP::Lite
-> uri('EDS.Galile o/')
-> proxy('http://testedsapps.wey er.com/Galileo/Galileo.asmx')
-> on_action(sub{s printf '%s%s', @_ })
-> on_debug(sub{pr int@_}) ;
;
$result =
$s->UpdateIncident (SOAP::Data->name('TicketVa lues')->value(SOAP::Da ta->value
(\@web)));

unless ($result->fault) {
if (length ($result->result()) == 0)
{
print "result = ".$result->result()."\n ";
}

} else {

print "error ".$result->faultstring."\ n";
unless ($result->fault) {
if (length ($result->result()) == 0)
{
print "result = ".$result->result()."\n ";
}

} else {

print "error ".$result->faultstring."\ n";
}

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http ://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:Update Incident xmlns:namesp1=" EDS.Galileo/">
<TicketValues xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" xsd:string[4]">
<item xsi:type="xsd:s tring">"6001000 24"</item>
<item xsi:type="xsd:s tring">"GFS0009 99"</item>
<item xsi:type="xsd:s tring">"5368710 02"</item>
<item xsi:type="xsd:s tring">"1092585 900"</item>
</TicketValues>
</namesp1:UpdateI ncident>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 500 (Internal Server Error) Internal Server Error.
Cache-Control: private
Connection: close
Date: Thu, 19 Aug 2004 14:07:57 GMT
Server: Microsoft-IIS/5.0
Content-Length: 732
Content-Type: text/xml; charset=utf-8
Client-Date: Thu, 19 Aug 2004 14:08:41 GMT
Client-Peer: 10.31.240.10:80
Client-Response-Num: 1
MicrosoftOffice WebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap :Server</faultcode>
<faultstring>Sy stem.Web.Servic es.Protocols.So apException: Server was
unable to process request. ---&gt; System.NullRefe renceException: Object
reference not set to an instance of an object.
at EDS.Galileo.Gal ileo.UpdateInci dent(String[] TicketValues) in
c:\inetpub\wwwr oot\galileo\gal ileo.asmx.cs:li ne 484
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
Nov 21 '05 #1
1 6562
This service
http://www.xmethods.net/ve2/ViewList...6-DD728CC865DE

includes a perl client that retrieves an array from a C# ASMX service.

"JTrigger" <jt******@nospa m.nospam> wrote in message
news:OQ******** ******@tk2msftn gp13.phx.gbl...
I need to call a .Net web service that takes an array or object as a
parameter from a PERL client. I have been trying to use the PERL SOAP::Lite package to do this without success. I can call one that takes a simple
type, such as int or string, but not an array or object. Please help!!! My code that I have written to call the web service and the SOAP packets that
get sent and received are below. It seems like no matter what I do I cannot get it to recognize the array that I pass. Please CC my email address with any responses. My address is as follows with the $# removed:
J$#im.Fo$#wl$#e r@E$#D$#S$#.c$# o$#m
Thanks in advance for any assistance.

use SOAP::Lite;

my @web;
@web[0] = '234234';
@web[1] = 'Test1';
@web[2] = '3454545';
@web[3] = 'Test2';

my $s = SOAP::Lite
-> uri('EDS.Galile o/')
-> proxy('http://testedsapps.wey er.com/Galileo/Galileo.asmx')
-> on_action(sub{s printf '%s%s', @_ })
-> on_debug(sub{pr int@_}) ;
;
$result =
$s->UpdateIncident (SOAP::Data->name('TicketVa lues')->value(SOAP::Da ta->value (\@web)));

unless ($result->fault) {
if (length ($result->result()) == 0)
{
print "result = ".$result->result()."\n ";
}

} else {

print "error ".$result->faultstring."\ n";
unless ($result->fault) {
if (length ($result->result()) == 0)
{
print "result = ".$result->result()."\n ";
}

} else {

print "error ".$result->faultstring."\ n";
}

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http ://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:Update Incident xmlns:namesp1=" EDS.Galileo/">
<TicketValues xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType=" xsd:string[4]">
<item xsi:type="xsd:s tring">"6001000 24"</item>
<item xsi:type="xsd:s tring">"GFS0009 99"</item>
<item xsi:type="xsd:s tring">"5368710 02"</item>
<item xsi:type="xsd:s tring">"1092585 900"</item>
</TicketValues>
</namesp1:UpdateI ncident>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP/1.1 500 (Internal Server Error) Internal Server Error.
Cache-Control: private
Connection: close
Date: Thu, 19 Aug 2004 14:07:57 GMT
Server: Microsoft-IIS/5.0
Content-Length: 732
Content-Type: text/xml; charset=utf-8
Client-Date: Thu, 19 Aug 2004 14:08:41 GMT
Client-Peer: 10.31.240.10:80
Client-Response-Num: 1
MicrosoftOffice WebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap :Server</faultcode>
<faultstring>Sy stem.Web.Servic es.Protocols.So apException: Server was
unable to process request. ---&gt; System.NullRefe renceException: Object
reference not set to an instance of an object.
at EDS.Galileo.Gal ileo.UpdateInci dent(String[] TicketValues) in
c:\inetpub\wwwr oot\galileo\gal ileo.asmx.cs:li ne 484
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>

Nov 21 '05 #2

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

Similar topics

0
1649
by: Mike van Lammeren | last post by:
Hello! I am totally stuck on this problem. I have a web service written in Perl, which uses Frontier::RPC2, and runs on MS IIS 4. I can access the web service using a client written in either Perl or Python, but cannot access the web service using a client written in PHP. The exact same Perl script, run under Apache on a Linux server, is
1
6728
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
0
2307
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to consume it with a C# application, I get the following runtime error from C#: Cannot assign object of type System.Xml.XmlNode to an object of type ConsoleApplication1.com.hilton.crmdev.SummaryType. Below is the Perl code that generates the hash,...
3
9076
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. If the web service is taking a long time to complete, the aspx page returns a ‘The operation has timed-out.’ Message to the web browser after 100 seconds. I’ve added: <httpRuntime executionTimeout="300" /> to the web.config files
3
5057
by: Jerome Cohen | last post by:
AI am trying to call a third-party web service. this service expects an XML fragment that contains the request plus other parameter. adding the web reference created the syntax below(reference.vb). I changed the data type for the structure that contains the XML data from the default "String" to "xml.xmldocument" to enable easy filling of the data. my client code creates an XML document class, fills the data using standard xml dom...
3
9886
by: frustratedcoder | last post by:
I need to consume a web service written in Perl but there is no wsdl file for this service. The perl soap client that can call and consume this web service looks like this (if it helps) #!perl -w use SOAP::Lite +trace => "debug"; print SOAP::Lite
2
2844
by: Johan | last post by:
We have run into problems calling a web service from a client running .NET framework 2.0. The problem is that the first call to the web service, after the client has been started, takes very long time, something like 15 to 30 seconds. All subsequent calls are really fast (about 10 milliseconds). But when the client is restarted, the first call once more takes long time. We have been testing a few different scenarios to figure out what is...
7
2677
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file name based on the name of the VB6 application. A second choice would be a file name based on the # COM interface assembly. I have tried calling Assembly.GetCallingAssembly() but this fails when I use the VB6 client. Is there a way to get this...
0
1713
by: Algobardo | last post by:
Good morning, this is the first time i write on this forum because i googled and i've seen related post with no solution. I will expose briefly the problem. I'm using c# 3.5 and i'm trying using a web service. Unfortunatly i get a NULL response and i can't understand why. RpcRsat.RSATWSPortType rpt = new RpcRsat.RSATWSPortTypeClient(); RpcRsat.retrieve_seqResponse res = rpt.retrieve_seq(req);
0
8357
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...
1
8465
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
8581
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
7298
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
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
5612
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
4144
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...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.