Handling multiple XML message types in a webservice

My below scenario is
I have a webservice that receives XML messages from third party. The webservice populates 3 database tables through Mediator and DBAdapter from these XML files. Data for each table comes in a single XML file. How will I design the single werbservice to receive all the three different types of messages. eg: Customer, Order, OrderItem.
My WSDL is given below:
<?xml version= '1.0' encoding= 'UTF-8' ?>
<wsdl:definitions
name="receiveData"
targetNamespace="http://xmlns.oracle.com/sca/soapservice/receiveData"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:inp1="http://xmlns.oracle.com/pcbpel/adapter/db/top/Order"
xmlns:tns="http://xmlns.oracle.com/sca/soapservice/ESTAProcessing/receiveData" >
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" >
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/Order" schemaLocation="xsd/Order.xsd" />
</schema>
</wsdl:types>
<wsdl:message name="requestMessage">
<wsdl:part name="request" element="inp1:Order"/>
</wsdl:message>
<wsdl:portType name="execute_ptt">
<wsdl:operation name="execute">
<wsdl:input message="tns:requestMessage"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Any similar example will be really good. Let me know if it does make sense. Here what I am looking for is whether a single operation can handle all three types of XML schema defintions and if yes how to put that in the WSDL

Technically you can do with XSD switch option however you should rethink towards your design of accepting three different message in single web service. specially the case you have taken customer and order.

