Regarding Rest Adapter

Hi,
We are using a rest proxy service,which can take both xml and Json as input and invoke  rest business services (using POST method ) and the rest business service also accepts input as both json and xml .
We are currently facing issues while converting from Json to XML and viceversa
Scenario1:When we pass the request as XML to the rest proxy service  and  the external target service accepts the request as Json.
In this scenario(XML to Json conversion ),the request is sent with the root element in xml and the root element is stripped off while sending the same request  to the target service.This conversion from xml to json is being internally done in OSB.
Example:
Request to rest Proxy service:
<employee>
<name>ABC</name>
<department>ASDF</department>
</employee>
When the same request is converted to Json internally in osb :
                    "name": "ABC",
                    "department": "ASDF"
But the target rest service  is expecting:
  "employee": {
    "name": "ABC",
    "department": "ASDF"
Scenario2: When we pass the request as Json  to the rest proxy service and the external target service accepts the request as xml.
In this scenario (Json to XML conversion),the request is sent with the root element in json and another root element is added after Json to XML conversion and this is sent to target service.
    "employee": {
                    "name": "ABC",
                    "department": "ASDF"         
<employee xmls="">
<employee>
<name>ABC</name>
<department>ASDF</department>
<employee/>
<employee/>
But the target service is expecting:
<employee>
  <name>ABC</name>
  <department>ASDF</department>
  </employee>
Can you please suggest us with any setting in osb rest adapter or wadl ,which we can use ,which can  ignore the root element while converting from JSon to XML and adds the root element when converting from XML to Json.
Regards,
Deepthi

This is common questione answered many time in SDN, please search before posting.
if you want to know about JMS Adapter read sap help documentation..
  The purpose of JMS Adapter is to connect MQ , sonic MQ systems... Suppose of your trying to conect to MQ System , you need to deploy the relevent jar files in PI using Visual Admin.
If you want to do sample scenarios you should have messaging system installed in landscape then only you can put or retrieve message from MQ or any messaging system.
Cheers,
Raj

Similar Messages

  • Difference between Standard PI 7.31 SP14 Rest adapter VS Advantco Rest Adapter

    Hi,
    I have a requirement which need to connect Restful webservices( JSon format). and my current version is on PI 7.31 SP11
    I have to chose the best options of REST adapter which is avialable in the market.
    So far I identifyed two options one is '3rd party Advantco REST adapter" and another one is 'Standard REST Adapter which is avilable from PI 7.31 SP14'
    If i chose standard REST adapter which is avilable on PI 7.31 SP14 then I only do 3 more SP version upgrade, if I chose 3rd Party Advantco REST adapter, for cost prospective I need to spend money.
    My question is here, which is the best option for Rest adapter requirements out of these options? Please suggest me.
    Thanks & Regards,
    Sateesh N

    Hi Heiko - There is no standard adapter available from SAP for invoking restfull services.
    Even the wiki which you are referring leads to advantco's REST adapter.
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/07/integrating-rest-services-on-pi
    There is a simillar adapter from Ka Te
    http://www.kate-group.com/portfolio/restful-adapter-for-sap-pi/
    Reference : https://scn.sap.com/thread/3518130

  • SOA 12.1.3: REST Adapter generates run time "unknown media type" Exception

    HI All,
    We are workig with a client who are looking to migrate from BPEL 10g to Oracle 12c. The current implementation integrates with a number of RESTFUL services via JAVA components that are invoked via BPEL. As part of the migration we are looking to migrate and simplify these with use of the new REST Adapters. The use case and issue is as follows:
    We have a client who exposes a REST service via the usual principles. This service is provided by a 3rd Party provider as an external service for out clients 3rd party application. The REST service provides a number of Resources and Operations (GET, PUT, DELETE) to manipluate and retrieve data as per the interface provided.
    Based on one of the Simple GET operations, we have attempted to create a new REST adapter based on the interface. The provider does not supply a WADL, hence the REST adapter has been generated by using the REST Adapter within JDeveloper and configuring the resources, operations and request/ response types as required. This generates the required WADL file (see attached).
    When testing the WADL via JDeveloper, the response is returned as expected. However when deploying this to SOA Suite 12.1.3, the adapter errors a runtime. The error that is encountered is as follows:
    <summary>oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: Unknown media type : application/atom+xml; charset=utf-8; type=feed</summary>
    When reviewing the HHTP response from the service through SOAP Ui I can see the content type is set to application/atom+xml.
    After reviewing the Oracle Documentation it does not seem to provide any insight into this issue or any possible reasons for its occurence.
    Has anyone had similar issues or provide any insight into this issue? It appears on face value the Adapters are not compatiable with this media type, which may prove to be a big limitation
    Regards Dave

    Hi Dave,
    REST Adapter in SOA 12.1.3 currently only supports the following media types...
    1. application/json
    2. application/xml
    3. application/www-form-urlencoded
    Since the service you are calling is using application/atom+xml, hence you are getting the error.
    Regards,
    Ankur

  • ADF mobile: how do I upload a file using the rest adapter api

    Hello,
    I want to upload files using the rest adapter. How would I upload files such as pdfs, images (png, jpg ..) etc.. Some code would be appreciated.
    Thanks,

    Thanks Frank,
    The back-end is functioning in the following way (using Jersey and handling input streams):
        @POST
        @Path("/uploadFile")
        @Consumes(MediaType.MULTIPART_FORM_DATA)
        public Response uploadFile(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail) {
            String uploadedFileLocation = "D:\\temp\\uploadsTest\\" + fileDetail.getFileName();
            // save it (this function reads from the input stream)
            writeToFile(uploadedInputStream, uploadedFileLocation);
            String output = "File uploaded to : " + uploadedFileLocation;
            return Response.status(200).entity(output).build();
         Is there a way to send data over a stream?
         Thanks,

  • Doubt regarding Sender adapter file content conversion to RFC

    Hi Experts,
    Below is the my Source and  Target XML structure ( i have creaated source structure same as target RFC structure),  This scenario is working fine when i give XML file as input. File -> XI -> RFC , xml file is able to update the information in R3.
    How should i configure sender file adapter for file content conversion for above structure(in this case input is fixed lenth text), and i could able to change source structure according to our req, without changing target RFC strucuture.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
       <COMMIT_I>X</COMMIT_I>
       <IDENTIFICATION>
          <STUDENT>6500001191</STUDENT>
          <ID_TYPE>FS0030</ID_TYPE>
          <ID_NUMBER>testxml</ID_NUMBER>
          <VALID_FROM>20070421</VALID_FROM>
          <VALID_TO>20091231</VALID_TO>
       </IDENTIFICATION>
      </ns0:MT_HSA_IDNumber>
    I have configured sender file adapter with FCC like :
    Document name as: MT_HSA_IDNumber
    Document name space as: urn:passhe.com/UpdateIdNumberISA32
    Record structure as: COMMIT_I,1,IDENTIFICATION,1
    COMMIT_I.fieldNames : COMMIT_I
    COMMIT_I.fieldFixedlengths: 1
    IDENTIFICATION.fieldNames: STUDENT,ID_TYPE,ID_NUMBER,VALID_FROM,VALID_TO
    IDENTIFICATION.fieldFixedlengths: 12,6,60,8,8
    i am getting error like this: even when i change source structure like below metioned:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
       <COMMIT>
          <COMMIT_I>X</COMMIT_I>
       </COMMIT>
       <IDENTIFICATION>
          <STUDENT>6500001191</STUDENT>
          <ID_TYPE>FS0030</ID_TYPE>
          <ID_NUMBER>idnumber1</ID_NUMBER>
          <VALID_FROM>20070421</VALID_FROM>
          <VALID_TO>20091231</VALID_TO>
       </IDENTIFICATION>
    </ns0:MT_HSA_IDNumber>
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'COMMIT_I.fieldFixedLengths' or 'COMMIT_I.fieldSeparator' is missing Consistency check: no. of arguments in 'COMMIT_I.fieldFixedLength' does not match 'COMMIT_I.fieldNames' (0 <> 1)
    Please help me out
    thanks
    dhanush

    Hi Dhanush,
    Try giving the Sender FCC this way for the source structure you have mentioned above.
    Record structure as: COMMIT,1,IDENTIFICATION,1
    COMMIT.fieldNames : COMMIT_I
    COMMIT.fieldFixedlengths: 1
    Hope this helps.
    Thanks and Regards,
    Induja

  • Regarding File Adapter

    Hi All,
       How can I specify the source Directory in Sender File Adapter. I have given it as
    <hostname>\<directory>. I am getting the error
    <hostname>\<directory> does not exist in adapter status. The directory is shared and has all permissions.
    Help me solve my issue.
    Thanks & Regards,
    Jai Shankar.

    Hi,
    if you're using file system
    try logging on your XI server system and
    try if you can access
    <hostname>\<directory
    from <b>there </b>with this path
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Regarding FTP adapter issue

    Hi
    The below error i am getting using FTP adapter. After deploying the process only one time it is picking the file. But we are putting one more file in that directory it is not read the file.
    Regarding this cause we are getting the below error. So,any one know this error pls help me.
    <2010-08-16 16:34:19,523> <INFO> <default.collaxa.cube.activation>
    <File Adapter::Inbound> Recovery still not possible after 20 attempts due to ORABPEL-11000
    Invalid Activation parameter.
    Activation parameter Physical/Logical Directory has invalid value {u02/test/FTPgetfile}.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    <2010-08-16 16:34:21,194> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:21,194> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:21,194> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:21,194> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:24,519> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:24,519> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:34,418> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:34,418> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:44,113> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:44,113> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:45,175> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:45,175> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:47,126> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:47,126> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:47,126> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:47,126> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created
    <2010-08-16 16:34:53,809> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Managed Connection Created
    <2010-08-16 16:34:53,809> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Connection Created

    Maybe you know ftp error but i will post in here anyways.
    The 550 error is a message from the server stating that the account you have currently logged in as does not have permission to perform the action you are attempting. You may be trying to upload to the wrong directory or trying to delete a file
    I dont know exactly if it is a bug or a problem with permission on the ftp side. but i think that the folder that is containing the files, does not have permission to read (weird because you can retreive files). Also another problem is that the account does not have put priviliges and you are using it in another process to upload files.

  • Regarding JDBC Adapter in SAP XI

    Hi
    I have done one scenario in SAP XI using JDBC Lookup it is working fine thanks for all who were helped me ......
    I need a clarification on following
    What is
    Generic Lookup API
    Special Lookup API
    and while i am  configuring i have given
    Persistence : Local
    Confilct Resolution : Redo
    In what situation we will give  Presistence : Local and in what situation we will give Persistence : Database means i need to know where we will use LOCAL and where we will use DATABASE
    and what is the difference between REDO and ERROR...........?
    In Message Protocol we have two protocols
          XML SQL Format
          Native XML Format
    what is the difference between these two
    I have gone through some blogs which i got in my previous posts but i am not able to understand clearly..... can any one clarify my doubts please........?
    Best Regards
    Ravi Shanakar B

    Generic Lookup API
    In the case of generic access, before executing the lookup, developers first need to both build the payload that the adapter expects and parse the result payload themselves.
    To access an application system generically, developers use the SystemAccessor class. For generic calls, developers of a method must pass a stream with the payload, which is then sent to the adapter. The result of the call is a payload object, which you can use to both read the payload as a stream and parse the payload.
    The generic lookup API is part of the mapping API (see LookupService class in the Javadoc documentation). For more information about these APIs, see SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs
    You can obtain the schema to call an RFC by simply importing the RFC into the Integration Repository. (See Importing IDocs and RFCs.)
    Special Lookup API
    For access using the special lookup API, developers do not require any knowledge of the structure of the payload. Instead, they pass the API string commands that are to be executed in the application system called.
    Currently, there is one special lookup API for the JDBC adapter. To use this API, developers use the DataBaseAccessor class instead of the SystemAccessor class.
    The special lookup API is part of the mapping API (see the getDataBaseAccessor method of the LookupService class in the Javadoc documentation). For more information about these APIs, see SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs
    XML SQL Format
    Table values can be inserted, updated, or deleted in one or more tables. In the database, stored procedures can be called using transfer parameters. In the case of synchronous queries, results from database queries or return values of stored procedures can also be transferred.
    Native SQL String
    An arbitrary SQL statement is expected as the message content. This statement is transferred unaltered to the database for processing
    Please see the below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/406642ea59c753e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards
    Chilla..

  • Regarding seeburger adapter??

    Hello guys
    My client is going to implement EDI messages to SAP XI to SAP ERP .It would be great if you let me know the step by step proceedure ??
    wht is the use seeburger  BIC mapping tool here ??
    wht is the configuration should be done at sender side(seeburger as2) adapter??

    So this means your customer has purchased a Seeburger adapterlicense which will come with documentation for PI. Use that as first entry point. Such a general question you can not handle well in forum answer.
    General first hints:
    Seeburger delivers an EDI-adapter which will be deployed into PI. This adapter contains functionality to map between XML and EDIfact format. It also contains (normally) some standard mappings (e.g. for invoice). But be VERY careful with these standard mappings. Not all of them can be used without change. Make detailed tests and do not rely on them.
    The BIC mapping designer is not used in PI, but you can see it as a kind of external development or debugging tool in case of problems. You will surely use it, because there are many pitfalls regarding EDIFact and XML/PI. The topic is quite complex.
    CSY

  • Queries regarding Database adapter ...

    Hello,
    I have a scenario where i need to query few tables which are not related to each other and i am having different queries for each table. I tried creating a single DB adapter and imported all the tables in it. But i got struck at two places where i was asked to define a root table and also to define a select query.
    I have following doubts reagrding this:
    1. Do i need to need create different DB adapter for each table?
    2. What is the significance of root db table?
    Regards
    Lokesh

    Yes, you would create 3 different partner links using the DB adapter.
    In theory yes you would create a new partner link using the DB adapter for each table that is unrelated. If you want to select PO_HEADERS_ALL and PO_LINES, this can be done in one call as they are related.
    This advice is based on the fact that you are selecting batch data, not single lines of data. If you are receiving 1 row from multiple unrelated table this could be achieved via a custome procedure / package. I don't want to steer you down the wrong path so I would need to know more of your use case. In most senerios in Oracle apps you are calling APIs / packages.
    If you could provide more information of your use case(s) I will try and provide better advice
    cheers
    James

  • Doubt Regarding IDoc Adapter

    Dear Gurus,
    In IDoc to XML conversion scenarios, we never use Sender Communication Channel because the IDoc adapter sits on the ABAP stack and the conversion is done by the IDoc adaper in the Integration Server.
    Then why in case of the reverse scenario , i.e. XML to IDoc conversion we use Receiver Communication channel and the IDoc adapeter explicitly? Why can't that IDoc Adpater that sits on the ABAP stack convert the xml file into IDoc format?

    Hi Shweta,
    the reason for this is:
    The adapter at the inbound channel is located before the Integration Server pipeline and calls this pipeline. The adapter at the outbound channel, however, is called by the pipeline, and can therefore be regarded as part of the pipeline.
    The connected systems transfer or receive IDocs through their IDoc RFC interface.
    if you check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/bdb13b00ae793be10000000a11402f/frameset.htm
    and read the Integration section and try to understand the pipeline flow, as the names are not understandable(viz. receiver determintaion, mapping etc.) in the diagram.
    you will get the clarity after reading this..
    Sachin

  • Regarding RFC adapter

    Hi
        when we r using RFC adapter on sender side it asks fgor 'RFC  Program id' what we have to mention in it.
       Regards
      maheswararao

    Hi
    While creating the Communication channel using RFC adapter, you need to specify a Program ID , it can be any value. The same program ID u have to use when u are creating a RFC destination from your sender system to XI.
    With Regards
    K.Varadharajan
    Award points if it solves your problem

  • Regarding siebel adapter

    hi
      i am supposed to send a request from webdynpro using webservice,
      the back end is siebel where i am supposed to get the output as flatfile.
    can anyone help on this with a example
    regards
    Ramakrishna

    Hi,
    if you need a WS - file interface with XI you don't need any siebel adapter
    just search for SOAP blogs (sender) and file receiver
    and that's all
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Regarding HTTP adapter

    Hi ,
    Would you please tell me why we donot use Sender adapter for the messages which use HTTP protocol .

    Hi Anita,
    IDOC and HTTP adapters are sitting in the Integration Engine directly...No need to configure them...
    For HTTP sender..You can use HTTP client to send the messages to XI.
    Can u check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm
    Regards
    Sridhar

  • Regarding SOAP Adapter

    Hi All,
    Can anybody explain me about the SOAP adapter as when exactly SOAP adapter is used ??
    Its flow taking any sampel example .
    pls reply me ASAP .
    I have got a reqt to work on .
    pls mail me asap .

    HI,
    Apart from the above explination.
    See the below links for more details..
    SOAP Adapter
    Consuming XI Web Services using Web Dynpro – Part II-/people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    Consuming XI Web Services using Web Dynpro – Part I -/people/riyaz.sayyad/blog/2006/05/07/consuming-xi-web-services-using-web-dynpro-150-part-i
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0d7349b6-0901-0010-ddbe-ec43178a61ff
    /people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client
    /people/kevin.liu/blog/2006/04/12/wsdl-11-binding-extension-for-soap-12
    yes it will be possible, see below links
    /people/thomas.jung3/blog/2005/01/11/publishing-abap-webservices-to-an-external-uddi-server
    /people/sap.user72/blog/2005/11/17/xi-how-to-publish-wsdl-generated-from-xi-to-uddi
    /people/thomas.jung3/blog/2005/05/25/sap-teched-2005--shameless-plug
    Troubleshooting SOAP Message - XI - /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi
    Troubleshooting - RFC and SOAP scenarios-/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    Regards
    Chilla..

Maybe you are looking for

  • External HD connectivity

    So I've actually searched for similar posts, but I can't seem to get the answer I'm looking for. Sorry for a duplicate/similar post, but I really want to clarify my question before splurging money on a new external HD. So, does your external HD need

  • CRVS2010 Beta - How do you hide the Group Tree for Visual Studio 2010

    Would anyone know how to hide the group tree in the Crystal Reports viewer for Visual Studio 2010.  I have tried DisplayGroupTree="False" and found the property doesn't exist in the new version for VS 2010.  I have search in the designer options and

  • How to add directory in linux disk quotas?

    HiUnder Linux centos there is a disk quotas and i want to use this under this directory/var/www/html because i want to implement capacity restriction on a specific user account.here is my fstab content:/dev/mapper/vg_http-lv_root / ext4 usrquota,grpq

  • Will Firefox 4 be made available to Mac OSX 4.1

    I tried to download the newest version of Firefox only to find it is not compatible with MAC OSX 10.4. I also have read that you will discontinue the current version I have. Do you plan to lose all of us who have an earlier version of Mac? Make the n

  • What are these files? 5ffffffa900

    On my filesystem I have a directory off / called 5ffffffa900 with similarly named directories underneath that.