[OFBiz] Users - SOAP service call

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

[OFBiz] Users - SOAP service call

Javrishvili, Giorgi (Key-Work)
Hi, guys!
I'm trying to make my, as I think correctly written soap service run, but it refuses to move...  So, may be some edvices from OFBiz gurus could change his mind.
Here are my service definitions:
<service name="hello" default-entity-name="Product"
engine="java" location="de.kw.tech_tools.TechToolsServices"
invoke="hello" export="true">
Service for testing java services in Ofbiz
<attribute name="message" mode="OUT" type="String"
<service name="soapHello" engine="soap" export="true"
invoke="hello" auth="false">
SOAP service; calls hello service
<attribute name="message" type="String" mode="OUT"
optional="false" />
Both are in services.xml file of my project. No service_test.xml or something like that. Hope this I did correctly.
Service itself is very complex and complicated:
 public static Map hello(DispatchContext ctx, Map context) {
  Map result = new HashMap();
  Debug.logInfo("Hello, this is our first SOAP service in OFBiz", module);
  result.put("message", "Hello, this is our first SOAP service in OFBiz");
  return result;
So, while our PHP guys are fighting with php5 soap client, I want just to be sure that services written by me are "callable" at all.
And here am I stuck...
Some time ago I wrote some ApacheSoap service and called simply with soapClient. But here it seems to be different.
What I do is following:
               String url =;
               Call call = new Call(  );
               // No parameters needed
               // Invoke the call
               Response response;
               response = call.invoke(url, "");
It throws:

[SOAPException: faultCode=SOAP-ENV:Client; msg=Parsing error, response was:

Dokumentwurzelelement fehlt; targetException=org.xml.sax.SAXParseException: Dokumentwurzelelement fehlt]

at org.apache.soap.rpc.Call.invoke(Call.java:298)

at de.keywork.soap.CDLister.letOfbizSayHello(CDLister.java:75)

at de.keywork.soap.CDLister.main(CDLister.java:105)


"Dokumentwurzelelement"  means Document root element
Actually it is a place in Call class where it tries to read response.
I have a plenty of questions:
1. location= - is that a correct?
2. <namespace></namespace> - is that correct?
3. String url =; is that correct correct "location" for webServices in ofbiz?
4. When I'm accessing in browser  - It says Problem processing the service - It doesn't say that it could not find some page...
5. May be ApacheSoap client is a wrong client at all? In a "simple" version(With ApacheSoap) I had following:    
and it was working without problems...
Where is a urn in OFBiz case? I mean if I understand correctly I don't need to write any descriptors, isn't it? Everything seems to be done somehow by "itself". How? I don't need to write any envelopes?
I don't what to repeate issues, but I really couldn't find anything valuable... May be someone could suggest good place to find the answers or could answer by itself?
I'm digging internet over and over again but with no success. My be I'm looking in wrong places... Is there some documentation for that except service engine guide on the ofbiz site?
So, if anyone has understand this mess that I wrote, may be you have some ideas?
Many thanks,
Giorgi Javrishvili

Users mailing list
[hidden email]
Reply | Threaded
Open this post in threaded view

Re: [OFBiz] Users - SOAP service call

Peter Goron

We have succeeded to call an ofbiz webservice from a perl and a python
The parameters were :

Ofbiz can produce the wsdl of an exportable service that contains all
informations required to call the webservice.


> Hi, guys!
> So, if anyone has understand this mess that I wrote, may be you have
> some ideas?
> Many thanks,
> Giorgi Javrishvili

Users mailing list
[hidden email]