Upon closely looking,server is returning following SOAP message: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Error invoking 'com.twc.nosa.g2b.webservice.G2BService.MSOOffers(com.twc.nosa.g2b.schema.MSOOffersDocument)'. Nested exception is java.lang.reflect.InvocationTargetException: null</faultstring></soap:Fault></soap:Body></soap:Envelope>"
Does any one know how to catch this exception? --- Phaneendra Gondi <[EMAIL PROTECTED]> wrote: > Thanks a lot for quick response. > > I am not able to catch this exception. It is > happening right after the server gets SOAP request. > Its not even reaching my service code. But if I > append '?wsdl' to url, I get complete WSDL back. > > I enabled log4j 'debug' level and I can see > following > in the logs: > > 2007-07-07 11:21:24.391 [DEBUG] [Wire.java:83] >> > "<soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body > xmlns:ns1="http://www.go2broadband.com/V4.1"><MSOOffers > xmlns="http://www.go2broadband.com/V4.1" > TrackingID="123456789"><RequestingAffiliate > AffiliateID="904500" G2BVersion="4.1" > SalesPersonID="PGONDI" StoreID="1234" > /><Address><PrimRange>1835</PrimRange><PrimName>Trade</PrimName><Suffix>St.</Suffix><City>Lincoln</City><State>NE</State><Zip>68502</Zip><Zip4>1655</Zip4></Address><PrivacyNotice>OptOut</PrivacyNotice><Request>CableDigitalVideo</Request><Request>CableHighSpeedData</Request></MSOOffers></soap:Body></soap:Envelope>" > > > 2007-07-07 11:21:24.401 [DEBUG] [Wire.java:69] << > "HTTP/1.1 500 Internal Server Error[\r][\n]" > > > Between the above 2 lines I see: > 2007-07-07 11:21:24.391 [DEBUG] > [EntityEnclosingMethod.java:504] Request body sent > 2007-07-07 11:21:24.391 [DEBUG] > [HttpConnection.java:825] enter > HttpConnection.flushRequestOutputStream() > 2007-07-07 11:21:24.391 [DEBUG] > [HttpMethodBase.java:1585] enter > HttpMethodBase.readResponse(HttpState, > HttpConnection) > 2007-07-07 11:21:24.391 [DEBUG] > [HttpMethodBase.java:1823] enter > HttpMethodBase.readStatusLine(HttpState, > HttpConnection) > 2007-07-07 11:21:24.391 [DEBUG] > [HttpConnection.java:1112] enter > HttpConnection.readLine() > 2007-07-07 11:21:24.391 [DEBUG] > [HttpParser.java:104] > enter HttpParser.readLine(InputStream, String) > 2007-07-07 11:21:24.391 [DEBUG] [HttpParser.java:73] > enter HttpParser.readRawLine() > 2007-07-07 11:21:24.401 [DEBUG] > [HttpMethodBase.java:1785] enter > HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) > 2007-07-07 11:21:24.401 [DEBUG] > [HttpConnection.java:856] enter > HttpConnection.getResponseInputStream() > 2007-07-07 11:21:24.401 [DEBUG] > [HttpParser.java:159] > enter HeaderParser.parseHeaders(InputStream, String) > 2007-07-07 11:21:24.401 [DEBUG] > [HttpParser.java:104] > enter HttpParser.readLine(InputStream, String) > 2007-07-07 11:21:24.401 [DEBUG] [HttpParser.java:73] > enter HttpParser.readRawLine() > 2007-07-07 11:21:24.401 [DEBUG] > [HttpParser.java:104] > enter HttpParser.readLine(InputStream, String) > 2007-07-07 11:21:24.401 [DEBUG] [HttpParser.java:73] > enter HttpParser.readRawLine() > 2007-07-07 11:21:24.401 [DEBUG] > [HttpParser.java:104] > enter HttpParser.readLine(InputStream, String) > 2007-07-07 11:21:24.401 [DEBUG] [HttpParser.java:73] > enter HttpParser.readRawLine() > 2007-07-07 11:21:24.401 [DEBUG] > [HttpParser.java:104] > enter HttpParser.readLine(InputStream, String) > 2007-07-07 11:21:24.401 [DEBUG] [HttpParser.java:73] > enter HttpParser.readRawLine() > > > Server is immediatley returning 500 error. I also > set > breakpoints in eclipse IDE but am not having any > luck > to see this exception. All I can see is Apache Http > client is executing a post request. Can you please > please help me how to catch this exception? > > Do I need to change x-fire source to see this > exception? Which class actually calls my service? > Why x-fire is not able to get the root-cause of > exception? This would have been very useful. > > I appreciate all your time and help. Thanks a lot!! > > > --- Tonio Caputo <[EMAIL PROTECTED]> wrote: > > > Phaneendra, > > > > To find the correct problem you must debug your > > application, and see > > what > InvocationTargetException.getTargetException() > > contains. > > > > The message given is not very useful or useful > at > > all, because > > it does not contain the TargetException, I don't > > remember the class > > where this Exception is catched, but I do remember > > it was not very > > difficult to find. > > > > Hope it helps > > tonio > > > > > > On Fri, 2007-07-06 at 12:32 -0700, Phaneendra > Gondi > > wrote: > > > I am getting following exception when am trying > to > > > call the service with the following client. I > can > > see > > > wsdl in browser. I am using xmlbeans for > > bindings. > > > Any helpis greatly apprecitaed. I am running > this > > on > > > Weblogic 8.1 Sp6. Thanks a lot!! > > > > > > Exception is: > > > org.codehaus.xfire.XFireRuntimeException: Could > > not > > > invoke service.. Nested exception is > > > org.codehaus.xfire.fault.XFireFault: Error > > invoking > > > > > > 'com.twc.nosa.g2b.webservice.G2BService.MSOOffers(com.twc.nosa.g2b.schema.MSOOffersDocument)'. > > > Nested exception is > > > java.lang.reflect.InvocationTargetException: > null > > > org.codehaus.xfire.fault.XFireFault: Error > > invoking > > > > > > 'com.twc.nosa.g2b.webservice.G2BService.MSOOffers(com.twc.nosa.g2b.schema.MSOOffersDocument)'. > > > Nested exception is > > > java.lang.reflect.InvocationTargetException: > null > > > at > > > > > > org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31) > > > at > > > > > > org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28) > > > at > > > > > > org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111) > > > at > > > > > > org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67) > > > at > > > > > > org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) > > > at > > > > > > org.codehaus.xfire.client.Client.onReceive(Client.java:406) > > > at > > > > > > org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139) > > > at > > > > > > org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) > > > at > > > > > > org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) > > > at > > > > > > org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) > > > at > > > > > > org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) > > > at > > > > > > org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) > > > at > > > > > > org.codehaus.xfire.client.Client.invoke(Client.java:336) > > > at > > > > > > org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) > > > at > > > > > > org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) > > > at $Proxy0.MSOOffers(Unknown Source) > > > at > > > > > > com.twc.nosa.g2b.webservice.test.G2BServiceTest.main(G2BServiceTest.java:67) > > > Exception in thread "main" > > > > > > > > > My Java clientis: > > > ------------------- > > > > > > package com.twc.nosa.g2b.webservice.test; > > > > > > > > > import java.math.BigDecimal; > > > > > > import > > org.codehaus.xfire.client.XFireProxyFactory; > > > import org.codehaus.xfire.service.Service; > > > import > > > > > > org.codehaus.xfire.xmlbeans.XmlBeansServiceFactory; > > > > > > import com.twc.nosa.g2b.schema.AffiliateType; > > > import com.twc.nosa.g2b.schema.CableServiceEnum; > > > import > com.twc.nosa.g2b.schema.MSOOffersDocument; > > > import > > > > com.twc.nosa.g2b.schema.MSOOffersResponseDocument; > > > import > > com.twc.nosa.g2b.schema.MSOOffersResponseType; > > > import > > com.twc.nosa.g2b.schema.ParsedUSAddressType; > > > import > com.twc.nosa.g2b.schema.PrivacyNoticeEnum; > > > import > > > > > > com.twc.nosa.g2b.schema.MSOOffersDocument.MSOOffers; > > > import com.twc.nosa.g2b.webservice.G2BService; > > > import com.twc.nosa.logger.LogManager; > > > import com.twc.nosa.logger.Logger; > > > > > > public class G2BServiceTest { > > > > > > private static final Logger logger = > > > LogManager.getLogger(G2BServiceTest.class); > > > > > > public static void main(String[] args) throws > > > Exception{ > > > String url = > > > > > > "http://localhost:7001/G2BApp/services/G2BService"; > > > //String url = > > > > > > "http://10.155.46.86:7001/G2BApp/services/G2BService"; > > > if (args.length == 0){ > > > System.out.println("URL was not > > supplied. > > > Using default URL - " + url); > > > }else{ > > > url = args[0]; > > > } > > > > > > XmlBeansServiceFactory xsf = new > > > XmlBeansServiceFactory(); > > > Service serviceModel = > > > xsf.create(G2BService.class); > > > G2BService client = > > > (G2BService) new > > > XFireProxyFactory().create(serviceModel, url); > > > > > > MSOOffersDocument msoOffersDocument = > > > MSOOffersDocument.Factory.newInstance(); > > > MSOOffers msoOffers = > > > msoOffersDocument.addNewMSOOffers(); > > > msoOffers.setTrackingID(123456789); > > > > > > AffiliateType affiliateType = > > > msoOffers.addNewRequestingAffiliate(); > > > affiliateType.setAffiliateID(904500); > > > affiliateType.setG2BVersion(new > > > BigDecimal("4.1")); > > > > affiliateType.setSalesPersonID("PGONDI"); > > > affiliateType.setStoreID("1234"); > > > > > > ParsedUSAddressType address = > > > msoOffers.addNewAddress(); > > > address.setPrimRange("1835"); > > > address.setPrimName("Trade"); > > > address.setSuffix("St."); > > > address.setCity("Lincoln"); > > > address.setState("NE"); > > > address.setZip("68502"); > > > address.setZip4("1655"); > > > > > > > > > > > > msoOffers.setPrivacyNotice(PrivacyNoticeEnum.OPT_OUT); > > > > > > > > > msoOffers.addRequest(CableServiceEnum.CABLE_DIGITAL_VIDEO); > > > > > > > > > msoOffers.addRequest(CableServiceEnum.CABLE_HIGH_SPEED_DATA); > > > > > > //invoke > > > logger.debug("Invoking MsoOffers > > Request..."); > > > MSOOffersResponseDocument > > > msoOffersResponseDocument = > > > client.MSOOffers(msoOffersDocument); > > > > > > MSOOffersResponseType msoOffersResponse > = > > > > > > > > > msoOffersResponseDocument.getMSOOffersResponse(); > > > > > > System.out.println(msoOffersResponse.getName()); > > > > > > > > > System.out.println(msoOffersResponse.getMSOOffersResult().getCode()); > > > > > > > > > System.out.println(msoOffersResponse.getMSOOffersResult().getStringValue()); > > > } > > > > > > } > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > Moody friends. Drama queens. Your life? Nope! - > > their life, your story. Play Sims Stories at > Yahoo! > > Games. > > > http://sims.yahoo.com/ > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > ____________________________________________________________________________________ > Building a website is a piece of cake. Yahoo! Small > Business gives you all the tools to get online. > http://smallbusiness.yahoo.com/webhosting > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469 --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
