How to get JSON item in web service workflow?

Im tried to get json item in workflow,But was unable to obtain "RtnCode",how to do it?
This my JSON,
"MerchantID": "1032017",
"RtnCode": "2",
"RtnMsg": "Get Succeeded",
My workflow :
Get RtnCodefrom
Variable: DealItems
Error code:
RequestorId: f85b0795-6682-fde7-0000-000000000000.
Details: An unhandled exception occurred during the execution of the workflow instance.
Exception details: System.InvalidOperationException: Looking up a value using a key is not supported on an instance of 'Microsoft.Activities.Dynamic.DynamicPrimitive'. at Microsoft.Activities.Dynamic.DynamicItem.TryGetValue(String key, DynamicItem&
value) at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj) at Microsoft.Activities.GetDynamicValueProperty`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance
instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity
GetDynamicValueProperty<String> Start Sequence Flowchart Sequence Pay.WorkflowXaml_07f732da_c82a_4234_abd5_34c32c637413

Hi Felaray,
I have a similar issue and what I tried to do is to install JSON.NET in my project and used the "Assign" activity (under "Primitives" category on the toolbox) to assign the string to an object:
Newtonsoft
.Json.JsonConvert.DeserializeObject(resultFromCustomActivity)
but unfortunately did not work. I am getting this exception:
Visual Studio 2013 Workflow: Failed to translate expression because of the following error: Translating the method or one of its overloads to an activity is not supported
If you cannot really change the source header, you might need to create a code custom activity and pass in your string and use JSON.NET, parse it and return what you want.
Another "easier" option might involve doing some nasty parsing (using the Assign Activity) by finding the index of your "RntCode:" and getting the next set of characters before the comma. Since the .NET classes to utilize are limited
it would be worth trying to use a RegEx
resultFromCustomActivity
.Substring(0,
10)

Similar Messages

  • How to get, handle and check web service response?

    Hello All!
    We test web services and try to use e-Tester for this.
    We have some problems with validation of service response. Maybe somebody can help or advice us?
    Service method returns the list of Cards (total is about 300 items) with attributes.
    Below is the sample of one card properties.
    - <Cards>
    - <UserCard>
    - <characteristics>
    - <item>
    <Name>ARM</Name>
    <Value>78</Value>
    </item>
    - <item>
    <Name>BAT</Name>
    <Value>40</Value>
    </item>
    - <item>
    <Name>SPD</Name>
    <Value>30</Value>
    </item>
    - <item>
    <Name>STR</Name>
    <Value>40</Value>
    </item>
    </characteristics>
    <ID>1</ID>
    <FirstName>A.J.</FirstName>
    <LastName>Burnett</LastName>
    <PlayerName>A.J. Burnett</PlayerName>
    - <Team>
    <Name>Blue Jays</Name>
    <City>Toronto</City>
    </Team>
    <cardid>1</cardid>
    - <Flags>
    <IsFavorite>false</IsFavorite>
    <IsForPosters>false</IsForPosters>
    <IsForTrade>false</IsForTrade>
    <IsToppCard>false</IsToppCard>
    </Flags>
    <Count>0</Count>
    </UserCard>
    + <UserCard>
    + <UserCard>
    + <UserCard>
    In one test case we need to check the state of Count property (0 or 1) for all cards, count the quantity of cards with Count=1 and check that it equals to 8.
    So the question is how to get the service request to the VBA for analyzing and verification?
    Thanks a lot!

    Have any other ideas?

  • How to get original message in web service implementation and proxy

    Hi,
    We have a java web service and its client (proxy) generated from WSDL by JDev wizards. All the parameters are mapped to classes, but we need a way to get the original message we send and receive in order to log it.
    Is there any way to get the SOAP message that is being sent/received?
    Thank you

    If you are using 10.1.3 or later releases, you can use the JAX-RPC handler to gain access to the message. Your SOAP payload can then been manipulated using the SAAJ APIs. You have also the option to log messages directly from OWSM.
    Best,
    -Eric

  • How to get a doc//literal web service with JWSDP1.3

    I can build a rpc/encoded service (based the tutorial),
    but I need a doc/literal.
    Because I have a J2ME client.
    How can I do it?
    thanks

    Do you want to see if Arun's white paper helps you? I checked and he talkks about this at the end of his first scenario, at https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario1.
    - eduard/o

  • How to get Purchase Order Number in a workflow

    Hi all,
    I am a new guy in workflow.
    I created one simple workflow - If purchase order is changed, then an email should be triggered.
    It is working fine.
    I want to add in the subject as well as in email text, the purchase order no which is changed.
    I tried to find this thing in existing threads.But m not able to find it.
    Please do the needful.
    Regards,
    Sunny

    Hi Sunny,
    You can pass the data to External User also..!!
    Sending Mail to Outlook : U need the Following things done for this:-
    1> Use the Mail Step in the WF and Choose the Receipient as the E-Mail Address and Give the E-Mail Address there.
    2> Check the Configurations that need to be done in Transaction SCOT. SMTP Server Settings are done to get the Desired Results
    To get Workitems in Outlook..!!.https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
    Problem in transferring the workitems into OUTLOOK
    /people/saujanya.gn/blog/2006/12/19/how-to-get-work-items-your-outlook-inbox
    Workflow Items in Outlook
    In the Mail Step Type - check the Binding of the WF Container with the Task Container.
    You have the ICON for Variable "Insert Expression" near the Subject line. Double Click that and you can find there your WF Container for the BO Used..Click on that and select the attribute that corresponds to the PO-Number. Copy paste the same in the Mesg Body also from there..
    Let me know if you still have any issues.
    Regards,
    Kanika

  • How to get Po item Delivery Date ?

    who can tell me how to get PO Item Delivery Date ?
    Thank You!

    hi
    good
    go through these links,hope these ll help you to solve your probelm
    http://web.mit.edu/sapr3/windocs/bpors03m.htm
    http://www.sap.com/southafrica/services/education/pdf/BPP.pdf
    thanks
    mrutyun^

  • How to install and consume GroupWise Web Service (SOAP)

    Hello! I'm Razvan, programmer from Romnia, and I am new to GroupWise development.
    I am asking if anyone could help me with a C# Visual Studio 2010 example of how to install and consume GroupWise Web Service (SOAP).
    The documentation from novell site didn't help me, i didn't understant much of it.
    All I need is either a link to a documented GroupWise C# developer step-by-step tutorial, or some code examples.
    Can you please show me some code examples in C# with:
    1)loging in using a username and a password,
    2)retrieving contact list,
    3)retrieving appointment list,
    4)sending a mail,
    5)setting an appointment
    I don't know how to use "groupwise.wsdl" and customise it so that it points to our GroupWise server.
    Please, I really need this because I am working at a project right now which involves GroupWise integration.
    I hope I haven't disturbed anyone with my simple question.
    I know this might be a very simple question given the complexity of the other posts here, but that's why I really hope I will get an answer soon.
    Thank you very much!
    Signature:
    How old is the Orthodox faith?
    How old is the orthodox faith?

    Just a comment.
    The value for the version element should be "1.02"
    not "1.2".
    Preston
    >>> On Tuesday, March 01, 2011 at 8:06 AM,
    TheRomanian<[email protected]> wrote:
    > I have great news! After strong documentation yesterday and today, I've
    > just made a successfull example that actually connects to our GroupWise
    > server.
    >
    > I made it in PHP.
    >
    > I need an ASP.NET + C# application, but now is very simple to convert
    > it. I post the PHP code here for other people who in future might be
    > interested in finding out.
    >
    > So a simple PHP GroupWise Login code using "groupwise.wsdl" web
    > service:
    >
    >
    > require_once('./GWService/GroupwiseService.php');
    > require_once('FB.class.php');
    >
    > $classmap = array(
    > 'Authenication' => 'Authenication',
    > 'PlainText' => 'PlainText',
    > 'loginRequest' => 'loginRequest',
    > 'loginResponse' => 'loginResponse',
    > 'logoutRequest' => 'logoutRequest',
    > 'logoutResponse' => 'logoutResponse',
    > 'UserInfo' => 'UserInfo',
    > );
    >
    > $gwservice = new GroupwiseService(
    > "./WSDL/groupwise.wsdl",
    > array(
    > "location" => "http://11.150.40.78:8756/soap",
    > *Your GroupWise server IP:
    > and PORT*
    > "classmap" => $classmap,
    > "trace" => true)
    > );
    >
    > // do login
    > $pt = new PlainText();
    > $pt‑>username = *"YOUR GROUPWISE USERNAME"*;
    > $pt‑>password = *"YOUR GROUPWISE PASSWORD"*;
    >
    > $lr = new loginRequest();
    > $lr‑>auth = $pt;
    > $lr‑>language = "en";
    > $lr‑>version = "1.2";
    > $lr‑>application = "phpClient";
    >
    > $lres = $gwservice‑>loginRequest($lr);
    > //print_r($lres);
    >
    >
    > I Hope this will help others.
    >
    > ‑‑
    > Signature:
    >
    > How old is the Orthodox Faith?
    > 'How old is the orthodox faith?'
    > (http://www.orthodoxphotos.com/history.shtml)

  • How to connect to database in web service??

    Hi all,
    How to connect to database in web service ? Can anyone give some advice what kind of database should i use? thanks

    No difference. Just connect as usual!
    Let me give you an example:
    Code to connect to postgresql db ...
    public Connection connectPostgresql(String servername, String dbname, String username, String password)
              Connection conn = null;
              try
                        // Load the JDBC driver
                        String driverName = "org.postgresql.Driver";
                        Class.forName(driverName);
                        // Create a connection to the database
                        String url = "jdbc:postgresql://" + servername +  "/" + dbname;
                        conn = DriverManager.getConnection(url, username, password);
                        return conn;               
              catch (ClassNotFoundException e)
                        // Could not find the database driver
                        return conn;
              catch (SQLException e)
                        // Could not connect to the database
                        return conn;
    }Code for an axis web service ...
    public Element[] updateProfile(Element[] params)
              String message = "";
              // get str 1
              Node node1 = params[0].getFirstChild();
              String str1= node1.getNodeValue();
              // get str 2
              Node node2 = params[1].getFirstChild();
              String str2= node2.getNodeValue();
              Connection conn = connectPostgresql ("localhost","myDatabase","myUsername","myPassword");
              // there is a method to insert these params to db
              boolean isInserted = insertParams(conn, str1, str2);
              if(isInserted )
                        message = "OK";
              else
                        message = "Not OK";
              // constructs an array of DOM Elements for message to send back to client
              SOAPBodyElement[] response = new SOAPBodyElement[1];
              response[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo", "e1", message));
              return response;
    }Gokce.

  • How to reject Line Items in a Service Contract?

    Hello friends,
    Can anyone help me understand how do we reject items in a Service Contract? I don't see any Reject field. Is it one of the Status I need to configure for Item Level Status Profile? Even if I add a 'Reject' status, how do I link it to Rejection Reason codes? (I know how to add Reason codes in customizing, but how they are linked to a Transaction type is something I am not finding...).
    Please provide any inputs.
    Thanks.

    HI Navaneethan,
    please try following code.
    make  PEKKO should be internal table with appropraite structure..
    Loop at ZBTXT.
          MOVE ZBTXT-LINE TO PEKKO-ZBTXT.
          append  PEKKO.
         clear  PEKKO.
    ENDLOOP.
    loop at pekko.
    write : / PEKKO-zbtxt.
    endloop.
    if above code is helpful, REWARD POINTS.
    Regards,
    Ranjith

  • How can I call a SAPME web service from MII such as PlaceFutureHold?

    Dears,
    How can I call a SAPME web service from MII such as PlaceFutureHold?
    By using MII, I would like to develop some logic to check some values which query from SAPME database, if the value is out of spec, it needs to send a emal to inform user ans also hold the SFC.
    Thanks!

    With Web service action block you can view all ME available services
    in I.E
    https://sapme:5000/manufacturing-services/ProductionServiceService?wsdl  you could see your FutureHold service
    To do that in MII, you need Web Service action block. Have you work with MII transaction before?
    (saw your post in MII)

  • How to get the version no. for service po?

    Hi,
    How to get the version no. for service po?For material po we are getting the version from EKKO-REVNO but for service po Ekko-revno is blank.
    Regards,
    Rachel.

    Hiee,
    It is not like service PO does not have revision.
    REVNO will only exists for any document if amendment is made after releasing it. If in EKKO for all service PO revision number is blank then test if version management is active for document type
    MM->Purchasing->Version management -> External documents
    Here check for your doc type and purchase org version management is active.
    Regs,
    Appie

  • How to get Contract Account Number in Service Ticket

    Hi Experts,
    How to get Contract account number in Service Ticket, we are working in ISU environment. when i create the service ticket the contract account number is there in Business agreement number field in service tiket.
    Can anyone tell me how to retrieve that field.
    Answer will be appreciated.
    Praveen

    check tables tfk_buag_ref and fkkvkp

  • Help me!    How to use it as a web service from third party application?

    After using JDeveloper to develop BSSV object e.g. JP550010, how to use it as a web service from third party application?
    TKS!

    Obviously the OP is working on a project for the Bead Society of Southeastern Virginia http://www.bssv.org. Oh, wait, maybe he's researching the Blueberry Shoestring Plant Virus http://abbreviations.yourdictionary.com/bssv
    :D
    John

  • How to get line item net price and net value?

    I have using "BAPI_SALESORDER_SIMULATE" to SIMULATE to create SO,
    the return table
    ORDER_ITEMS_OUT-NET_VALUE is not equals than created by VA01 .
    how to get line item net price and net value?

    Hi,
    Can u elaborate ur query ?
    By this FM you cannot create a SO . Use FM --> BAPI_SALESORDER_CREATEFROMDAT2
    Regards,
    MAdhukar Shetty

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

Maybe you are looking for

  • A view, function and TO_DATE causing an error.

    I have the following statement which calls a view, VW_DIST_RPT_WORK_LIST which in turn calls a function which returns either 'Null' or a date string e.g. '07 Oct 2003' as a VARCHAR2 (alias PROJECTED_DELIVERY_DATE). Statement: SELECT CUSTOMER_NAME, PR

  • Neet a Custom proposal Filename while using ALEWEB_DOWNLOAD

    Hello, we used over years the function ALEWEB_DOWNLOAD to send PDF, EXCEL, WORD content to the Frontend User for sevaral ITS Applications. This works fine and no problems occur. But now the customers do not like any more the given filename of ALEWEB_

  • Why are the folders within my Iphoto Library folder empty when I have 16000 photos in Iphoto.

    I discovered this when I went to move my Iphoto library to an external drive. Eventhough I have 1600 photos in Iphoto my Iphoto Library folder only contains 3.5MB and the Attachments, Masters, Previews and Thumbnails folders are empty. Therefore if I

  • Do LR 32 bits and 64 bits catalogues play nicely together?

    I am considering to upgrade my desktop computer to Vista 64 and LR 64, whilst my laptop will remain with XP 32 and LR 32. I have all my catalogues on portable drives so I can swap them between the desktop and the laptop without having to go through (

  • Scheduled activities

    Hai all, I've installed Oracle EBS 11.5.10.2 on win2k3.. so , in the new system , what are all the concurrent requests should run periodically.. what is the best practice ? can anyone refer any doc id's or some idea on that ? Thanks Yusuf