Hi, 

I am trying to access OFBiz web service through an external java client. 
I have created a service in OFBiz with parameter export="true". I get the 
wsdl file generated successfully. 

But when I try to access the service using client, I get the following 
exception: 

Aug 17, 2009 12:47:52 PM org.apache.axis.utils.JavaUtils 
isAttachmentSupported 
WARNING: Unable to find required classes (javax.activation.DataHandler and 
javax.mail.internet.MimeMultipart). Attachment support is disabled. 
javax.xml.rpc.ServiceException: Error processing WSDL document:   
javax.xml.rpc.ServiceException: Error processing WSDL document:   
javax.xml.rpc.ServiceException: Cannot find service:  test 
        at org.apache.axis.client.Service.initService(Service.java:250) 
        at org.apache.axis.client.Service.<init>(Service.java:165) 
        at org.apache.axis.client.ServiceFactory.createService(
ServiceFactory.java:198) 
        at NewClient.main(NewClient.java:26) 

My client class code is: 

public class Client { 

    public static void main(String args[]){ 
        String wsdlURL = 
"http://localhost:8088/webtools/control/SOAPService/test?wsdl";; 
        String namespace = ""; 
        String serviceName = "test"; 
        QName serviceQN = new QName(namespace, serviceName); 
        ServiceFactory serviceFactory; 
        try { 
            serviceFactory = ServiceFactory.newInstance(); 
            Service service = serviceFactory.createService(new 
URL(wsdlURL), serviceQN); 
        } catch (MalformedURLException e) { 
            e.printStackTrace(); 
        } catch (ServiceException e) { 
            e.printStackTrace(); 
        } 
    } 
} 

I have also included the jar files required to run the client as mentioned 
below: 
axis.jar 
jaxrpc.jar 
commons-logging-1.1.1.jar 
wsdl4j-1.5.1.jar 
saaj.jar 
webserviceutils.jar 
commonsdiscovery-0.2.jar

I tried the same thing using C# client,but got the same problem.I feel 
that the OFBiz wsdl gets created in such a way that it does not get 
exposed to external client. Kindly let me know the reason of the 
exception.Is the way i am following, correct? Also, if there is some other 
way to do the task.


Thanks & Regards,
Neha Mehta
Software Engineer (A-1-1)
Larsen & Toubro Infotech Ltd.

______________________________________________________________________

Reply via email to