Similar Messages

  • Handling Multiple Error Messages through EXIT_SAPMM06E_012 for ME28

    Dear Team,
                           After Executing ME28, system will give List of PO's that are to be Released . User will select Multiple  PO's and
    Press Release button in Application toolbar. once it is relased, User will press save Icon for all released PO's. 
    Once Save icon is presed, I need to  do  Validation for Multiple PO's in the user Exit EXIT_SAPMM06E_012 and capture my
    ErrorMessages for all Released PO's for which Validation fails.
    Here in the given user Exit, one PO will be processed at a time as PO is defined as Import Parameter but it will handle all PO's
    and give the output in status bar saying 'Relased Saved' for all PO's which succesfully gonethrough.
    once we execute ME28, system is showing list output with PO's to be Released(As system is handling with Write statments). In this case, we dont have scenario of PBO and PAI Modules( where user can correct error if any validation fails) like we have for ME22,etc.
    I have Written simpel Error Message in the  User Exit.
    once i tried to trigger my user exit  by Releasing and Saving with One PO, Error Message is displayed ( as information Message
    appears) and if i Press Exit button in Error Message, it is coming out of Transaction.
    Is there any Possibilty to Handle Multiple Error Messages ( in my case for  Valdiation Failed Po's)  in ME28 ,after Releasing and Saving , and also user should not come out of Transaction once  Error Messages are Displayed.
    Thanks and Regards
    Suresh

    Hi Suresh,
    there is a tekpo table to handle all po items. you can put it in loop and do validations.
    if any errors through, there may be a ex_messages table of type bapiret2.
    or
    try like this:  MESSAGE E368(00) WITH TEXT-001 TEXT-002.
    thanks
    srinu
    Edited by: srinu rao on Sep 22, 2009 3:43 AM

  • XML message as input for webservice gives deserialization error

    Hi,
    jDeveloper 10.1.3
    BPEL PM 10.1.2.0.2
    Carrental example
    Problem:
    For the Business Rule Engine I did the Carrental XML example. Based on the java application that connects to the BR engine, I created a webservice in jDeveloper and deployed it to my localhost AS 10.1.3. The webservice has a testRule method that accepts a String buf as input. For now, the only thing the webservice does is return a 'do nothing' string. This works fine:
    When deployed the testpage generates the following SOAP message:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body xmlns:ns1="http://carrental/types/">
    <ns1:testRuleElement>
    <ns1:buf>my xml message</ns1:buf>
    </ns1:testRuleElement>
    </soap:Body>
    </soap:Envelope>
    The SOAP response is:
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://carrental/types/"><env:Body><ns0:testRuleResponseElement><ns0:result>do nothing...</ns0:result></ns0:testRuleResponseElement></env:Body></env:Envelope>
    In BPEL Designer I create a new asynchronous process ValidateBR, with a partnerlink for the webservice, based on the following WSDL file:
    <definitions
    name="Rent"
    targetNamespace="http://carrental/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://carrental/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns0="http://carrental/types/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://carrental/types/"
    elementFormDefault="qualified" xmlns:tns="http://carrental/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
    <complexType name="testRule">
    <sequence>
    <element name="buf" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="testRuleResponse">
    <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <complexType name="version">
    <sequence/>
    </complexType>
    <complexType name="versionResponse">
    <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <element name="testRuleElement" type="tns:testRule"/>
    <element name="testRuleResponseElement" type="tns:testRuleResponse"/>
    <element name="versionElement" type="tns:version"/>
    <element name="versionResponseElement" type="tns:versionResponse"/>
    </schema>
    </types>
    <message name="Rent_testRule">
    <part name="parameters" element="tns0:testRuleElement"/>
    </message>
    <message name="Rent_testRuleResponse">
    <part name="parameters" element="tns0:testRuleResponseElement"/>
    </message>
    <message name="Rent_version">
    <part name="parameters" element="tns0:versionElement"/>
    </message>
    <message name="Rent_versionResponse">
    <part name="parameters" element="tns0:versionResponseElement"/>
    </message>
    <portType name="Rent">
    <operation name="testRule">
    <input message="tns:Rent_testRule"/>
    <output message="tns:Rent_testRuleResponse"/>
    </operation>
    <operation name="version">
    <input message="tns:Rent_version"/>
    <output message="tns:Rent_versionResponse"/>
    </operation>
    </portType>
    <binding name="RentSoapHttp" type="tns:Rent">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="testRule">
    <soap:operation soapAction="http://carrental//testRule"/>
    <input>
    <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
    <soap:body use="literal" parts="parameters"/>
    </output>
    </operation>
    <operation name="version">
    <soap:operation soapAction="http://carrental//version"/>
    <input>
    <soap:body use="literal" parts="parameters"/>
    </input>
    <output>
    <soap:body use="literal" parts="parameters"/>
    </output>
    </operation>
    </binding>
    <service name="Rent">
    <port name="RentSoapHttpPort" binding="tns:RentSoapHttp">
    <soap:address location="http://localhost:7780/Rules-rent-context-root/RentSoapHttpPort"/>
    </port>
    </service>
    </definitions>
    I defined the process variable inputVariable to be defined based on the carrental.xsd schema. I assign the inputVariable to the 'buf' parameter of the webservice as shown below in the ValidateBR.bpel
    <!--
    // Oracle JDeveloper BPEL Designer
    // Created: Mon Mar 27 16:02:22 CEST 2006
    // Author: haanrw
    // Purpose: Asynchronous BPEL Process
    -->
    <process name="ValidateBR" targetNamespace="http://xmlns.oracle.com/ValidateBR" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ns1="http://rules.oracle.com/carrental" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns3="http://carrental/types/" xmlns:ns2="http://carrental/" xmlns:client="http://xmlns.oracle.com/ValidateBR" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"><!-- ================================================================= --><!-- PARTNERLINKS --><!-- List of services participating in this BPEL process --><!-- ================================================================= -->
    <partnerLinks><!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:ValidateBR" myRole="ValidateBRProvider" partnerRole="ValidateBRRequester"/>
    <partnerLink name="CheckBR" partnerRole="Rent_Role" partnerLinkType="ns2:Rent_PL"/>
    </partnerLinks><!-- ================================================================= --><!-- VARIABLES --><!-- List of messages and XML documents used within this BPEL process --><!-- ================================================================= -->
    <variables><!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:ValidateBRRequestMessage"/><!-- Reference to the message that will be sent back to the
    requester during callback
    -->
    <variable name="outputVariable" messageType="client:ValidateBRResponseMessage"/>
    <variable name="InvokeValidateBR_testRule_InputVariable" messageType="ns2:Rent_testRule"/>
    <variable name="InvokeValidateBR_testRule_OutputVariable" messageType="ns2:Rent_testRuleResponse"/>
    </variables><!-- ================================================================= --><!-- ORCHESTRATION LOGIC --><!-- Set of activities coordinating the flow of messages across the --><!-- services integrated within this business process --><!-- ================================================================= -->
    <sequence name="main"><!-- Receive input from requestor.
    Note: This maps to operation defined in ValidateBR.wsdl
    -->
    <receive name="receiveInput" partnerLink="client" portType="client:ValidateBR" operation="initiate" variable="inputVariable" createInstance="yes"/><!-- Asynchronous callback to the requester.
    Note: the callback location and correlation id is transparently handled
    using WS-addressing.
    -->
    <assign name="Assign_1">
    <copy>
    <from variable="inputVariable" part="payload" query="/ns1:repository"/>
    <to variable="InvokeValidateBR_testRule_InputVariable" part="parameters" query="/ns3:testRuleElement/ns3:buf"/>
    </copy>
    </assign>
    <invoke name="InvokeValidateBR" partnerLink="CheckBR" portType="ns2:Rent" operation="testRule" inputVariable="InvokeValidateBR_testRule_InputVariable" outputVariable="InvokeValidateBR_testRule_OutputVariable"/>
    <invoke name="callbackClient" partnerLink="client" portType="client:ValidateBRCallback" operation="onResult" inputVariable="outputVariable"/>
    </sequence>
    </process>
    When I deploy the process and initiate a testinstance from the BPEL console, the assign looks as follows:
    <InvokeValidateBR_testRule_InputVariable>
    <part name="parameters" >
    <testRuleElement>
    <buf>
    <driver>
    <driver-license-number>15-PS-FZ</driver-license-number>
    <name>Rob de Haan</name>
    <age>39</age>
    <vehicle-type>Saab</vehicle-type>
    <license-type>B</license-type>
    <pre-convictions>0</pre-convictions>
    <pre-accidents>0</pre-accidents>
    <able-to-drive>true</able-to-drive>
    </driver>
    </buf>
    </testRuleElement>
    </part>
    </InvokeValidateBR_testRule_InputVariable>
    The InvokeValidateBR shows the following error:
    <remoteFault>
    <part name="code" >
    <code>Client</code>
    </part>
    <part name="summary" >
    <summary>when invoking endpointAddress 'http://localhost:7780/Rules-rent-context-root/RentSoapHttpPort', caught exception while handling request: deserialization error: unexpected XML reader state. expected: END but found: START: {http://rules.oracle.com/carrental}driver</summary>
    </part>
    <part name="detail" >
    <detail>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client faultSubcode: faultString: caught exception while handling request: deserialization error: unexpected XML reader state. expected: END but found: START: {http://rules.oracle.com/carrental}driver faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:caught exception while handling request: deserialization error: unexpected XML reader state. expected: END but found: START: {http://rules.oracle.com/carrental}driver at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226) at org.collaxa.thirdparty.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645) at org.collaxa.thirdparty.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.collaxa.thirdparty.apache.axis.client.Call.invokeEngine(Call.java:2754) at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:2715) at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:1737) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeAXISMessaging(WSIFOperation_ApacheAxis.java:2113) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1611) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1083) at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:452) at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:327) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:189) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:601) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317) at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438) at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217) at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511) at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335) at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796) at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125) at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70) at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86) at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123) at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755) at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534) {http://xml.apache.org/axis/}hostname:NL-GRH-L120981 </detail>
    </part>
    </remoteFault>
    FYI: the webservice only contains a return "do nothing"
    Question:
    What is the proper way to assign an XML message to the web service?
    Any help would be appreciated.
    Rob
    Message was edited by:
    [email protected]

    Hi,
    Reading only is not possible..
    I will be still more clear in my question this time..
    I have deployed my bpel. My receiveInputVariable is of type xsd:string.
    So when i run the bpel in my console, i will be asked to give input as string data.
    So when i go to the XMLView, it will be like this.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Body xmlns:ns1="http://xmlns.oracle.com/Sabari_POC_Appln/DOM_Parser/ConvertToBLOB">
              <ns1:process>
                   <ns1:input></ns1:input>
    </ns1:process>
    </soap:Body>
    </soap:Envelope>
    Now, i am going to give my input like this. --- which leads to error.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Body xmlns:ns1="http://xmlns.oracle.com/Sabari_POC_Appln/DOM_Parser/ConvertToBLOB">
              <ns1:process>
                   <ns1:input>
    *<?xml version="1.0" encoding="UTF-8"?>*
    *<projects>*
    *<project id = "BP001">*
    *<name>Banking Project</name>*
    *<start-date>Jan 10 1999</start-date>*
    *<end-date>Jan 10 2003</end-date>*
    *</project>*
    *<project id = "TP001">*
    *<name>Telecommunication Project</name>*
    *<start-date>March 20 1999</start-date>*
    *<end-date>July 30 2004</end-date>*
    *</project>*
    *<project id = "PP001">*
    *<name>Portal Project</name>*
    *<start-date>Dec 10 1998</start-date>*
    *<end-date>March 10 2006</end-date>*
    *</project>*
    *</projects>*
    </ns1:input>
    </ns1:process>
    </soap:Body>
    </soap:Envelope>
    This xml is not accepted as string input.. so kindly suggest me some other solution.
    I also tried.. like.. making my receiveInputVariable of type xsd:anyType, it also dint help. same error occurred.
    Thanks,
    Sabarisri. N
    Edited by: Sabarisri N on Jul 20, 2011 1:03 PM

  • One IDOC to multiple XML messages

    Hi! I am using the graphical mapper in XI to map the SHPMNT03 IDOC to an XML message. The IDOC has a shipment node and potentially multiple delivery nodes, for example:
    E1EDT20
      - E1EDL20
      - E1EDL20
      - E1EDL20
    I need to create one XML message per E1EDL20 node. I figured I could do this in the mapper but when I execute the map for an IDOC with multiple E1EDL20 nodes, I get a 'Cannot cast 2 to boolean' error. The map executes fine when there is a single E1EDL20 in the IDOC.
    As always, help is very much appreciated and points awarded.
    Thx, Duncan

    Hi Duncan,
    Can you just check if this is what you have done,
    IR
    1. Message Mapping -- Occurence of the Destination message type ( file ) is unbounded
    2. Interface Mapping -- Occurence of the Destination Interface ( File ) is unbounded
    ID
    1. No sender communication channel , sender agreement
    2. Receiver communcation channel for FIle with appropriate FILE CONSTRUCTION MODE
    3. Receiver Determination  and Interface Determination with Sender Interface as the IDOC interface and Receiver Interface as the FILE INTERFACE.
    I think there is some misunderstanding on this front.
    Multimapping will work if you are trying to  do an IDOC to FILE with a 1:N split
    just check this and let me know if you ve missed something.
    Regards,
    Bhavesh

  • What is inbound XML message type and idoc type in Purchase Order response

    Hi ,
    We are on SRM 7 ECS , support pack SAPKIBKV08.
    We have a process in which vendor will send a Purchase Order response  which will be
    converted to XML format by a middleware. This XML message will come to
    SRM and post a POR. I want to do the EDI mapping for this XML message,
    but there is no message type and idoc type in SRM for Purchase Order
    response. How do I map my message type in SRM to the vendor sent fields
    in middleware .
    Please advise
    Rgds
    Sumendra

    Hi,
    You can process with XML without IDoc.
    Vendor->  (XML) -> PI -> (XML) -> SRM.
    Please check PurchaseOrderConfirmation_In in namespace "http://sap.com/xi/SRM/Procurement/Global".
    http://esworkplace.sap.com
    Regards,
    Masa

  • Error handling using fault message type in outbound synchronous ABAP proxy

    Hi,
    We've a scenario, outbound synchronous ABAP proxy to synchronous SOAP receiver. The requirement is to send multiple records in a single rquest and get response for all the records sent (in the same response message).
    Say if I send 10 records from ECC, I should get 10 records as response from SOAP to ECC. But the problem here is, there could be some invalid requests, for which an invalid error status code should be sent as part of response.
    Source Structure
    Req_Proxy
        req (0..unbounded, string)
    Response Structure
    Resp_SOAP
      Resp (0..Unbounded)
           respString (0..1, String) (carries the actaul response message)
          status code (0..1, String) (carries the status of the response, for ex, 001 (successful), 002 (error))
    And now we are planning to make use of Fault Message Type, to track the errors from SOAP (status code 002). But, we are not sure on how to track this for all the requested records. Is it possible to track the errors for all the requested records in a singe call using fault message type? For eg if 8 records are successful and 2 are invalid, then we should get 10 records in response 8 for valid and 2 for invalid accordingly.
    Please calrify.
    Thanks.
    Rohit

    For eg if 8 records are successful and 2 are invalid, then we should get 10 records in response 8
    for valid and 2 for invalid accordingly.
    Check if you can modify the WSDL structure to include an error node that would get populated incase of invalid entries....this would mean that you get the success and failure details in the single message....also at the proxy-end make the necessary change in your DT.....may be then you do not need to use the fault message...
    Regards,
    Abhishek.

  • 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

  • Handle multiple xml files as input?

    I have a java parser which uses JDOM and translates xml file to a flat file. Currently it handles one file at a time. I want to handle if there are multiple such files. Have anyone of you encountered that?
    Could you please help? Thanks.....

    How about multiple xml files as argument and let your Java class handle them one by one?
    Or probably even better: it should be possible to get all the names of the xml files in a directory and let you class handle those one by one. Like this you don't need the arguments and just process all the xml files in maybe a dedicated directory.
    Kind regards,
    Hans.

  • How to pass values to XML complex type of a Webservice using PL/SQL

    HI,
    I need to call a web service from PL/SQL that has an complex type element. That complex type element has 4 child elements each of integer type.
    I want to pass values for this complex type using SOAP_API.add_parameter but I can't understand how to pass the values.
    <xsd:element name="getBestFit">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element maxOccurs="1" minOccurs="1" name="circleId" type="xsd:string"/>
                        <xsd:element maxOccurs="1" minOccurs="1" name="usage" type="Q1:UsageInfoType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    <complexType name="UsageInfoType">
         <sequence>
              <element maxOccurs="1" minOccurs="1" name="a1" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a2" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a3" type="int"/>
              <element maxOccurs="1" minOccurs="1" name="a4" type="int"/>
         </sequence>
    </complexType>
    Please help me in getting a solution here.
    Thanks in advance.

    Have you tried doing a google search on "SOAP_API.add_parameter" to see what comes back? I see a lot of hits come back so hopefully one of those will help you. I've never used soap_api as I used utl_http to make WS calls. This required me to build the SOAP message (aka XML of a specific nature) by hand and then pass it to the WS using utl_http. How this approach is done via SOAP_API, I can't say.

  • Not able to pass cyclic XML schema type to a webservice method

    I have a webservice method called getData(GetDataDocument
    gDoc).
    I constructed a request with object (which exactly satisfy
    the XML schema def) to call up the getData(). [From my java client
    also I did the same; but the java classes have been generated using
    apache's xmlBeans; this works fine with the same kind of request].
    But the soap request constructed from flex does not get
    generated with all the values that I set in the request object.
    On further observation, I found out that if the schema
    involves cyclic elements, the soap request is not getting
    constructed as desired.
    My schema def:
    <complexType name="PredicateBagType">
    <sequence>
    <choice>
    <element maxOccurs="unbounded" minOccurs="0"
    name="PredicateBag" type="tns:PredicateBagType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="BinaryPredicate" type="tns:BinaryPredicateType"/>
    <element maxOccurs="unbounded" minOccurs="0"
    name="UnaryPredicate" type="tns:UnaryPredicateType"/>
    </choice>
    </sequence>
    <attribute name="contextNode"
    type="tns:contextNodeIDType"/>
    <attribute default="false" name="negate"
    type="boolean"/>
    <attribute name="type"
    type="tns:PredicateBagTypeType"/>
    </complexType>
    Note that the PredicateBagType may contain another
    PredicateBagType.
    I have constructed my request with objects in my flex
    application . Though I have set the BinaryPredicate object in my
    PredicateBag object, the soap request constructed looks like this
    which is not desired
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="1" negate="false"
    type="AND"/>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>.
    If I comment out the PredicateBagType choice in my xsd, the
    flex application constructs the soap request looks like this.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Body>
    <tns:get_Data maxPrograms="0" personalInfoUse="false"
    xmlns:tns="urn:tva:transport:2005">
    <tns:QueryConstraints>
    <tns:PredicateBag contextNode="ProgramInformation"
    negate="false" type="AND">
    <tns:BinaryPredicate fieldID="Genre" fieldValue="Fiction"
    test="contains"/>
    </tns:PredicateBag>
    </tns:QueryConstraints>
    <tns:RequestedTables>
    <tns:Table type="ProgramInformationTable"/>
    </tns:RequestedTables>
    </tns:get_Data>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    This request holds good. But I cannot comment out the
    PredicateBagType from my choice. Is this an issue with soap request
    construction issue in Flex..?

    Yes, <choice> is just "partial" supported in Flex 2 .
    read this
    link
    for partial and not supported tags
    Partially supported XML Schema structures
    The following XML Schema structures or structure attributes
    are only partially implemented in this release:
    <choice>
    <all>
    <union>
    regards
    kcell

  • How to handle multiple xmls(schemas) using java

    Can anyone give me solution for the below issue.
    We are handling five types of xmls(five different xsds) in our application.We have the XML and its XSD in database. Currently we are using JAXB to create and update the xmls.
    In future there is a chance to add new schema. In that case our current code will not work (because the JAXB is tightly coupled with the xsds) for new schema. Is there any technology or method to handle this situvation?
    I am looking for early respons.
    Thanks
    Dhans

    You have no idea? Then look in your JavaMail download and you will find several sample programs that you can use to get started. It would also help to read the JavaMail FAQ (Google will find it easily for you).

  • Exception handling with fault message type not working

    Hi,
    I have a sync proxy to proxy scenario and I have created a fault MT and specified in the outbound and Inbound service interface...
    *In Inbound proxy I have the following code--*......
    RAISE EXCEPTION TYPE z_cx_test_fault
    EXPORTING
    standard = l_standard_data.
    In the sender side abap code which calls the outbound proxy I have the follwing code -
    CATCH cx_ai_system_fault INTO lo_cx_ai_system_fault.
    txt = lo_cx_ai_system_fault->get_text( ).
    WRITE txt.
    CATCH z_cx_test_fault INTO lo_cx_test_fault.
    txt = lo_cx_standard_message_fault->get_text( ).
    WRITE txt.
    CATCH cx_ai_application_fault INTO lo_cx_ai_application_fault.
    txt = lo_cx_ai_application_fault->get_text( ).
    WRITE txt.
    when i test the inbound proxy separately I get the custom fault message properly...
    however when i run the proxy to proxy sync scenario and the custom exceptionz_cx_test_fault  is raised inside the receiver proxy .......control goes to CATCH cx_ai_application_fault    and not CATCH  z_cx_test_fault .
    I understand that cx_ai_application_fault is the super class of all the exception class but why does control go to its exception handling when a custom exception is raised...
    Edited by: hema T on Feb 26, 2012 1:16 PM
    Edited by: hema T on Feb 26, 2012 1:17 PM

    Hi
    I tried changing the sequence also but it did not work...
    I can see an appropriate response coming from the receiver in SXMB_MONI of PI...this response has the "fault response "
    "fault detail" data that I want.....however when the control goes to the sender why does it go to CATCH CX_AI_APPLICATION_FAULT and not not my CATCH z_cx_test_fault .
    My observation - If I change the scenario to SOAP to Proxy sync..then the sender SOAP client gets the appropriate custom fault message back.
    Edited by: hema T on Feb 27, 2012 1:17 PM
    Edited by: hema T on Feb 27, 2012 1:17 PM

  • BPM scenario:single sender message type and multiple receiver message types

    Hi,
    I am doing a scenario in which i have a single file which may contain different record types say type A,B,C.
    I want to separate all records of type A, all records of type B, also all records of type C into different files.
    so i will have 3 files of type record A,B,C in destination.
    I am using File adapter on both sides.
    I think one way may be using ccBPM.Can you please inform me how to achieve it using BPM.
    If there is any other way Please mention.

    You can use multimapping (with or without BPM)
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible ....without BPM
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure ....with BPM...is it that you will always get three output files?

  • How/ Where to Monitor XML Messages of  Provider Webservice ?

    Dear SDNers,
    I would like to Monitor XML Messages for Provider Webservice.
    I would like to tell upfront that SXM_MONI or SXI_MONITOR in ABAP Stack does not show any Messages.
    I have used SOAMANAGER which is the normal Transaction related to doing all things with Webservices. Even here i have found anything Messages.
    I could only see Success Messages under Webservice Logs(Webservice Logging and Tracing).
    Would like to know how/ where to do i monitor XML Messages for a Provider Webservice ?
    The Search around several places could not yield much to me about this Mointoring of Webservices.
    A lot of documents talk about Service Provision/ Consumption, Registry, WS-RM etc. but nowhere i could encounter about Monitoring of Webservices.
    So the normal links to Webservices documents where documents/ links describe about Service Provision/ Consumption, Registry, WS-RM, Protocols, Security, Transports etc. will not be of much HELP to me here.
    Thanks & Regards
    Venugopal

    Hi Nick,
    There is no big difference between synchronous interface monitoring and asynchronous interface monitoring.
    Just goto SXMB_MONI, click on inbound message, it will automatically displaying one tab with name response message. Click on that response message to view the message content.
    In PI7.1 you can see response message and reqquest message in RWB. Open the message by click on that, it will automatically dispay request and response messages
    thanks,
    madhu

  • Best JMS Message Type for XML

              Which type of message is most suitable for XML file transfer? and why?
              what parameters decide the selection of message type for xml payload?
              

    "dyn" <[email protected]> wrote in message
              news:[email protected]..
              >
              > Which type of message is most suitable for XML file transfer? and why?
              > what parameters decide the selection of message type for xml payload?
              You can use WebLogic's XML message type if you like. If you want to use
              selector expressions then it is particularly useful, especially since your
              selector expressions can run on the body of the message. However, the
              implications of this are that the selectors are more expensive (both in
              terms of the processing needed to evaluate the XPath expression, and in
              terms of the fact that the message bodies have to be in memory to do the
              evaluation).
              If you just want to transfer XML, then why not use a simple text message
              type.
              Use whatever suits your needs.
              Regards,
              Jon
              

Maybe you are looking for

  • Getting Error in Windows 8.1 XAML code when using Microsoft.PlayerFramework

    Error Is: The specified value cannot be assigned to the collection. the following type was expected UIelement xmlns:player="using:Microsoft.PlayerFramework" <Border x:Name="Border" DataContext="{TemplateBinding ViewModel}"> <Border.Resources> <player

  • Toshiba 32 inch Insignia Sound Bar

    Recently I purchased a Toshiba TV, after discovering it only had a strange looking "optical audio output" plug. I realized that traditional hook-up to a sound bar with "RCA" jacks would be impossible without a converter.  I would like for someone  to

  • Mail Service Activation

    Hi Experts, What are the service and jar files required to run mail service application. I deployed one application but mailing is not working.. What are codes required to do so????.... Please share some links. Thanks Nitu

  • Strange trash that wont go away...

    I've tried several things but dont understand why I keep getting this trash showing up. Even if all I do is restart the computer, I still shows up again. I've repaired permissions, repaired the disk drive... still shows up. the file is labeled ␀␀␀õ␀␀

  • My MacBook pro will not load past the grey screen with the spinning wheel. What do I do?

    My MacBook will not load past the grey screen with the spinning wheel of death. Anyone have any solutions?