Posted by
Scott Gray on
Mar 17, 2006; 5:23am
URL: http://ofbiz.116.s1.nabble.com/Users-Calling-a-web-service-using-perl-tp137911p137912.html
Hi Daniel
Did you manage to resolve this issue? From my experience using web services
with ofbiz I only ever saw the message 'Content is not allowed in prolog'
when an exception was occurring on the ofbiz side of things. Have you
checked the log for ofbiz? There may be a problem with your service
Regards
Scott
-----Original Message-----
From:
[hidden email] [mailto:
[hidden email]]
On Behalf Of Daniel Rosowski
Sent: Wednesday, 15 March 2006 11:41 p.m.
To:
[hidden email]
Subject: [OFBiz] Users - Calling a web service using perl
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