Posted by
drosowsk on
Mar 15, 2006; 10:41am
URL: http://ofbiz.116.s1.nabble.com/Users-Calling-a-web-service-using-perl-tp137911.html
Hi list!
I'm trying to call a web service using perl. But I always get a SAX
exception. It worked before, so I can't see why it shouldn't work now.
Here is the exception:
---- exception report
----------------------------------------------------------
Service [remoteCreateHaendler] threw an unexpected exception/error
Exception: org.ofbiz.service.GenericServiceException
Message: RPC error (; nested exception is:
org.xml.sax.SAXParseException: Content is not allowed in prolog.)
Here is my service definition:
<service name="remoteCreateHaendler" engine="soap" export="true"
location="
http://localhost:8080/webtools/control/SOAPService"
invoke="createHaendler" auth="true">
<description>einen Haendler anlegen</description>
<namespace>
http://localhost:80/</namespace>
<attribute name="partyName" type="String" mode="IN"
optional="false"/>
<attribute name="strasse" type="String" mode="IN" optional="true"/>
<attribute name="ort" type="String" mode="IN" optional="true"/>
<attribute name="plz" type="String" mode="IN" optional="true"/>
<attribute name="trackingCode" type="String" mode="IN"
optional="false"/>
<attribute name="overrideLogo" type="String" mode="IN"
optional="true"/>
</service>
And here is the perl code (I got it from the list too):
#!/usr/bin/perl
use SOAP::Lite +trace => [qw(transport debug)];
use warnings;
use Data::Dumper;
my $customer='xxxxx';
my $password='xxxxx';
my $partyName='myName';
my $trackingCode='code123';
my $s = SOAP::Lite
-> uri('
http://localhost:8080/')
-> proxy('
http://localhost:8080/webtools/control/SOAPService');my $r = $s->remoteCreateHaendler(
SOAP::Data->type('string')->name('login.username' => $customer),
SOAP::Data->type('string')->name('login.password' => $password),
SOAP::Data->type('string')->name('partyName' => $partyName),
SOAP::Data->type('string')->name('trackingCode' => $trackingCode),
);
Dumper $r;
What do I do wrong?
Any help is greatly appreciated!
Cheers,
Daniel
--
"Feel free" mit GMX FreeMail!
Monat für Monat 10 FreeSMS inklusive!
http://www.gmx.net
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users