The SOAP fault doesn't include any useful diagnostic information.

However, I did notice that you aren't setting a namespace in your XML. See http://jibx.sourceforge.net/binding/tutorial/binding-advanced.html#namespaces for information on working with namespaces. In your case, adding the following as the 2nd line of your binding file should set the required namespace:

<namespace uri="http://travis.com/webservices"; default="elements" />

Nigel.

On 15/03/11 08:47, Deepak Singh wrote:



    Hi Nigel,

    The issue is still not resolved.

    Doing
    List details = se.getFault().getDetails(); with catch block does
    not produce anything as details.size() is zero.

    Also, i set interceptor as follows

    ByteArrayOutputStream request = new ByteArrayOutputStream(4096);
    ByteArrayOutputStream response = new ByteArrayOutputStream(4096);
    try{
    String m_location =
    "http://webservices.ticketvala.com/axis2/services/WSTicketvala";;
    IBindingFactory fac =
    BindingDirectory.getFactory(GetCityDetails.class);
    SoapClient client = new SoapClient(m_location, fac);
    client.setOperationName("urn:wsGetCity");
    CopiedInputStreamInterceptor inputInterceptor = new
    CopiedInputStreamInterceptor(response);
    CopiedOutputStreamInterceptor outputInterceptor = new
    CopiedOutputStreamInterceptor(request);
    TransportOptions transportOptions =
    TransportDirectory.newTransportOptions(m_location);
    if(transportOptions instanceof OutputStreamInterceptable) {
    
((OutputStreamInterceptable)transportOptions).setOutputStreamInterceptor(outputInterceptor);
    }
    if(transportOptions instanceof InputStreamInterceptable) {
    
((InputStreamInterceptable)transportOptions).setInputStreamInterceptor(inputInterceptor);
    }
    client.setTransportOptions(transportOptions);
    GetCityDetails city = new GetCityDetails();
    Authenticate aut = new Authenticate();
    aut.setGid("1");
    aut.setPwd("faregugly@mmyt");
    aut.setUid("faregugly");
    city.setAuth(aut);
    client.addInFaultDetailsHandler(new ExceptionReader());
    /*client.setSoapFaultResolver(new SoapFaultResolver() {
    @Override
    public Object handleFault(SoapFault arg0) {
    //System.out.println(arg0.getFaultCode().getUri());
    return null;
    }
    });*/
    Object obj = client.call(city);
    }catch(SoapFaultException se) {
    System.out.println("request "+request);
    System.out.println("response "+response);
    /*System.out.println("Error "+se.getFault()+"  "+
    se.getFault().getFaultString()+"  "+se.getMessage()+
    "  "+se.getFault().getFaultCode().getUri()+"  "+
    se.getFault().getFaultCode().getName());*/
    List details = se.getFault().getDetails();
    if(details.size() > 0) {
    System.out.println("details");
    for(Iterator itr = details.iterator() ; itr.hasNext();) {
    System.out.println(itr.next());
    }
    }
    }catch(Exception e) {
    e.printStackTrace();
    }
    }

    The above code produces following output

    request
    <SOAP:Envelope
    
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/";><SOAP:Body><wsGetCity><wsGetCityRQ><wsAuthenticate><userId>faregugly</userId><groupId>1</groupId><password>faregugly@mmyt</password></wsAuthenticate></wsGetCityRQ></wsGetCity></SOAP:Body></SOAP:Envelope>

    response
    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
    
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>unknown</faultstring><detail
    /></soapenv:Fault></soapenv:Body></soapenv:Envelope>

    The exception throws at the line client.call(city). The request
    xml is prepared well and all data are correct.

    Kindly help.

    Thanks
    Deepak

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to