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

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$#er@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.Galileo/')
-> proxy('http://testedsapps.weyer.com/Galileo/Galileo.asmx')
-> on_action(sub{sprintf '%s%s', @_ })
-> on_debug(sub{print@_}) ;
;
$result =
$s->UpdateIncident(SOAP::Data->name('TicketValues')->value(SOAP::Data->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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:UpdateIncident xmlns:namesp1="EDS.Galileo/">
<TicketValues xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[4]">
<item xsi:type="xsd:string">"600100024"</item>
<item xsi:type="xsd:string">"GFS000999"</item>
<item xsi:type="xsd:string">"536871002"</item>
<item xsi:type="xsd:string">"1092585900"</item>
</TicketValues>
</namesp1:UpdateIncident>
</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
MicrosoftOfficeWebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?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>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapExc eption: Server was
unable to process request. ---&gt; System.NullReferenceException: Object
reference not set to an instance of an object.
at EDS.Galileo.Galileo.UpdateIncident(String[] TicketValues) in
c:\inetpub\wwwroot\galileo\galileo.asmx.cs:line 484
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
Nov 21 '05 #1
1 6538
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******@nospam.nospam> wrote in message
news:OQ**************@tk2msftngp13.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$#er@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.Galileo/')
-> proxy('http://testedsapps.weyer.com/Galileo/Galileo.asmx')
-> on_action(sub{sprintf '%s%s', @_ })
-> on_debug(sub{print@_}) ;
;
$result =
$s->UpdateIncident(SOAP::Data->name('TicketValues')->value(SOAP::Data->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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:UpdateIncident xmlns:namesp1="EDS.Galileo/">
<TicketValues xsi:type="SOAP-ENC:Array"
SOAP-ENC:arrayType="xsd:string[4]">
<item xsi:type="xsd:string">"600100024"</item>
<item xsi:type="xsd:string">"GFS000999"</item>
<item xsi:type="xsd:string">"536871002"</item>
<item xsi:type="xsd:string">"1092585900"</item>
</TicketValues>
</namesp1:UpdateIncident>
</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
MicrosoftOfficeWebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?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>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapExc eption: Server was
unable to process request. ---&gt; System.NullReferenceException: Object
reference not set to an instance of an object.
at EDS.Galileo.Galileo.UpdateIncident(String[] TicketValues) in
c:\inetpub\wwwroot\galileo\galileo.asmx.cs:line 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
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...
1
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...
0
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...
3
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. ...
3
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)....
3
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...
2
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...
7
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...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.