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

Similar Messages

  • Types of fault message types

    Can someone tell me the different types of fault message types available in XI?

    Hi,
    Fault Message Types
    are used only for returining messages form the inobund side (application)
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/content.htm
    if you want to create error handling for a mapping
    you can use transformation step (in a BPM)
    add a block and catch the mapping error inside this block
    (and for instance send a file from this exception branch
    Refernces Fault message types for the Exception handling .
    Fault message types corresponding to the standard SOAP Fault type can be included (execepted in the outbound Asynchronous case)
    A fault message is a message that describes an application-specific error situation.
    Fault message types are designed for application-specific errors that occur on the inbound side and that are reported back to the sender or persisted in monitoring.
    · In the synchronous case, when an application-specific error occurs on the inbound side, instead of sending a response message back to the sender, the application can send a fault message to handle the error.
    · The fault message of the application for an asynchronous ABAP server proxy is persisted for monitoring. In the case asynchronous of Java server proxies, the fault message is part of a negative application acknowledgement (see Acknowledgments).
    Application-specific means that the application on the inbound side triggers the error itself because, for example, the request message did not contain sufficient information.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/5d/a45c3cff8ca92be10000000a114084/frameset.htm
    Please see the below links
    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
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    Thanks
    Swarup
    Edited by: Swarup Sawant on Mar 28, 2008 3:05 PM

  • How to assign two complex type data in message payload

    Hi ,
    In my xsd file two complex type data is there ,
    but when i am trying to add these in message type request and response payload , i can add only one payload,
    is it any way to add 2 complex types in message types request and response payloads.
    Regards
    janardhan

    Each request and response has but a single payload. You can change the element of the payload to a single complex type from your XSD, but that's it. You can't assign more than one element to the request (or response) payload. Someone please correct me if I'm wrong.

  • Using Fault Message Type in BPM

    Hi,
    In my BPM Scenario, I am using a synchronous send step in which I am using a fault message type.For giving the container for the fault message in the Properties area of the send step, I want to define a container corresponding to the Fault message Type I have already defined.How can I achieve this since it is not possible by defining an Abstract Interface? Can someone please explain how to do this?
    Thanks and Regards,
    Soumya.

    Hi Soumya,
    Here are the links for two threads. one has discussed fault mssage type in bpm and the other the general application of a fault message type.
    thread1:- Alert monitoring and fault message types
    thread2:- fault message in BPM process
    Regards,
    Sushumna

  • How is the Fault Message Type used?

    Hi,
    I have a HTTP-SOAP scenario.I want to post a request to a HTTP Server using the SOAP receiver adapter and get the ackowledgement message from the receiver, if it was successful or not. Is this possible using the Fault Message type?
    If not how else can i capture the response in the EO mode?

    Hi Sivasakthi
    Yes you can capture soap response using SOAP fault message
    Check this link for embedded soap response
    http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
    With this you can refer to this blog as well
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
    Thanks
    Gaurav

  • Emulate Fault message in BPM

    Hello
    I have read all related topics
    fault message in BPM process
    Alert monitoring and fault message types
    Using Fault Message Type in BPM
    but no answer..
    I have synch BPM that send synch request to RFC and a mapping step. Then I have to catch exception (of send step or mapping) and send fault message in exception handler.
    I haven't a proxy. I want to create fault message manually and send it. Is it possible? I cannot create an interface of fault message type.

    Hi Sergey,
    As far as I know, it's possible to catch the mapping/send exception.
    It's also easy to define an exception branch for this exception, and inside the exception branch, send a "normal" message in a send step.
    However, as far as I know there's no way of specifying a BPM send step that sends a fault message.
    At least in my experience, regular messages are just as useful when sending error information.
    Cheers,
    Ofer

  • 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

  • How to use Adaptive WebService Model with CAF WebService and Complex Type

    Hi All,
    I am trying to use the Adaptive Web Service Model and call a WebService generated by the CAF. The return type of the WebService is a Complex Type.. I receive an exception when trying to instantiate the Model Node.
    Does anybody know how to use the Adpative Web Service Model with CAF WebServices and Complex Types as return type?
    Help is appreciated..
    Thanks, Johannes

    Thanks Mukesh.
    It is not possible to apply the Service Controller Template on Enterprise Java Bean Models as described in the Document. When I try to aply the template on the EJB Model, NWDS says: Only Webservice Models and RFC Models are supported...???
    I did not find any information about how to return complex types in AWS.. in this document???
    Is there such information available? Has anybody ever done that? There must be a way to do that.. Is is the standard approach, isn't it...? Please help me out there.. I need to get this running..
    Thanks, Johannes

  • Reduce number retries for an automated activity on a fault-message

    Hi everyone,
    is it possible to reduce the number of retries if an automated activity gets a fault response? With correcting my logical destinations it was possible for me to achieve communication to a webservice outside the netweaver.
    Now I tried the same with a selfmade deployed process and it "worked" - too good. When the automated activity tries to call the webservice, which is a synchromous bpm-process I created, it recieves a fault message. This fault.message is a "the process has been triggered" message that starts my next process. Now that the automated activity gets the "error" I wanted it retries 3 times to get a working connection with the service - so I get 3 new process instances. Is it possible to reduce the retry-counter and if yes, where can I do that? I already looked for this option in the service registry and in the logical destination settings. There isn't an option in the NWDS for the automated activity and i haven't found something in the help.sap.com,
    And yes I know that this isn't usefull for an operativ system.
    With kind regards,
    Markus

    Hi Markus,
    The number of retries is configured internally and cannot be modified on a per automated activity basis. To cover this use cases (BPM process A calling BPM Process B via WS), it is recommend to define the service interface of the process B as "one -way" (request without response) so that no SOAP fault it returned if case of successful start. In case an issue occurs during the start of process B, a SOAP fault will be returned.
    Hope this helps,
    David

  • Map xsd complex type to existing java class without adding JAXB annotations

    Hello
    I've got a case where I should map an xsd complex type to an existing Java class without modifying that class, i.e. without adding JAXB annotations to that class.
    Is this possible somehow?
    As far as I've understood, the <javaType> declaration (adapter, parse/print methods) can only be used for xsd simple types.
    Thanks, Tom

    It should be possible to implement an XmlAdapter<...,...> which performs the required conversion between the original type and a JAXB-annotated type. Then, at the places where the original type is used, the @XmlJavaTypeAdapter annotation would be used.
    The xjc compiler supports this for xsd simple types (xjc:javaType annotation), but not for complex types.
    Any idea why this is restricted to simple types?
    Would it be possible to implement a xjc plugin which does this for complex types?
    Thanks Tom.

  • Application ERROR - Fault message Error in Inbound ABAP Proxy !!

    Hi Folks,
    I have got application error while doing in Inbound proxy scenario. This inbound message is ProductActivityNotification, this message has got fault message. This message is triggering for faults. How to control this fault message or how to divert this error as an alert to RWB. Please give me your ideas step by step. Error as follows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Call Inbound Proxy
    -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>Application</SAP:Category>
    <SAP:Code area="ABAP">APPLICATION_ERROR</SAP:Code>
    <SAP:P1 />
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText />
    <SAP:ApplicationFaultMessage namespace="http://sap.com/xi/SAPGlobal20/Global">ProductActivityNotificationFault</SAP:ApplicationFaultMessage>
    <SAP:Stack>Application has thrown an exception</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Please find the fault message has got following values
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:ProductActivityNotificationFault xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:RAS:/1SAI/TAS653D9A9CCD9A8EF3AF9B:701:2009/02/10">
    - <standard>
    <faultText>Proxy Class (Generated)</faultText>
    - <faultDetail>
    <severity>information</severity>
    <text>Start of inbound processing: ProductActivityNotification (ID )</text>
    <id>000(/SCA/BIF_PROACT)</id>
    </faultDetail>
    - <faultDetail>
    <severity>error</severity>
    <text>Message ID is missing</text>
    <id>032(/SCA/BIF_MI)</id>
    </faultDetail>
    </standard>
    </n0:ProductActivityNotificationFault>
    Will you please focus bit light on this error message please?
    Regards
    San

    Hi,
    Check your Source data is correct or not..beofr executing your scenario execute your inboud Proxy with valid data ,
    check below blog...
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    Regards,
    Raj

  • Xws-security and fault messages

    Hi,
    I have a problem with xws-security and fault messages.
    It seems that the security policy is not applied to fault messages. This results in a "javax.xml.rpc.soap.SOAPFaultException: Message does not conform to configured policy: No Security Header found" exception whenever a fault message is thrown.
    As a result I can not use any meaningful application-specific fault messages as they violate the security policy. Is this correct? Surely a fault message is a SOAP message just like any other and should have the security policy applied to it as usual, or am i missing something here?
    If anyone can shed any light on this i'd really appreciate it.

    XWS-Security is not integrated with Sun Java Studio Enterprise. However, if you would like to implement message level security in a web service in the Java Studion Enterprise environment, you may find this article useful:
    http://developers.sun.com/prodtech/javatools/jsenterprise/downloads/ea/jse8/reference/techart/security.html
    Rico

  • How  to read fault message in async soap receiver

    Hi experts,
    I have an asynchronous scenario IDOC->XI->SOAP.
    I've defined a SOAP fault message as part of the Inbound Message Interface.
    When an error occurs on the SOAP Server, the error description is returned in the form of the fault message.
    E.g.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Client</faultcode>
    <faultstring>Cannot find the required parameter [lastName] in request message content.</faultstring>
    <detail>
    <ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException xmlns:ns1='http://sap-j2ee-engine/error'>Cannot find the required parameter [lastName] in request message content.</ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    My question is how do I use this message in XI?
    I cannot seem to read this fault message.
    Please help.
    Thanks.
    Ron

    > > Fault messages are specially designed for Proxies
    > and
    > > RFC's only..............ASFAIK Fault messages wont
    > > work for SOAP reciever side...
    >
    > They actually also work with SOAP scenarios.
    >
    > Your WSDL will contain the fault message and in such
    > cases ( if you are using a BPM with exception handler
    > ) , in case a fault message is sent back, you will be
    > able to access this as well.
    >
    > Regards
    > Bhavesh
    Bhavesh,
    I'm not using BPM and I'm using a asynchronous mode for invoking the WebService.
    My WSDL has fault message defined, and I've assigned this fault message to the "Fault" portion of the Inbound Message Interface.
    How can I access my fault message in this case?
    Please help
    Thanks.
    Ron

  • Problem with abstract complex type in substitution group.

    Hi all,
    I have three xsds, A, B, C.XSD respectively. A.xsd:There is a substitution group and its complex type declared as abstract and element that uses them. B.xsd has the same structure as A except that it has complex type derived from complex type from A. C.xsd is same as B.xsd.
    The xml files of A and B validate but not of C.
    It gives the following error:
    This file is not valid. Unexpected element'signatureString' in element author. Expected signatureString,signatureText.
    Any help at the earliest is greatly appreciated.
    the code of each xsds is as follows:
    A.XSD:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:PARTICIPATION="Participation" targetNamespace="Participation">
         <!-- ================================================= -->
         <!-- Package: Participation -->
         <!-- ================================================= -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<ST>> SignatureString -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureString" type="PARTICIPATION:SignatureString" substitutionGroup="PARTICIPATION:signatureText"/>
         <xs:complexType name="SignatureString">
              <xs:complexContent>
                   <xs:extension base="PARTICIPATION:SignatureText">
                        <xs:attribute name="value" type="xs:string" use="required"/>
                   </xs:extension>
              </xs:complexContent>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: SignatureText -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="signatureText" type="PARTICIPATION:SignatureText" abstract="true"/>
         <xs:complexType name="SignatureText" abstract="true"/>
    </xs:schema>
    B.xsd:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:CM3202="Common3202" xmlns:PARTICIPATION="Participation" targetNamespace="Common3202">
         <xs:import namespace="Participation" schemaLocation="Datatypes3203/RDT/Participation.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> PractitionerParticipation -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="practitionerParticipation" type="CM3202:PractitionerParticipation" abstract="true"/>
         <xs:complexType name="PractitionerParticipation" abstract="true">
              <xs:sequence>
                   <!--xs:element name="signatureText" type="PARTICIPATION:SignatureText" minOccurs="0"/-->
                   <xs:element ref="PARTICIPATION:signatureText"/>
                   </xs:sequence>
         </xs:complexType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Participation>> Author -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="author" type="CM3202:Author" substitutionGroup="CM3202:practitionerParticipation"/>
         <xs:complexType name="Author">
              <xs:complexContent>
                   <xs:extension base="CM3202:PractitionerParticipation"/>
              </xs:complexContent>
         </xs:complexType>
    </xs:schema>
    C.xsd
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:VS3203="VitalSigns3203" xmlns:CM3202="Common3202" targetNamespace="VitalSigns3203">
         <xs:import namespace="Common3202" schemaLocation="Common3202.xsd"/>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- Class: <<Observation>> VitalSignsObservationEvent -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <xs:element name="vitalSignsObservationEvent" type="VS3203:VitalSignsObservationEvent"/>
         <xs:complexType name="VitalSignsObservationEvent">
              <xs:sequence>
                   <xs:element name="author" type="CM3202:Author" minOccurs="0">
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

    Hi all,
    This seems to be a bug unless someone of you have a solution.
    Also I ma new to xml/xsd world, so could someone please give the differences between xsi:type vs substitution groups with both element and complex type being abstract. Can this scenario be accomplished by usuage of choice groups.
    Also can anyone suggest any other good xml forums.
    Please let me know.
    Thanks in advance.

  • Email alert for fault message

    Hi guys
    i have define a fault message for a Async interface where the proxy is going to send back a fault message .
    This will show up as applilcation error within PI..
    I wanted to confirm if this will raise a email alert ??? I think it will

    >>i have define a fault message for a Async interface where the proxy is going to send back a fault message .
    >>This will show up as applilcation error within PI..
    When you return fault message (application error) as response , PI will treat as response message. This is not something like system error. In this case mesg process will be completed.
    >>>I wanted to confirm if this will raise a email alert ??? I think it will
    Only if you use CCBPM and raise exception via control step then you can send mails via alert configuration.   In your case you will not get any email unless you create custom coding.

Maybe you are looking for

  • I need to be taught about ID3 tags - help, anyone?

    Some of my songs are only appearing on 'Songs' on my iPod, and not simultaneously under 'Artists'. I have found this is because probably because of ID3 tags.....I don't know what they really are and I don't know how to fix ones that aren't 'complete'

  • Lookup in OIM

    Hi, I am getting a value from self registration page (which we have created ) in OIM user form.I want to insert that in the roles lookup child form in SAP.Does anyone know how to insert a field value in lookup in child form? Thanks

  • No aerial connection but cable box

    I am in a rented property and just signed upto BT vision. I connected to my tv aerial connection but cant get any tv channels at all.  Got a friend to look at it and then realised my aerial has been cut off and does not go to the roof aerial now!!. 

  • Can't open and edit html?

    I am trying to to open an html document after creating it, but when it opens it goes directly to the internet and not into plain text?

  • GRC V10 - Agent BRFplus

    Hi, we generated our own brfplus agent. But how is it possible to add more than one user ID to a rule result? We want to inform a group of userIDs. We don´t want to use MSMP Approver GroupID for the scenario, because we have to make flexible approver