Throwing fault message WebProxy generated over webservices

I have a requirement to throw fault message when ever there is any exception caught in webservice. I have written a xsd for Fault Type and using the same in all webservices. But the problem is when generating webProxy it is generating multiple Fault Message java class for each webservice.
Constraint I want to apply is .. When generating WebProxy for these webservices, it should generate single fault message class for the Fault type.
How to achieve this?
Sample webservice that I have created -
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="UserRegistrationService" targetNamespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" xmlns:tns="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" xmlns:inp1="http://portal.nv.gov/EnterpriseObjects/CBO/PortalAccount" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:flt1="http://portal.nv.gov/EnterpriseObjects/Common" xmlns:out1="http://portal.nv.gov/EnterpriseObjects/CBO/PortalAccount">
- <wsdl:documentation>
<abstractWSDL>http://IN-BLR-SOADEVL.corp.capgemini.com:8001/soa-infra/services/default/UserRegistrationService!2.3/UserRegistrationService.wsdl</abstractWSDL>
</wsdl:documentation>
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://portal.nv.gov/EnterpriseObjects/CBO/PortalAccount" schemaLocation="http://10.74.100.28:7001/CoreObjectsLibrary/Schema/v1.0/CBM/PortalAccountCBM.xsd" />
</schema>
- <schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://portal.nv.gov/EnterpriseObjects/Common" schemaLocation="http://10.74.100.28:7001/CoreObjectsLibrary/Schema/v1.0/Primitives/FaultType.xsd" />
</schema>
</wsdl:types>
+ <wsdl:message name="UserRegistrationServiceRequestMessage">
<wsdl:part name="request" element="inp1:SyncPortalAccountCBM" />
</wsdl:message>
- <wsdl:message name="UserRegistrationServiceResponseMessage">
<wsdl:part name="reply" element="inp1:SyncPortalAccountResponseCBM" />
</wsdl:message>
- <wsdl:message name="faultMessage">
<wsdl:part name="fault" element="flt1:Fault" />
</wsdl:message>
- <wsdl:message name="validateUserNameAccountRequestMessage">
<wsdl:part name="request" element="inp1:ValidatePortalAccountUsernameCBM" />
</wsdl:message>
- <wsdl:message name="validateUserNameAccountResponseMessage">
<wsdl:part name="reply" element="inp1:ValidatePortalAccountUsernameResponseCBM" />
</wsdl:message>
- <wsdl:message name="validateEmailIdAccountRequestMessage">
<wsdl:part name="request" element="inp1:ValidatePortalAccountEmailIdCBM" />
</wsdl:message>
- <wsdl:message name="validateEmailIdAccountResponseMessage">
<wsdl:part name="reply" element="inp1:ValidatePortalAccountEmailIdResponseCBM" />
</wsdl:message>
- <wsdl:message name="activatePortalAccountRequestMessage">
<wsdl:part name="request" element="inp1:ActivatePortalAccountCBM" />
</wsdl:message>
- <wsdl:message name="activatePortalAccountResponseMessage">
<wsdl:part name="reply" element="inp1:ActivatePortalAccountResponseCBM" />
</wsdl:message>
- <wsdl:message name="requestMessage">
<wsdl:part name="request" element="inp1:AssociateExistingBusinessRequsetCBM" />
</wsdl:message>
- <wsdl:message name="replyMessage">
<wsdl:part name="reply" element="inp1:AssociateExistingBusinessResponseCBM" />
</wsdl:message>
- <wsdl:portType name="UserRegistrationService">
- <wsdl:operation name="createPortalAccount">
<wsdl:documentation>This operation is used to create a Portal Account.</wsdl:documentation>
<wsdl:input message="tns:UserRegistrationServiceRequestMessage" />
<wsdl:output message="tns:UserRegistrationServiceResponseMessage" />
<wsdl:fault name="PortalAccountFault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="editPortalAccount">
<wsdl:documentation>THis operation is used to update or edit a user portal account.</wsdl:documentation>
<wsdl:input message="tns:UserRegistrationServiceRequestMessage" />
<wsdl:output message="tns:UserRegistrationServiceResponseMessage" />
<wsdl:fault name="PortalAccountfault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="validateUserName">
<wsdl:documentation>This operation is used to validate whether a username is unique or not.</wsdl:documentation>
<wsdl:input message="tns:validateUserNameAccountRequestMessage" />
<wsdl:output message="tns:validateUserNameAccountResponseMessage" />
<wsdl:fault name="PortalAccountfault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="validateEmailId">
<wsdl:documentation>This operation is used to validate whether a emailid is unique or not.</wsdl:documentation>
<wsdl:input message="tns:validateEmailIdAccountRequestMessage" />
<wsdl:output message="tns:validateEmailIdAccountResponseMessage" />
<wsdl:fault name="PortalAccountfault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="activateUserProfile">
<wsdl:documentation>This operation is used to activate a user account in Portaldatabase.</wsdl:documentation>
<wsdl:input message="tns:activatePortalAccountRequestMessage" />
<wsdl:output message="tns:activatePortalAccountResponseMessage" />
<wsdl:fault name="PortalAccountfault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="Authenticate">
<wsdl:documentation>This operation is used to authenticate and create account in TAX, UCM and eSoS.</wsdl:documentation>
<wsdl:input message="tns:requestMessage" />
<wsdl:output message="tns:replyMessage" />
<wsdl:fault name="Authenticatefault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="forgotUserName">
<wsdl:documentation>This operation is used to send username to a registered Email-Id.</wsdl:documentation>
<wsdl:input message="tns:UserRegistrationServiceRequestMessage" />
<wsdl:output message="tns:UserRegistrationServiceResponseMessage" />
<wsdl:fault name="fault" message="tns:faultMessage" />
</wsdl:operation>
- <wsdl:operation name="changePassword">
<wsdl:documentation>This operation is used to change password on OIM..</wsdl:documentation>
<wsdl:input message="tns:UserRegistrationServiceRequestMessage" />
<wsdl:output message="tns:UserRegistrationServiceResponseMessage" />
<wsdl:fault name="fault" message="tns:faultMessage" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="UserRegistrationServiceBinding" type="tns:UserRegistrationService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="createPortalAccount">
<soap:operation style="document" soapAction="createPortalAccount" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="PortalAccountFault">
<soap:fault name="PortalAccountFault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="editPortalAccount">
<soap:operation style="document" soapAction="editPortalAccount" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="PortalAccountfault">
<soap:fault name="PortalAccountfault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="validateUserName">
<soap:operation style="document" soapAction="validateUserName" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="PortalAccountfault">
<soap:fault name="PortalAccountfault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="validateEmailId">
<soap:operation style="document" soapAction="validateEmailId" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="PortalAccountfault">
<soap:fault name="PortalAccountfault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="activateUserProfile">
<soap:operation style="document" soapAction="activateUserProfile" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="PortalAccountfault">
<soap:fault name="PortalAccountfault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="Authenticate">
<soap:operation style="document" soapAction="Authenticate" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="Authenticatefault">
<soap:fault name="Authenticatefault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="forgotUserName">
<soap:operation style="document" soapAction="forgotUserName" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="fault">
<soap:fault name="fault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="changePassword">
<soap:operation style="document" soapAction="changePassword" />
- <wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" namespace="http://xmlns.oracle.com/UserRegistrationApp/UserRegistrationService/UserRegistrationService" />
</wsdl:output>
- <wsdl:fault name="fault">
<soap:fault name="fault" use="literal" encodingStyle="" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="UserRegistrationService">
- <wsdl:port name="UserRegistrationService" binding="tns:UserRegistrationServiceBinding">
<soap:address location="http://10.74.100.28:8001/soa-infra/services/default/UserRegistrationService/UserRegistrationService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks,
Rajdeep

