Hi Mahesh, As per the offline discussion, using the automatically generated stub doesn't return the required soap message response which you used to get by using the tryIt. So implementing the java client using javax.xml.soap library will return the expected response that you are looking for. Please find the sample Java Soap client under following location.
https://svn.wso2.org/repos/wso2/scratch/amalg/SoapClient/ Hope this will help you to get the expected response. Thank you & Best regards, *Amal Gunatilake* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware On Wed, Sep 24, 2014 at 2:58 PM, Mahesh Chinthaka <mahe...@wso2.com> wrote: > Hi all, > > My scenario, > > I have a BPEL deployed in BPS. > I have a Admin Service to be called by BPEL(I have the wsdl as well). > I have a Java client which is being used to invoke the BPEL. In java > client we have used an automatically generated stub to call BPEL. > > > My problem, > When I invoke the BPEL using my own java client ; if some error/exception > occurred in Admin Service , it always shows the error as some axiom error. > > Exception in thread "main" java.lang.ClassCastException: > org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to > org.apache.axiom.soap.SOAPFault > > When I invoke the BPEL using '*try it'* option in BPS, Then it displays > the fault message with what we have written inside Admin Service exception > handling part. > > > What I want, > I want to get the error message text which we have written inside > AdminService class to my java client, when errors occur. > > > Is there anyway to get this done ??? > > Thanks in advance, > -- > *Mahesh Chinthaka Vidanagama* | Software Engineer > WSO2, Inc | lean. enterprise. middleware. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 71 63 63 083 | Work: +94 112 145 345 > Email: mahe...@wso2.com <ar...@wso2.com> | Web: www.wso2.com > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev