How to parse fault detail in AxisFault

Hi Gurus,
When I am trying access third party Web Service, my client gets the service errors as AxisFault and there are some specific faults that are thrown. I have to get them to log as what exactly the problem i.e <b>FaultType:</b>,<b>FaultNumber</b>,<b>FaultDescription</b>.
<b>Could any one help me out</b> how to parse this(pls see that is there in bold). I tried following code, but I am able to display the NodeName but not the Node value. ie.
} catch (AxisFault e) {
org.w3c.dom.Element [] detailed = e.getFaultDetails();
for(int i=0;i<detailed.length;i++){
System.out.println("Node Name : "+detailed.getNodeName());
System.out.println("Node Value : "+detailed[i].getNodeValue());
System.out.println("Node Tag Name : "+detailed[i].getTagName());
System.out.println("Local Name : "+detailed[i].getLocalName());
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Undefined
faultActor:
faultNode:
faultDetail:
{http://www.mydomain.com/api/create/version/two}<b>FaultType: INVALID INPUT DOCUMENT</b>
{http://www.mydomain.com/api/create/version/two}<b>FaultNumber: 40</b>
{http://www.mydomain.com/api/create/version/two}<b>FaultDescription: The input document is not valid.</b>
Undefined
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)

For a class, I am creating comments as shown below in my source code and it's displaying fine in the javadoc
* <pre>
* This is className
* </pre>
public class className
}In the same way, I am giving comments to my method, but it's not getting displayed in the Method Detail section of the javadoc.
* This is methodName
private static String methodName(String line)
}Could you please help me with this.

Similar Messages

  • How to get osb fault detail payload's element value?

    I have a proxy service, in the service error handler, my business fault is under fault detail node, such as following:
    <soap:Body      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>invalid taskId:1234</faultstring>
    <detail>
    +<ns1:WFWSException xmlns:ns1="http://service.webservice.wfws.xxx.com/">+
    +<errorCode      xsi:type="xs:int" xmlns:ns2="http://service.webservice.wfws.xxx.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">-1</errorCode>+
    +<errorInfo      xmlns:ns2="http://service.webservice.wfws.xxx.com/">invalid taskId:1234</errorInfo>+
    +<message      xmlns:ns2="http://service.webservice.wfws.xxx.com/">invalid taskId:1234</message>+
    +</ns1:WFWSException>+
    </detail>
    </soap:Fault>
    </soap:Body>
    I want to get WFWSException's errorCode, errorInfo and message seperately, but detail is anytype, how can I do?

    see : http://redneckprogrammer.blogspot.nl/2010/11/osb-getting-xml-out-of-table-column.html
    you need to parse the string to xml and then you should be able to execute a xpath expression on it
    maybe you also need to add the namespace "http://service.webservice.wfws.xxx.com/" to the default namespace list otherwise use wildcard selecting with *:

  • How to get SOAP Fault Details as a String in weblogic 9.2

    HI,
    I want to extract SOAP Fault Details (the detail part int the SOAP Fault) as a string? How do I do it?
    Thanks,
    Sanjesh

    Hi,
    The recommended solution is to download Oracle JRockit Mission Control (available here: http://www.oracle.com/technology/software/products/jrockit/index.html) and install on your server. The installers include Oracle JRockit JVM as well as Mission Control, and are free of license checks.
    If that solution for some reason is unfeasible you can download legacy development license files from here (http://download2.bea.com/pub/license/All%20Products/BEA_WebLogic.zip).
    The license you are looking for is named “LIC-WLRT20.txt”. Rename it to license.bea, and follow the instructions at http://edocs.bea.com/jrockit/geninfo/diagnos/conf_run.html#wp1077371

  • How to parse crystal report query prompt value via url parameters

    HI All,
    I am creating a employee detail report in crystal report. The recordset is huge and i have created a parameter prompts in the query and thinking to parse the prompt value via url parameters. Not sure why i still could not make it works.
    for example, in my query panel i have created a prompt called "pwwid"
    and this is how i parse the prompt value via open document url.
    OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=AV8U6HlIq4FBl_MhcBwHqGI&lsSpwwid=12345678
    I read the sap documentation, this is how it parse the prompt value via url parameter. but it is not working for me and i am getting prompt to fill in the wwid whenever i run the reports.
    any idea why i am not getting this works?
    Regards,
    KeatAun

    Could you try:
    OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=AV8U6HlIq4FBl_MhcBwHqGI&lsSpspwwid=12345678
    -Abhilash

  • How to call a detail report from a master report in 11g?

    How to call a detail report from a amster report in 11g?
    We have a requirement to call a detail report based on the invoice id that will parsed from the master report in OBIEE 11g. Any ideas sugegstions will be greatly appreciated.
    Thanks,
    Edited by: user8957415 on Jul 31, 2012 9:04 AM

    Check these links
    http://gerardnico.com/wiki/dat/obiee/master_detail
    http://prasadmadhasi.com/2011/11/13/master-detail-event-in-obiee-11g-and-pass-multiple-events-to-one-detail-report/
    Hope these helps

  • How to configure fault exception

    I have a scenario rfc to soap,even if the input  data from rfc is worng or unauthorised than inspite of rfc going to dump,i want a msg like unauthorised even the scenario is failed..i think this can be possible by creating fault exception error....
    I have an error in moni this error is because of unauthorisation...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!-- Call Adapter --> - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"> <SAP:Category>XIAdapter</SAP:Category> <SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code> <SAP1 /> <SAP2 /> <SAP3 /> <SAP4 /> <SAP:AdditionalText>soap fault: [Security:090304]Authentication Failed: User  javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User denied</SAP:AdditionalText> <SAP:ApplicationFaultMessage namespace="" /> <SAP:Stack /> <SAP:Retry>M</SAP:Retry> </SAP:Error>
    In Message monitoring
    SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: [Security:090304]Authentication Failed: User  javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User  denied
    Can any please tell me how to configure fault exception in my scenario...

    Hi
    Go thro the following links for knowing things about Fault Messages.
    Fault Message Type
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/a45c3cff8ca92be10000000a114084/frameset.htm
    hope this helps.
    regards,
    P.Venkat

  • How to parse xml file, containing image,  generaged from JAX-RS connector?

    Hi,
    We are using JAX-RS connector and just want to call getBusinessObjects() directly using JerseyMe (basically bypassing sync engine). We have used sync engine so far and want to try as how to bypass it. The method produces the text/xml and verified the xml file in the web by giving the full url. The plan is to call the same URL from the Java Me Client using JerseyMe. When I print the bytes at the client I receive the same xml that I have seen in the web. Actually, I am passing an image that I can see in a different character format in xml (assuming this is bcos of UTF-8 encoding). I am wondering as how to parse this xml file and how to decode the "UTF-8" format? Do we need to use SGMP for this or use kxml or java me webservices spec.
    I would really appreciate if somebody can answer this one.
    I have been observing in this forum that SGMP team is not at all active in answering the questions. Please let us know whether Oracle is keeping this product and we can continue using SGMP1.1. Please let us know so that we can plan accordingly as we are building a product based on SGMP.

    Hi Rajiv,
    The client library is using org.apache.commons.codec.binary.Base64 internally. We don't have the full Commons Codec library bundled, but you can look up the javadoc for the Base64 class online. All you need to do is call Base64.decode(obj.getBytes()) on the objects you get out of the XML.
    In general it isn't a good idea to depend on implementation details of the client library, but in this case, I think it is pretty safe to expect org.apache.commons.codec.binary.Base64 to remain in our library.
    --Ryan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to Parse different HTTP response efficiently ... ?

    how to Parse different HTTP response efficiently ... ?

    1. Last time I helped you I didn't get any response back.
    2. How is this question related to Swing?
    3. Your question has too many details...
    4. No help for you.

  • How to parse Dir Command Output ?

    Hi All,
    When I execute the Dir /tc i'll get the output :-
    Volume in drive D has no label.
    Volume Serial Number is E878-37E9
    Directory of D:\rohit
    02/15/2006 10:06 AM <DIR> .
    02/15/2006 10:06 AM <DIR> ..
    03/13/2006 11:03 AM 2,349 appe_attr_sheet.xls
    03/13/2006 10:38 AM 2,149 appe_goal_sheet.xls
    02/15/2006 10:09 AM 32,768 CV.doc
    3File(s) 296,513 bytes
    2 Dir(s) 16,253,956,096 bytes free
    But i want only files details. How to parse the above String to this :-
    03/13/2006 11:03 AM 2,349 appe_attr_sheet.xls
    03/13/2006 10:38 AM 2,149 appe_goal_sheet.xls
    02/15/2006 10:09 AM 32,768 CV.doc
    Thanks.

    HI All,
    I am confused .. here what i have written:-
    public class TestStringConversion
         public TestStringConversion()
              Process objPerm = null;
              BufferedReader input = null;
              String[] sTokens;
              String command = "cmd /c dir /tc";
              try {
                   objPerm = Runtime.getRuntime().exec(command);
                   input =
                        new BufferedReader(
                             new InputStreamReader(
                                  objPerm.getInputStream()));
                   StringBuffer output = new StringBuffer();
                   String lineOutput = null;
                   int lineNo = 0;
                   while ((lineOutput = input.readLine()) != null ) {
                        if(lineOutput.indexOf("<DIR>")>0 && lineOutput.indexOf("File(s)")==-1 && lineOutput.indexOf("Dir(s)")==-1)
                             continue;
                        lineNo++;
                        if (lineNo > 5) {
                             //&& lineOutput.indexOf("<DIR>")==-1 && lineOutput.indexOf("File(s)")==-1 && lineOutput.indexOf("Dir(s)")==-1
                             output.append(lineOutput + "\n");
                   Pattern pat =Pattern.compile("^((0?[1-9])|(1\\d)|(2\\d)|(3[0-1]))\\/");
                   Matcher mat;
                   mat = pat.matcher(output);
                   if (mat.find()){
                             System.out.println(output);
                   }else{
              } catch (Exception e) {
         public static void main(String args[])
              new TestStringConversion();
    Plz let me know what i have to do , to get only Files from a directory and put it into treemap.
    Thanks.

  • Portal Master-detail form how to auto assign detail record sequence number

    Portal Master-detail form how to auto assign detail record sequence number.Please help me?

    You can just read the following section
    Can I specify a sequence number generator as the default value for a form column?
    Yes. Enter the following in the "default value" field for the column:
    #<schema name>.<sequence name>.nextval
    where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
    For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
    #SCOTT.CUSTOMER_SEQ.NEXTVAL
    same way you can do for master - detail form.
    for more information on forms please refer the following URL.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    hope it helps.

  • How to clear all details in iCal before syncing with Entourage?

    Deary me! I have been back and forth to iCal and Entourage trying to find which would be best. I have decided that Entourage will suffice - although not perfect by any means. In the meantime I have completely jammed up my iCal and daren't not try syncing Entourage yet otherwise I will never understand it and my iphone will be full of toot! Anyone know how to clear all details in iCal before syncing with Entourage? (Happy Sundays!!)

    Answer .... delete all calendars in iCal but leave the Entourage one there! Don't delete that as there will be big trouble!

  • How to track the details of the user?

    Hello,
            I want to know how to track the details of a USER from the past 60 days I mean i want to know how what is the time and time out of the SAP system for the past 60 days?
    waiting for the valuable replys.
    Thks

    Read,
    http://help.sap.com/saphelp_nw04s/helpdata/en/2c/c59d37d373243de10000009b38f8cf/frameset.htm
    regards
    Juan

  • How to parse xml in jsp

    hei evryone!!!
    I'm a newbie in java, i just wanna know how to parse an xml file in JSP wherein i could remove nodes / modify certain nodes on the xml.
    Any suggestions / codes/ ideas would be much appreciated

    On my jsp page the default screen would be the list of traders. The user of the said application has the option to make some changes on the list either, add more trader/s on the list , remove specified trader/s on the list or edit certain trader/s. Furthermore, the user can also cancel the changes he made by clicking the cancel button or commit the modification he made by clicking the save button. When the application altered something, the changes must be reflected on the front end right away, but not on the database yet. In doing so, I intend to have two xml files , (1) the original xml file that is send to a CmsServlet (the servlet code that does the database commit) and (2) the temporary xml file that the page loads, which is initially just a copy of the original xml file. So whenever changes made at the frontend the temporary file is also altered, and when the save button is clicked, the temporary file is copied to original xml file to send the changes on the CmsServlet. But when the application user withdraws the changes he made at the frontend by clicking the cancel button , the original xml file is then copied to temporary xml file to reload the page.
    The access/modification on the temporary xml file is done in default.jsp.

  • How to parse XML file with namesapce?

    Hi,
       I am trying to parse an xml file having namespace. But no data is returned.
    Sample Code:
    public class XMLFileLoader
    var xml:XML = new XML();
    var myXML:XML = new XML();
    var XML_URL:String = "file:///C:/Documents and Settings/Administrator/Desktop/MyData.xml";
    var myLoader:URLLoader = null;
    public function XMLFileLoader()
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    myLoader= new URLLoader(myXMLURL);
    myLoader.addEventListener(Event.COMPLETE,download);
    public function download(event:Event):void
    myXML = XML(myLoader.data);
    var ns:Namespace=myXML.namespace("xsi");
    for(var prop:String in myXML)
         trace(prop);
    //Alert.show(myXML..Parameters);
    //trace("Data loadedww."+myXML.toString());
    //Alert.show(myXML.DocumentInfo.attributes()+"test","Message");
    The XML Contains the following format.
    <Network xmlns="http://www.test.com/2005/test/omc/conf"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.test.com/2005/test/omc/conf/TestConfigurationEdition3proposal4.xsd">
        <TestDomain>
          <WAC>
            <!--Release Parameter  -->
            <Parameters ParameterName="ne_release" OutageType="None"
                        accessRight="CreateOnly" isMandatory="true"
                        Planned="false"
                        Reference="true" Working="true">
              <DataType>
                <StringType/>
              </DataType>
              <GUIInfo graphicalName="Release"
                       tabName="All"
                       description="Describes the release version of the managed object"/>
            </Parameters>
    </TestDomain>
    </Network>
    Any sample code how to parse this kind of xml file with namespaces...
    Regards,
    Purushotham

    i have exactly the same problem with KXml2, but using a j2me-polish netbeans project.
    i've tried to work around with similar ways like you, but none of them worked. now i've spent 3 days for solving this problem, i'm a bit disappointed :( what is wrong with setting the downloaded kxml2 jar path in libraries&resources?
    screenshot

  • How to parse XML for internal table

    hi guys, I would like to know how to parse xml for an internal table. I explain myself.
    Let's say you have a purchase order form where you have header data & items data. In my interactive form, the user can change the purchase order quantity at the item level. When I received back the pdf completed by mail, I need to parse the xml and get the po qty that has been entered.
    This is how I do to get header data from my form
    lr_ixml_node = lr_ixml_document->find_from_name( name = ''EBELN ).
    lv_ebeln = lr_ixml_node->get_value( ).
    How do we do to get the table body??
    Should I used the same method (find_from_name) and passing the depth parameter inside a do/enddo?
    thanks
    Alexandre Giguere

    Alexandre,
    Here is an example. Suppose your internal table is called 'ITEMS'.
    lr_node = lr_document->find_from_name('ITEMS').
    lv_num_of_children = lr_node->num_children( ).
    lr_nodechild = lr_node->get_first_child( ).
    do lv_num_of_children times.
        lv_num_of_attributes = lr_nodechild->num_children( ).
        lr_childchild = lr_nodechild->get_first_child( ).
       do lv_num_of_attributes times.
          lv_value = lr_childchild->get_value( ).
          case sy-index.
             when 1.
               wa_item-field1 = lv_value
             when 2.
               wa_item-field2 = lv_value.
          endcase.
          lr_childchild = lr_childchild->get_next( ).
       enddo.
       append wa_item to lt_item.
       lr_nodechild = lr_nodechild->get_next( ).
    enddo.

Maybe you are looking for