Hi Frank,
In response to " the web service proxy doesn't generate the methods but exposed the WS port for you" .
There is a operation getAllDepartments() in your WebService.
I referred to link provided and in Class WsPrxyWrapperBean.java -
there is a method getAllDepartments() where wsport.getAllDepartments() is called to return the Departments.
In the WSDL i have provided the operation is supposed to return a responseDataType ... but Proxy created is not having any method like that.
I hope I made it more clear this time. Or Just creating a WebProxy on top the provided WSDL will show that Port is not having the proper methods.
Thanks,
Rajdeep

Similar Messages

  • Difference in Fault message types & exceptions for Webservice in ABAP

    Hello all,
    I am relatively new to the web service framework in SAP. My problem scenario is as follows.
    I have a WSDL file of a webservice from 3rd party non-SAP s/w  and I want to replicate the same webservice into SAP by creating FM in SE37 with same imp/exp parameters and functionality.
    So I first created a consumer proxy using the external WSDL file of non-SAP webservice. This generated imp/exp DDIC structures in SAP. Now I created a RFC FM in SE37 with similar Imp/exp parameters and relesed this FM as a webservice.  I then created another consumer proxy using WSDL of this newly created webservice in SAP.
    In the old consumer proxy I see a structure as SOAPFault as a Fault message type which has 3 fields ERRORCODE, TEXT, DETAILS but in the newly created consumer proxy I don't see Fault message types but i see exceptions which i mentioned in exception tabs while creating the FM. The imp/exp parameters are identical.
    So my question is while creating a web service in SAP using a FM in SE37, what needs to be done in order to get the Fault message types getting created automatically when we create a consumer proxy for this webserivice?
    Also based on the WSDL of 3rd party system , can i replicate the same web service in SAP ?
    Appreciate your expert advice on this.
    BR
    Nilesh Puranik

    Hi Krishna,
    I've read the SAP description about Fault Message Types but I'm still struggling on how to use them correctly.
    Why do we need them if I can't do nothing with it on the BPM side? After the mapping of the FMT, I'd like to acess it so that I can send a description back to the original system...The thing is, in BPM you can't acess the FMT, you can only create a new BRANCH (on a block step) for it...
    I've tried to acess the description text on trace which comes with the message, but it seems that the trace only serves for posting info, and not for getting any...
    The Mapping Runtime Constants have some information where you can read some descriptions, but nothing related to the errors....You can read the Receiver service, sender, interface_namespace, but nothing from the ERROR tag...
    Is there a way to get the description? Or anything related to the error tag?
    Thanks in advance

  • Catching Fault Messages when using a webservice

    Hi all.
    We are using a webservice that looks like this.
    nonSAP-system <-> XI <-> SAP
    A nonSAP-system asks for some information from a SAP-system. When we get an error of some kind we want to return the errormessage to the nonSAP-system so they will know what went wrong.
    For first we want to try to return the errormessage generated in XI or the SAP-system and when we get that to work we want to be able to generate our own faultmessages so we specific what went wrong in the in the call.
    We have looked around in the help pages and not getting a good picture on how to do this. Is there anybody who could help me out?
    BR
    Kalle

    Hi,
    Check these
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/a45c3cff8ca92be10000000a114084/frameset.htm
    i have documented a fault message scenario through my blog;
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI -
    /people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/a45c3cff8ca92be10000000a114084/content.htm
    check this nice blog also
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5d/a45c3cff8ca92be10000000a114084/content.htm
    Asynchronus RFC  exception handling
    XI Alerts are not getting triggered from proxy servers
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ee5bc490-0201-0010-e9b5-
    a258cf083bca
    /people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client
    Fault Message
    Regards
    Seshagiri

  • Sync/Async bridge via JMS with FAULT messages

    Hello all,<br><br>
    I set up a sync/async bridge scenario with using of JMS communication channel (SAP - JMSReceiverCC - JMSServer and application - JMSSenderCC - SAP). The normal communication works fine.<br>
    But what we can not solve is the Fault Message handling. If there is a application error behind the JMS, a fault message is generated instead of proper application response and sent back to XI. Without any additional setup of JMS Sender CC the processing of the message ends with "MAPPING - EXCEPTION_DURING_EXECUTE", because normal "response mapping" is executed instead of "fault message mapping". This is correct behavior without any discussion.<br><br>
    [SAPhelp|http://help.sap.com/saphelp_nw70/helpdata/en/45/202845de34072ce10000000a155369/frameset.htm] says that there are 2 module parameters to be set : fault, faultNamespace. The description is rather vague, so let's see, what the "NotifyResponseBean" does, when parameters fault/faultNamespace are filled:<br><br>
    <pre>if(fault != null && faultNamespace != null)
      if(faultNamespace.equals("http://sap.com/xi/XI/System"))
        ((XIMessage)message1).setMessageClass(MessageClass.SYSTEM_ERROR);
        ((XIMessage)message1).setError(fault, "no additional information");
      } else
        ((XIMessage)message1).setMessageClass(MessageClass.APPLICATION_ERROR);
        ErrorInfo errorinfo = message1.createErrorInfo();
        errorinfo.setAttribute("ApplicationFaultInterface", fault);
        errorinfo.setAttribute("ApplicationFaultInterfaceNamespace", faultNamespace);
        errorinfo.setAttribute("ErrorCode", fault);
        errorinfo.setAttribute("AdditionalErrorText", "no additional information");
        message1.setErrorInfo(errorinfo);
    } else
      ((XIMessage)message1).setMessageClass(MessageClass.APPLICATION_RESPONSE);
    }</pre><br>
    The code is pretty straight forward so one could assume, that it's the name and namespace of inbound synchronnous message interface what is supposed to be filled in the values of each parameter. And from that kind of information SAP XI can evolve how to handle the response, actually the fault.<br>
    Unfortunatelly the real situation is different - every time the fault message is generated and sent back to XI, the response is correctly corelated with the request message, "WaitResponseBean" and "NotifyResponseBean" are finished correctly and the processing crashes in messaging class on following exception:<br><br>
    java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:592) at
    com.sap.aii.messaging.mo.MessageContext.setAttribute(MessageContext.java:140) at
    com.sap.aii.adapter.xi.ms.XIMessage.updateHeaders(XIMessage.java:4244) at
    com.sap.aii.adapter.xi.ms.XIMessage.getTransportHeaders(XIMessage.java:570) at
    com.sap.aii.af.ra.ms.impl.ServerConnectionImpl.request(ServerConnectionImpl.java:212) at
    com.sap.aii.af.ra.ms.impl.core.transport.http.MessagingServlet.doPost(MessagingServlet.java:337) at ...
    <br><br>
    Is there anyone, who can put more light on JMS sync/async bridge fault handling ???
    <br><br>
    Thank you ...<br>
    Regards
    Tomas

    Hello again,
    I proceed in investigation little more, but the main problem has not been solved. I found that the problem is not even in WaitResponseBean (placed in JMCReceiverCC). This bean is woken up properly on base of proper CorrelationID. See the log:
    2009-10-15 11:00:33 Success WRB: entering WaitResponseBean
    2009-10-15 11:00:33 Success WRB: retrieving the message for f1ea1fc0-b96d-11de-9b68-00144f4acd86 ...
    2009-10-15 11:00:46 Success WRB: retrieved the message: ApplicationError
    2009-10-15 11:00:46 Success WRB: leaving WaitResponseBean
    I think, that the problem is somewhere within main messaging functionality. I suppose that on base of exception message:
    com.sap.aii.messaging.mo.MessageContext.setAttribute(MessageContext.java:140) at
    which is generated.
    Any ideas or comments ?
    Thank you in advance.
    Regards
    Tomas

  • Generating fault detail; basic auth over SSL

    2 questions.
    1) We are running GLUE in WL5.1 and are investigating porting the app to WL6.1.
    In GLUE we can control the content of the SOAP fault detail generated on the server
    through a SOAPException class. Is there any way to do this in WL6.1 SOAP?
    2) Does the WL6.1 SOAP client support basic auth over SSL? If so, do I specify
    an https URL and set the user/pwd in the context properties?
    Thanks,
    -rg

    Beta 1 does not support custom soap fault. it puts name of the
    exception class as faultstring and the exception message + stack
    trace as the details.
    We understand that users may want to customize the soap fault
    and we are planning to support it by allowing user to configure
    error pages. ie, user can specify the servlet/jsp to use in case
    foo exception occured while processing soap request.
    An example of the error handling servlet is attached.
    regards,
    manoj
    public class FaultHandler extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException
    res.setContentType("text/xml; charset=UTF-8");
    String eType;
    String eMessage;
    Exception e = (Exception)req.getAttribute("javax.servlet.error.exception");
    eType = e.getClass().getName();
    eMessage = e.getMessage();
    PrintWriter w = res.getWriter();
    w.println("<?xml version=\"1.0\" ?>");
    w.println("<soap:Envelope
    xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">");
    w.println("<soap:Body>");
    w.println("<soap:Fault>");
    w.println("<faultcode>");
    w.println(eType);
    w.println("</faultcode>");
    w.println("<faultstring>");
    w.println(eMessage);
    w.println("</faultstring>");
    if (e != null) {
    w.println("<detail>");
    e.printStackTrace(w);
    w.println("</detail");
    w.println("</soap:Fault>");
    w.println("</soap:Body>");
    w.println("</soap:Envelope>");
    Rhett Guthrie wrote:
    If it is the conent of the soap:fault/detail you want
    to modify, you can do it by simply throwing the
    exception with right message.Thanks for the reply Manoj, but are you sure that the exception message maps to
    the fault detail? The fault detail is supposed to be XML. It would be more natural
    to map the exception message to the fault message. But we need to specify both.
    We send a human readable message in the fault message and a complex XML structure
    (describing ways in which the fault can be fixed) in the fault detail.
    Thanks for any clarification you can give.
    -rg

  • Fault Message generated in ABAP Inboud Async Proxy not visible XI Moni

    Hi
        I developed a ABAP Inbound AsyncProxy, which raises an exception using a fault message type. The SMB_MONI in the Business System is displaying the message as Application Error. But the XI Monitor is showing it as sucesfully processed.
        How do I monitor application errors from XI Monitor when I am sending Asynchronous Messages using ABAP Proxies?
        The business system in context is R/3 Enterprise System which is has got the APINT patch on it.
    Thanks in advance...
    Regards
    KP

    I'm developing a Java Proxy and I'm experiencing the same problem. The exception is raised by my Java Proxy and it can be checked in RWB Message Monitoring of my central adapter engine. It can alse be checked in the MessagingSystem.
    Unfortunately, no message is returned to SAP XI, at least, I cannot see anything in SXI_MONITOR (SXMB_MONI).
    The point is: does ir make sense to generate a fault message in xml just to be checked in an html monitor? The xml tags don't appear correctly in html format and I had to debug my application in order to find out that the exception was correctly returned.
    If anyone here have advanced in this issue, please let me know.
    Best regards,
    Ricardo Bochner.

  • Fault Messages...how they generated ...Why?

    Hi
        I am not clear why always 2 fault messages will be created when ever we create
        <u>New name Space</u> ? If i delete those messages my scenario will work ?
        How these messages are generated and what is the main use of this
        messages?
    Adv thanx and points
    Regards
    Prasad

    Hi,
    <i>All fault message types reference the data type ExchangeFaultData for this part and, indirectly, the data type ExchangeLogData. These data types are automatically created in a namespace when you create the first fault message type there.</i>  from SAP help
    following will give more infor-
    http://help.sap.com/saphelp_erp2005/helpdata/en/5d/a45c3cff8ca92be10000000a114084/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/f3/c26c3cbfac384fe10000000a114084/content.htm
    Rgds,
    Moorthy

  • Custom fault message from OSB is not throw in BPEL

    Hi,
    I have created a custom fault error in OSB which is sent to BPEL.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    If my namespace in FAULT tag is "http://schemas.xmlsoap.org/soap/envelope/",
    message is understood as fault IN BPEL. But if I change namespace, BPEL understands as reply message.
    How can I use my custom fault message with different namespace as http://schemas.xmlsoap.org/soap/envelope/ ?
    Regards,

    SOAP Fault has a defined structure and defined namespaces. It does provide a placeholder for custom data though. Just like you can not change the namespace of Envelope of Body, similarly you cant change the namespace of Fault(if you want it to be recognized by the client apps). Any custom data you want to send in the SOAP Fault needs to be set as a child of 'detail' element of SOAP Fault. This custom data can have any namespace you wish. This Custom XML will be the element you define as Fault element in your WSDL
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault>
    <faultcode>env:Client</faultcode>
    <faultstring>some error string</faultstring>
    <faultactor>somedata</faultactor>
    <detail>
    {here you can put your custom XML content in any namespace which you have defined in the WSDL}
    </detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>

  • ErrorCode in fault message from Webservice

    I have a sync scenario: R3 <> XI <> WS.
    Sometime the request is wrong, then WS sends back fault message. All these fault messages are captured by system under cx_ai_system_fault exception, while I want to see the errorcode from the WS.
    Is there any idea how to get this errorcode, or how to map the fault message (from WS) to any structure in R3?
    Thanks

    I mapped it but it didn't work. Still returned cx_ai_system_fault exception. There is nothing in the custom exception structure.
    Have you ever tried it successfully? Did you do mapping from fault message (WS) --> exception structure (R3)? What kind of mapping did you use? How do you define custom exception structure?

  • Complex types in fault messages - is this possible in WLS8.1?

    Hi all,
    I'm writing a standard WSDL and want to return a complex type (or at least, a customised simple type) in a fault. This has been previously discussed here: http://forums.bea.com/bea/thread.jspa?threadID=600004053&tstart=15. I've given full details below, but the short story is that if a <fault> message if a complex type, then wsdl2service fails with odd errors. If on the same WSDL/schema I change the exception type to a builtin type (like xsd:string), it all works fine.
    Google yields nothing, but if anyone has some pointers on how to do it or where to read, I'd be grateful.
    Cheers,
    -Tim West
    Details:
    I have a message and operation:
      <message name="AirlineException">
        <part name="AirlineException" element="tns:AirlineException"/>
      </message>
      <portType name="AirlinePort">
        <operation name="getCustomer">
          <input message="tns:getCustomerIn"/>
          <output message="tns:getCustomerOut"/>
          <fault name="AirlineException" message="tns:AirlineException"/>
        </operation>
      </portType>Where AirlineException is defined thus:
          <complexType name="AException">
            <sequence>
              <element name="message" type="string" nillable="true"/>
            </sequence>
          </complexType>
          <element name="AirlineException" type="tns:AException"/>(If I can get this to work, I will flesh out the complexType with some more information).
    When I attempt to generate bindings with autotype and wsdl2service, autotype works but wsdl2service fails like this:
    generate-server-binding-jar:
    [autotype] Autotyping for wsdl Deploy/airline/airline-ws-server_war/WEB-INF/airline.wsdl
    [wsdl2service] Generating web service from wsdl Deploy/airline/airline-ws-server_war/WEB-INF/airline.wsdl
    [wsdl2service] C:\...\org\jacksonwest\airline\binding\AirlineException.java:13:
           package org.jacksonwest.airline.binding.types does not exist
    [wsdl2service] private org.jacksonwest.airline.binding.types.AException info;
    [wsdl2service] ^
    [wsdl2service] C:\...\org\jacksonwest\airline\binding\AirlineException.java:15:
          package org.jacksonwest.airline.binding.types does not exist
    [wsdl2service] public AirlineException(org.jacksonwest.airline.binding.types.AException t) {
    [wsdl2service] ^
    [wsdl2service] C:\...\org\jacksonwest\airline\binding\AirlineException.java:19:
          package org.jacksonwest.airline.binding.types does not exist
    [wsdl2service] public org.jacksonwest.airline.binding.types.AException getAirlineException() {
    [wsdl2service] ^
    [wsdl2service] C:\...\org\jacksonwest\airline\binding\AirlineException.java:23:
          package org.jacksonwest.airline.binding.types does not exist
    [wsdl2service] public void setAirlineException(org.jacksonwest.airline.binding.types.AException t) {
    [wsdl2service] ^
    [wsdl2service] 4 errors
    [wsdl2service] java.io.IOException: Compiler failed executable.execNow, if I change the type of element 'AirlineException' to a built-in type like 'string', it all works fine. Also, I can use the generated 'AException' type in an <input> or <output> message - it's the combination of complexType and <fault> that causes the problem.
    My service was originally document/literal, and I've since rewritten it as rpc/literal, as I've had more success with rpc than document on Java platforms. The problem exists in both WSDL styles.
    I've read at http://e-docs.bea.com/wls/docs81/notes/new.html that WLS8.1 should be now able to handle complexTypes in faults, but for the life of me I can't do it!

    I got it :)
    The bizarre compile errors were being caused by the old version of the classes being present on the classpath that I supplied to wsdl2service. When I removed them (leaving only weblogic.jar and webservices.jar on the classpath), it worked fine first time.
    So, my guess is that the ones on the classpath (the old ones) were taking precedence over the newly-generated ones, and these were obviously not compatible!
    Cheers,
    -Tim

  • Handling fault messages in an Integration Process (bpm)

    I have a bpm in PI 7.11 which performs a synch call to an external webservice. In addition to the request/response, that webservice can also generate two faults: ObjectNotFoundFault and generalfault.  I am having trouble handling these faults - when a fault occurs my handler is not being invoked and thus the bpm process stops/errors. When I look at the underlying process (via txn swi1), I see the exact error text:
    "No exception defined for fault message ObjectNotFoundFault http://www.companyb.com/services/olsa_v1_0/"
    From what I understand within the bpm synch call step to the webservice I need to do the following to handle the exception/fault:
    - put the synch call (to the webservice) into a block
    - add an exception branch to that block named let's say A & set the exception handler of that block to be A
    - in the exception setting of that synch step, select A
    In my case, I don't care about the fault details other than to ensure it does not stop the whole Integration Process, so in my exception branch I don't do anything. I did try adding a control step within it too (as per SAP Press text book).
    Is there anything else I need to do here?  I am not mapping the returned fault - does the fault need to be mapped (not sure how I would do this given that the synch step uses an abstract interface and therefore to my knowledge no fault mapping can be done)? 
    There are 2 Notes that describe my issue exactly:
    https://service.sap.com/sap/support/notes/1484903
    https://service.sap.com/sap/support/notes/1158699 <-- this one refers more to me, but we already have in 7.11
    Can anyone let me know exactly the steps I would perform to handle these faults - does the exception name / handler A above need to be named the actual exception / fault ObjectNotFoundFault?
    Any help appreciated.
    Thanks,
    Keith)?
    Any help appreciated.
    Thanks,
    Keith

    Thanks - my scenario I guess is #2 of that blog. But is your take that even if I don't care what is in the fault message, i.e. I don't care about the contents of it but rather I just want to continue on from it, that I still need to perform this java coding?  It's not clear to me from what he says - it seems to me he does the java coding to actually capture the contents of the message.  I am in fact using the soap axis adapter too, as he is. The screen shot showing the exception branch is basically what I have.
    Regards,
    Keith

  • Fault message handling in BPM

    Hi again xi fighters
    I created a business process with a synchronous sending step. I defined all interfaces and implemented also an own fault message type within the synchronous abstract interface. If the used RFC got the correct data the sync. sending step worked proper and also the business process worked fine. If I providing wrong data to the RFC to force him to throw an exception the Business process received the fault message. Then I just want to send the received fault message asynchronously to a file adapter within the defined exception branch. And now the question no-one answered in several discussion threads ;-<
    How can I send the message? I am not able to implement a new variable in the container for the fault message type. Any advises here?????
    Please help me, before I got inshane of SAP ;->>
    Regards Oliver
    Message was edited by: Oliver Bluhm
    Hi everybody
    any ideas, or is the question not clear. Please have a look and let me know you exlperience!
    Regards Oliver

    Hi Oliver,
    how do you know, that is impossible to read the content of the fault message in the exception branch? Did someone from SAP say that? For days I read all the notes, blogs, help,.. and didn't find an answer.
    It should work.
    1. I have an integration process in XI sending a sync message to R3.                                    
    - OK
    2. In the generated proxy class I raise an exception of the generated exception proxy class.              
    - OK
    3. The exception message is shown in the message monitoring, containing also all our customer-data.
    - OK
    4. The integration process in XI activates the correct exception branch.
    - OK
    Missing: How do I get a grip on the data in the error message? 
    Kind regards Philipp
    Message was edited by:
            Philipp Jakob

  • Soap fault message handling in XI

    Hi,
    I am using axis 1.4. SAP XI is my clinet. My wsdl file as below
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://ws.example.com/service"
       xmlns:wns="http://ws.example.com/service"
       xmlns:tns="http://ws.exampleenterprise.com"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
             <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    targetNamespace="http://ws.exampleenterprise.com"
                    elementFormDefault="qualified">
                     <xs:complexType name="SecrtySbj">
                             <xs:sequence>
                                     <xs:element name="usrname" type="xs:string"/>
                                     <xs:element name="pswrd" type="xs:string"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:complexType name="AuthenticateRequest">
                             <xs:sequence>
                                     <xs:element name="secrtySbj" type="tns:SecrtySbj"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="authenticateRequest" type="tns:AuthenticateRequest"/>
                     <xs:complexType name="AuthenticateResponse" >
                             <xs:sequence>
                                     <xs:element name="sessnId" type="xs:string"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="authenticateResponse" type="tns:AuthenticateResponse"/>
                     <xs:complexType name="customFault">
                             <xs:sequence>
                                     <xs:element name="customCd" type="xs:int"/>
                                     <xs:element name="customMsg" type="xs:string" minOccurs="0"/>
                                     <xs:element name="customExcp" type="xs:string" minOccurs="0"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="customFault" type="tns:customFault"/>
             </xs:schema>
    </wsdl:types>
    <wsdl:message name="authRequest">
       <wsdl:part name="parameters" element="tns:authenticateRequest"/>
      </wsdl:message>
      <wsdl:message name="authResponse">
       <wsdl:part name="result" element="tns:authenticateResponse"/>
      </wsdl:message>
      <wsdl:message name="CustomFault">
       <wsdl:part name="CustomFault" element="tns:customFault"/>
      </wsdl:message>
      <wsdl:portType name="AuthenticateServiceInterface">
            <wsdl:operation name="authenticate">
        <wsdl:input message="wns:authRequest" />
            <wsdl:output message="wns:authResponse" />
        <wsdl:fault name="CustomFault" message="wns:CustomFault"/>
       </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="AuthenticateServiceSoapBinding" type="wns:AuthenticateServiceInterface">
              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation name="authenticate">
        <soap:operation soapAction=""/>
        <wsdl:input>
         <soap:body use="literal"/>
        </wsdl:input>
            <wsdl:output>
                    <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="CustomFault" >
                       <soap:fault name="CustomFault" use="literal" />
               </wsdl:fault>
       </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="AuthenticateServiceService">
       <wsdl:port name="AuthenticateService" binding="wns:AuthenticateServiceSoapBinding">
        <soap:address location="http://10.236.14.6:8080/axis/services/AuthenticateService"/>
       </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>
    Axis generates the soap fault as below in detail tag as below
    <ns1:customFault xmlns:ns1="http://ws.examplenterprise.com">
    <ns1:customCd>123</ns1:customCd>
    <ns1:customMsg>Password is wrong</ns1:customMsg>
    <ns1:customExcp>CustomException</ns1:customExcp>
    </ns1:customFault>
    They are getting error like below while getting the fault message.
    <SAP:ApplicationFaultMessage namespace="http://ws.exampleenterprise.com">customFault<SAP:ApplicationFaultMessage>
    Question: Why it is throwing "ApplicationFaultMessage" for fault messages? is there any error in wsdl file in defining the elements? or style has to be different? or is it an namespace issue in the wsdl?
    Note: They are able to do it sucessfull for the response message.

    Hi,
    The answer is in your Question itself.
    XI Sequence
    1.First step is to identify the wsdl:Message element with the namespace http://ws.example.com/service
    2.The next step is to go to the part element in http://ws.exampleenterprise.com and map the fault message.
    To be simple in your case http://ws.example.com/service is the namespace of Fault Message and http://ws.exampleenterprise.com is the namespace of the fault message payload  (Fault XML Message).
    So even though the Fault XML Message has the namespace http://ws.exampleenterprise.com ,but if the fault namespace doesnot come with http://ws.example.com/service then Fault will not be triggered and processed in XI.
    I hope you get the difference between the two namespaces used and the implications of them.
    Fault is entirely different from respone.
    Its like exception in java. If you donot catch the correct exception, will the exception raised be caught? Similarly if your SOAP service doesnot invoke the fault message with correct namespace (http://ws.example.com/service ), you cannot invoke/catch the fault message in XI.
    Regards,
    Sudharshan N A

  • Fault message handling in abap client proxy

    Hi experts,
    i have scenario like this SAPECC---XI---WEBservice
    i was decided to using the ABAP CLIENT proxy in sender side and soap adapter communication in receiver side
    i will be get the wsdl file form client
    problem is i am in bit of confusion like  am i need to create fault message for this asychronous scenario?
      how can i create the fault message for this scenario(that WSDL) and how the abaperwill  handle those error
    thanks in advance

    Hi.
    You can use fault message but it won´t return a error to your ABAP Proxy because your interface is ASSYNC. The fault message generated will stop in Adapter Engine.
    If you need a return of the error, you have to change your interface to Sync mode.
    To get more information, follow the link below:
    Fault Message Type
    http://help.sap.com/saphelp_nwpi711/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    Best Regards.
    Bruno

  • SOAP adapter engine with system error, problem with fault message.

    HI,
    I have IDOC -> PI -> SOAP scenario.
    Idoc to PI is async. I have no problem in receiving the idoc in PI. The message mapping is carried out and sent to the adapter engine. I can also see the technical routing payload. It is sucessful at XML monitoring in SXMB_MONI.
    The error is at PI -> SOAP.
    I have wsdl provided by the receiver webservice. Which I have imported.
    And created a service interface against this wsdl. I tried changing it to both sync and async.
    I have also provided fault message.
    I have set a receiver soap communication channel and provided the target URL like "http://xxx/services" and soap
    action = processDocument. Also provided user id and password.
    I have a
    Sender Agreement
    Receiver determination
    Interface determination
    Receiver Agreement
    I check in RWB adapter engine, this message goes to system error. The error log is as shown at the bottom.
    When I see the message content, the SOap document shows me the details about IDOC, Instead I feel it should match
    with the wsdl, where they have specified the corresponding interface name and address location etc.Please correct me.
    How does the receiver know which service interface is it? The Service Interface which I created in the ER is
    different from the WSDL, Does this have to be same? I see that the soap document in the adapter engine has the
    Service interface name which I created in the  ER. Where in the document the Reciever interface name is sent?
    Where can I see the generated soap document for the receiver?
    Is there some setting/configuration required in PI for this to work?
    I tried using the tcpgw to see the error. If I dont provide the service interface name in the communication channel
    then I get the following error in the TCPGW. "The service cannot be found for the endpoint reference"
    When I provide the service interface name in the communication channel I get a valid fault message.
    Similarly
    When I use SOAPUI, I can see the fault exception being return. The adapter engine doesnot show an equivalent message
    instead it goes into system error as shown at the bottom. I guess this is expected, if so what is the work around? (I found this weblog /people/alessandro.guarneri/blog/2011/01/10/soap-fault-in-sap-pi-hijack-it, do I need to implement this? Or use ALEAUD?
    The fault message what I see in SOAPUI has the below format.
    <soapenv:Fault xmlns:axis2ns1="http://schemas.xmlsoap.org/soap/envelope/">
             <faultcode>axis2ns1:Server</faultcode>
             <faultstring>nested exception is: psdi.util.MXApplicationException: BMXAA7136E - Validation failed when the
                                database default values were set. See the associated message for more information.
               BMXAA4190E - Country NZ is not in the value list.</faultstring>
             <detail>
                <Exception>org.apache.axis2.AxisFault: nested exception is: psdi.util.MXApplicationException: BMXAA7136E
                          - Validation failed when the database default values were set. See the associated message for more information.
         BMXAA4190E - Country NZ is not in the value list.
                /Exception>
             </detail>
      </soapenv:Fault>
    And the fault message in my ER service interface is stanadard datatype ExchangeFaultData, which is different from
    the above. Is this the problem? Can I change the data type here to be the same as above?
    Audit log in the RWB adapter engine.
    Time Stamp Type Description
    30.09.2011 15:10:57 Information MP: processing local module Localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
    30.09.2011 15:10:57 Information SOAP: request message entering the adapter with user J2EE_GUEST
    30.09.2011 15:10:57 Information SOAP: completed the processing
    30.09.2011 15:10:57 Information SOAP: sending a delivery error ack ...
    30.09.2011 15:10:57 Information SOAP: sent a delivery error ack
    30.09.2011 15:10:57 Error MP: exception caught with cause
    com.sap.engine.interfaces.messaging.api.exception.MessagingException
    30.09.2011 15:10:57 Error Adapter Framework caught exception: null
    30.09.2011 15:10:57 Error Delivering the message to the application using connection
    SOAP_http://sap.com/xi/XI/System failed, due to:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException.
    30.09.2011 15:10:57 Information The message status was set to WAIT.
    30.09.2011 15:10:57 Information The asynchronous message was successfully scheduled to be delivered at Fri Sep 30
    15:15:57 NZDT 2011.

    I tried changing it to both sync and async.
    I have also provided fault message.
    dont feel that you need to do above steps.
    I have a
    Sender Agreement
    ideally you dont need a sender agreement (and a channel) for IDOC --> PI flow.
    When I see the message content, the SOap document shows me the details about IDOC
    this is fine...you may see fields as seen in EDI_DC40 of the IDOC...
    How does the receiver know which service interface is it?
    receiver need not know about the SI created in PI.
    The Service Interface which I created in the ER is
    different from the WSDL, Does this have to be same?
    you should the WSDL (external definition) as the Request Message in your service interface.
    Is there some setting/configuration required in PI for this to work?
    nothing specific...AFAIK
    I have set a receiver soap communication channel and provided the target URL like "http://xxx/services" and soap action
    can you open the URL from Internet explorer...from your machine or from the machine which is in the same network as your PI server?
    Things to check:
    WSDL structure in PI and in target system is exactly the same.
    does the target system require mesage in SOAP format (SOAP envelope - SOAP Header + SOAP body)?
    target system is up and running?

Maybe you are looking for

  • Mixing RAM speeds in Mac Pro 3.1

    I recently bought a used Mac Pro 3.1 early 2008 2xquad core 2.8 gHz.  It came with 6 1 Gig 667 MHz in RAM.  This Mac takes 800 MHz- can I fill one of the risers with 4x4 Gig 800 MHz while temporarily keeping 4 1 Gig in the other riser?  I realize all

  • IOS 6 "embed Segues" causes unresponsive view

    WWDC 2012 contains a session video called: "Adopting Storyboards in Your App" that demonstrates how to embed view Containers by utilizing the "Container View" offered within interface builder for storyboards. Playing with this functionality I'm runni

  • How much would a repair for an unresponsive volume button cost for an iPad 3?

    The volume button for decreasing the volume as stopped working and has been unresponsive to restarting the my 3rd gen iPad, and doing a hard shut down. My AppleCare warranty for my device has expired and I would like to know how much a repair for thi

  • Can we add new field to inventory Warehouse Report

    I have to add new field name "Desc in Frgn from Item master data" to   inventory Warehouse Report How can I do that

  • FCE won't start up.

    Hey, I just got my iMac G5 back from the shop, for the dreaded midplane replacement, and now I can't start up FCE at all. The serial number for the iMac has changed, would that cause the crashes? I did repair permissions, and moved the preference fil