How to update data from a web service

Hi all,
I have a webservice that returns some data as e4x type. I
pull the data i need and put it into an object. I manipulate that
data, then I want to write it back with another webservice. I get
serialization errors when I call the update method. I must be doing
something wrong here. Can anyone help?
Webservice Methods:
<mx:operation name="FetchfrmContact" resultFormat="e4x"
result = "fetchfrmContactResultHandler()">
<mx:request/>
</mx:operation>
<mx:operation name="updatefrmContactCampaigns"
resultFormat="e4x"
result="updatefrmContactCampaignsResultHandler()">
<mx:request/>
</mx:operation>
Below is what .lastResult looks like from the fetch method of
the webservice. I update the different campaign fields by adding or
removing them in an object called contactData.
<FetchfrmContactResponse xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:DefaultNamespace" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<FetchfrmContactReturn>
<campaignsOptedOut>
"BP - 411"
</campaignsOptedOut>
<campaignsOptedOut>
"200700 - Avnet Leads"
</campaignsOptedOut>
<campaignsOptedOut>
"200700 - BP-AdHoc"
</campaignsOptedOut>
<campaignsReceived>
"BP - 411"
</campaignsReceived>
<campaignsSubscribed>
"200700 - Avnet Leads"
</campaignsSubscribed>
<campaignsSubscribed>
"200700 - BP-AdHoc"
</campaignsSubscribed>
<campaignsSubscribed>
"200700 - BP - BCS"
</campaignsSubscribed>
<campaignsSubscribed>
"200700 - BP - Extracomm"
</campaignsSubscribed>
<campaignsSubscribed>
"200700 - BP - IBM"
</campaignsSubscribed>
<campaignsSubscribed>
"BP - 411"
</campaignsSubscribed>
<companyDocID>
"CMDPDN-65HTAK"
</companyDocID>
<companyName>
"Provena Hospitals"
</companyName>
<contactDocID>
"CTGSCG-6AHLWW"
</contactDocID>
<contactEmail>
"[email protected]"
</contactEmail>
<contactFirst>
"Steve"
</contactFirst>
<contactLast>
"Rieger"
</contactLast>
<docID xsi:nil="true"/>
<fetchBy>
"email"
</fetchBy>
<form xsi:nil="true"/>
<locationDocID/>
</FetchfrmContactReturn>
</FetchfrmContactResponse>
The fetch method returns an object of type FrmContactType and
the update method takes an object of type FrmContactType as it's
parameter
package com.psc.components
import mx.collections.ArrayCollection;
import mx.collections.XMLListCollection;
[Bindable]
public class FrmContactType
// field variables
public var contactDocID : String;
public var companyDocID : String;
public var locationDocID : String;
public var campaignsOptedOut : XMLListCollection; //
SFProfileField_70
public var campaignsReceived : XMLListCollection; //
SFProfileField_68
public var campaignsSubscribed : XMLListCollection; //
SFProfileField_69
public var contactEmail : String = "";
public var fetchBy : String;
public var docID : String;
public var form : String;
public var contactFirst : String = "";
public var contactLast : String = "";
public var companyName : String = "";
Here is the result handler of the fetch method
private function fetchfrmContactResultHandler() : void
contactData.contactFirst =
wsfrmContactLookup.FetchfrmContact.lastResult..contactFirst;
contactData.contactLast =
wsfrmContactLookup.FetchfrmContact.lastResult..contactLast;
contactData.companyName =
wsfrmContactLookup.FetchfrmContact.lastResult..companyName;
contactData.contactDocID =
wsfrmContactLookup.FetchfrmContact.lastResult..contactDocID;
if( wsfrmContactLookup.FetchfrmContact.lastResult )
contactData.campaignsReceived = new XMLListCollection(
wsfrmContactLookup.FetchfrmContact.lastResult..campaignsReceived );
contactData.campaignsSubscribed = new XMLListCollection(
wsfrmContactLookup.FetchfrmContact.lastResult..campaignsSubscribed
contactData.campaignsOptedOut = new XMLListCollection(
wsfrmContactLookup.FetchfrmContact.lastResult..campaignsOptedOut );
if( contactData.campaignsSubscribed.length > 0 )
for( var index : int = 0; index <
checkBoxSubscribed.length; index++ )
checkBoxSubscribed[index].selected = true;
if( contactData.campaignsOptedOut.length > 0 )
for( index = 0; index < checkBoxOptedOut.length; index++
checkBoxOptedOut[index].selected = true;
In my code I update the contactData object, then call the
update method passing contactData as it's parameter and it barks at
me. Any ideas why I'd be getting the error message shown below?
<soapenv:Fault xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<faultcode>
"soapenv:Server.generalException"
</faultcode>
<faultstring>
"org.xml.sax.SAXException: SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize."
</faultstring>
<detail/>
</soapenv:Fault>

Hi,
just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
Frank

Similar Messages

  • How to retrieve data from a web service

    Hi
    i am at very beginner level about web services.
    I am searching for a simple example of retrieving data from a web services, but cant find.
    How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
    Can somebody point out or give an example?
    Thanks in advance

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • How to create XML data source/ and load data from a web service to BI

    All,
    I m trying to find a 'how to' document (or any document) that shows how to create an XML data source to load data directly from a web service or from an XML file.
    I appreciate any help.

    Hi Mike,
    Two more for you:----
    /thread/111488 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/e6/1dd53bb90cbb1ae10000000a11402f/content.htm
    Regards,
    Suman

  • Get xml data from a web service into Forms?

    Hello folks! I am reading active directory info from a web service into forms via imported java classes. I can read from functions that return strings just fine, but I have to get the output from getGroupUsers which returns an XmlDataDocument. How do I read this in and parse it in Forms?
    I will be grateful if y'all could point me to an example.
    Thank you,
    Gary
    P.S. Here is a snippet of how I get the full name by passing an ID:
    DECLARE
    jo ora_java.jobject;
    rv varchar2(100);
    BEGIN
    jo := ADSoapClient.new;
    rv := ADSoapClient.getUserName(jo, 'user_ID');
    :block3.fullname := rv;

    Hello,
    Since you are already dealing with server-side JAVA, I would suggest you create a method that would do the parsing server-side and what your PL/SQL will be dealing with is just the return string.
    Here is a method I use to read an XML file (actually, it is an Oracle Reports file converted to XML) and from the string version, I will do search, replace and other things.
    So, from getGroupUsers which returns an XmlDataDocument, you can adapt this method to get your data server-side and let the form module read the output data.
    <blockquote>
    private String processFileXml(String fileName, int iFile) throws ParserConfigurationException, SAXException,
    IOException, XPathExpressionException{
    try{                
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    domFactory.setNamespaceAware(true);
    InputStream inputStream = new FileInputStream(new File(fileName));
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document doc = builder.parse(inputStream);
    StringWriter stw = new StringWriter();
    Transformer serializer = TransformerFactory.newInstance().newTransformer();
    serializer.transform(new DOMSource(doc), new StreamResult(stw));
    return stw.toString();
    catch (Exception e){
    System.err.println(e);
    System.exit(0);
    return "OK";
    </blockquote>
    Let me know if this is of nay help.
    Thanks.

  • Retrieve data from a web service.

    Hi,
    I need to retrieve the data from Oracle CRM On Demand therefore I downloaded the web service "CustomObject15" from Oracle CRM On Demand then used the netbeans Tool to generate XML files then call Web Service "CustomObject15" then I created small java code to retrieve the data through a web service but the data did not retrieved.
    Only retrieved "CustomObject15Data.CustomObject15Data@1be0799a"
    Kindly, Can you help me and provide me small java code to the data through a web service "CustomObject15".
    Best Regards.

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • How to send data from a web dypro application using workflow

    Hi All,
    I am working on a web dynpro application where the user will enter the header and item details for a FI document to be posted. Once the user enters the data the workflow should initiate and should also send the data across to the approver to approve. To initiate the workflow I am using the function module 'SAP_WAPI_START_WORKFLOW' and it's working fine and generating a uniquw workflow item id. Now my main concern is how to send the data across from web dynpro application through the workflow. I have my data in three internal tables: 1. header table. 2. G/L table and 3. Currency table, I am capturing all this data from the web dypro screen entered by the user. Right now I have the following code in my web dypro application.
    METHOD execute_bapi_acc_document_post .
      DATA: return TYPE TABLE OF bapiret2.
      DATA: wa_return LIKE LINE OF return.
      DATA lo_bapi_acc_document_po TYPE REF TO if_wd_context_node.
      DATA lo_changing TYPE REF TO if_wd_context_node.
      DATA lo_accountgl TYPE REF TO if_wd_context_node.
      DATA lo_currencyamount TYPE REF TO if_wd_context_node.
      DATA lo_importing TYPE REF TO if_wd_context_node.
      DATA lo_documentheader TYPE REF TO if_wd_context_node.
      DATA lo_element TYPE REF TO if_wd_context_element.
      DATA lt_elements TYPE wdr_context_element_set.
      DATA ls_c_documentheader TYPE if_componentcontroller=>element_documentheader.
      DATA lt_c_accountgl TYPE if_componentcontroller=>elements_accountgl.
      DATA ls_c_accountgl LIKE LINE OF lt_c_accountgl.
      DATA lt_c_accountgl_cp TYPE if_componentcontroller=>elements_accountgl.
      DATA lt_c_currencyamount TYPE if_componentcontroller=>elements_currencyamount.
      DATA ls_c_currencyamount LIKE LINE OF lt_c_currencyamount.
      DATA lt_c_currencyamount_cp TYPE if_componentcontroller=>elements_currencyamount.
      DATA wa_c_currencyamount type bapiaccr09.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
      EXPORTING
        TASK                      = 'TSXXXXXXXXXX'            
       USER                      = sy-uname
    IMPORTING
       RETURN_CODE               = L_RETURN_CODE
       WORKITEM_ID               = LV_WIID
    TABLES
    *   INPUT_CONTAINER           = lt_input_container
       MESSAGE_LINES             = lt_message_lines
       AGENTS                    = ls_agents
      lo_bapi_acc_document_po = wd_context->get_child_node( wd_this->wdctx_bapi_acc_document_po ).
      lo_changing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_changing ).
      lo_accountgl = lo_changing->get_child_node( wd_this->wdctx_accountgl ).
      lo_currencyamount = lo_changing->get_child_node( wd_this->wdctx_currencyamount ).
      lo_importing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_importing ).
      lo_documentheader = lo_importing->get_child_node( wd_this->wdctx_documentheader ).
      lo_element = lo_documentheader->get_element( ).
      lo_element->get_static_attributes(
        IMPORTING static_attributes = ls_c_documentheader ).
      lt_elements = lo_accountgl->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_accountgl ).
        INSERT ls_c_accountgl INTO TABLE lt_c_accountgl[].
      ENDLOOP.
      lt_c_accountgl_cp = lt_c_accountgl[].
      lt_elements = lo_currencyamount->get_elements( ).
      LOOP AT lt_elements[] INTO lo_element.
        lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_currencyamount ).
        INSERT ls_c_currencyamount INTO TABLE lt_c_currencyamount[].
      ENDLOOP.
      lt_c_currencyamount_cp = lt_c_currencyamount[].
      READ TABLE lt_c_currencyamount INTO ls_c_currencyamount INDEX 2.
      ls_c_currencyamount-amt_doccur = ls_c_currencyamount-amt_doccur * '-1.0000'.
      MODIFY lt_c_currencyamount FROM ls_c_currencyamount INDEX 2.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader = ls_c_documentheader
        TABLES
          accountgl      = lt_c_accountgl
          currencyamount = lt_c_currencyamount
          return         = return.
    ENDMETHOD.
    Please suggest.
    Thanks,
    Rajat
    I am not sure if this falls in webdynpro or workflow threads.. so I am posting it here also
    Edited by: rajatg on Jun 23, 2010 9:28 PM

    Dear Colleague,
    You have different method to send parameters to Workflow.
    1. Method
    Container Set Element
    DEFINE SWC_SET_ELEMENT.
      CALL FUNCTION 'SWC_ELEMENT_SET'
        EXPORTING
          ELEMENT   = &2
          FIELD     = &3
        TABLES
          CONTAINER = &1
        EXCEPTIONS
          OTHERS    = 1.
    END-OF-DEFINITION.
    Set the data into Workflow container
        SWC_SET_ELEMENT IT_CONTAINER 'parameter1' lv_parameter1.
    Start the Workflow
        CALL FUNCTION 'EWW_WORKFLOW_START'
          EXPORTING
            X_TASK          = 'WS90000001'   " your wf
          IMPORTING
            Y_WORKFLOW_ID   = WF_ID " your workitem id
          TABLES
            X_CONTAINER     = IT_CONTAINER
          EXCEPTIONS
            INVALID_TASK    = 1
            NO_ACTIVE_PLVAR = 2
            START_FAILED    = 3
            GENERAL_ERROR   = 4
            OTHERS          = 5.
    2. Method,
    You can also add your parameters direly to a container,
      DATA: lt_simple_container TYPE TABLE OF swr_cont,
            ls_simple_container TYPE swr_cont.
      ls_simple_container-element = 'parameter1'.
      ls_simple_container-value = lv_parameter1.
      APPEND ls_simple_container TO lt_simple_container.
      CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
        EXPORTING
          workitem_id      = WF_ID " your workitem id
          do_commit        = 'X'
        TABLES
          simple_container = lt_simple_container.
    Bulent.

  • Converting string data from a web service respons into XML structure of XI

    Hi,
    We receive a string structure from a web service.
    The string structure has an xml type format, that is all the tags and its content are in one line .
    The WSDL file of the webservice defines its response structure as a string type.
    How do i convert this string into proper XML structure (predefined by me in Integration repository).
    OR how do i make XI understand this string as an XML structure for further processing.
    Later i have to map this XML message type into IDoc.
    Himani

    Hi Himani,
    Please find the code for ur requirement -
    String need to parse -<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>
    Below mentioned code will convert it to -<MT_DATA><FROMDATE>20080202</FROMDATE><TODATE>20080101</TODATE></MT_DATA>
    Create a Message type and map it like this using java mapping ( no need to use Graphical mapping).
    Use MT_DATA as source and map it to your target structure .
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class XMLParser {
         private Map param = null;
         public static void main(String[] args) {
              try {
                   XMLParser wdb = new XMLParser();
                   wdb.parse();
              } catch (Exception e) {
                   e.printStackTrace();
         public void setParameter(Map param) {
              this.param = param;
              if (param == null) {
                   this.param = new HashMap();
         public void parse() {
              String document = "<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>";
              try {
                   Document sdoc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   // Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   sdoc = db.parse(new InputSource(new StringReader(document)));
                   Element docEle = sdoc.getDocumentElement();
                   NodeList nl = docEle.getElementsByTagName("from_date");
                   Element lstElmnt = (Element) nl.item(0);
                   NodeList nl1 = docEle.getElementsByTagName("to_date");
                   Element fstElmnt = (Element) nl1.item(0);
                   System.out.println(fstElmnt.getFirstChild().getNodeValue());
                   System.out.println(lstElmnt.getFirstChild().getNodeValue());
                   Document tdoc = db.newDocument();
                   Element structure = createElement("MT_DATA", null, tdoc);
                   tdoc.appendChild(structure);
                   Element statement = createElement("FROMDATE", fstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement);
                   Element statement2 = createElement("TODATE", lstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement2);
                   System.out.println("Struct is :::"+tdoc.getDocumentElement().toString());               
              } catch (DOMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }  catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SAXException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (TransformerFactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static Element createElement(String elementName, String content,
                   Document document) {
              Element returnElement;
              returnElement = document.createElement(elementName);
              if (content != null) {
                   Text T = document.createTextNode(content);
                   returnElement.appendChild(T);
              return returnElement;
         static Element createElement(String elementName, String content,
                   String attributeName, String attributeValue, Document document) {
              Element returnElement = createElement(elementName, content, document);
              returnElement.setAttribute(attributeName, attributeValue);
              return returnElement;
    Regards,
    Kishore

  • How to show data from one web site to other web site having diffrent domain.

    Dear all,
             i want to show the selected data from one web site to other web site.
    the location of the two web site is geographically seprated (and diffrent domain)
    Please tel me in how many ways it can be accomplished.
    If it can be done using jquery then please tel me the function or procedure to do it.
    Note: ( i have seen the above behavior in many web sites .
    like, i was purchasing some thing but finally declined,
    after that i visited some other web sites to gets some other data on other area
    , and i show my selected items of the first web site  on second website as advertisement.)
    i would like to know how these things are accomplished and how it can be done in asp.net.
    yours sincerely

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about ASP.NET website programming, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Loading data from a web service to BW

    Hi
    I have a web service from a company we work with,
    It looks like http://xxxx.info/CustomerMissions.asmx
    I want to take the data that the web service returns and upload it into SAP BW.
    We are in BW 70105.
    I've read about the soamanager transaction and I want to know if that's the way to go.
    I've managed to run the transaction and started configuring it, but I couldn't find a good guide.
    Any suggestions?
    Shlomi

    Hi Sholmi,
    Have a look at this link.
    [http://www.****************/Tutorials/BI/WebService/Index.htm]
    Thanks,
    Vishall.

  • How to retrieve data from a web page through php scripts..........

    kindly suggest me the php parsing script so that i can fetch the data from a web page.....
    suppose we have a url.........
    http://abc.com/news/companydetails.aspx?sskicode=x&Exchange=y
    and the page contains the various fields.........like
    xyz 10
    xyz1 20
    xyz2 30 etc...
    then we have to retrive data from this page trough php script and insert it into database.....
    value of xyz , xyz1 n xyz2 should be retrived and further inserted into database.......
    thanx ......

    Should be nice..
    But its not working i think..

  • BODI: How to extract data from a RESTful service

    Hi,
    Is there a way tot extract data from a REST service using Data Integrator (12.1.1.0)?
    I have to import data (in batch and with filters) from  several  webservices using  urls  like https://customer.productservice.net/connect/products.xml
    The service fills the xml file once you call the url.
    To calll the service, you need a username/password.
    Any ideas?
    Thanks!
    Robert.
    Edited by: Robert van den Berg on May 11, 2010 5:09 PM

    Hi,
      I got my answer, goto RS02 to create a datasource to link to this Infoset.

  • How to add "Prepare Data" from a web service to the form

    Hello,
    Can any one please advise on how to add the "Prepare Data" process from the existing web service and have the form to pre-populate the data from this "Prepare Data" process instead of using schema xsd. I heard that this is an alternative or may be a better way to pre-populate data in ES2/ES3 to avoiding creating a data source in Form Designer. I try to find a sample on Adobe site but could not find one, most of them are using schema.
    Any guidance or URL to the sample would be helpful.
    Thanks,
    HD

    Thanks

  • Error Updating Data using a Web Service from BPM

    Hi there,
    I'm trying to update data in an oracle database using a webservice created in DSP and get the following errors. It appears that BPM is unable to find a name, but I'm not sure what name this is referring to. The web service is straight forward and takes in the original and current objects as arguments. I can successfully call the query and insert web services and have double checked my code for the update web service but can't figure out why this is failing. Any idea on why this error might be occurring, or any pointers on what I need to be aware of?
    Caused by: Task '0' in activity '/PlanSubmittal#Default-1.0/Interactive[ViewEditPlan]' for instance '/PlanSubmittal#Default-1.0/1/0' could not be successfully executed. The task failed while executing method 'AddEditWell_Router'.
    Caused by: The method 'AddEditWell_Router' from class 'xobject.Fuego__AutoGen__Screenflows__.__EditPlan' could not be successfully executed.
    Caused by: Could not retrieve name
    fuego.web.exception.WapiTaskFailedException: Task failed.
    Thanks.
    Azeem.

    Hi,
    For the same 'omni portlet' tutorial I am stuck whiile using 'http://webservices.oracle.com/WeatherWS/WeatherWS?WSDL' the error
    'Failed to open specified URL. Check the following: is the URL is active; is there a valid proxy setting or, if HTTP authentication is required, check user name and password. [http://webservices.oracle.com/WeatherWS/WeatherWS?WSDL]'
    get dispalyed. Any quick pointers to resolve this please..
    Thanks,
    Kalyan.

  • XML data from a Web Service sometimes missing fields I need, any ideas on a trap?

    I get reports from our ERP via a web service to SSRS.  Just got asked to make a tweak in a report and find that the WebService only sends data that is needed for this transaction.  My issue is our entire system is based around EACH item we make. 
    New Trading Partner got Case Price.  We put two of our items together in a box for them is all that happened.
    Need to identify package column that had "ea" hard coded. 
    When I get a cs item there are more elements that identify conversion factor UOM etc.  They are only sent down for CASE items.  How do I trap for a column not being there 99.98555% of the time?
    _conv =  conversion factor.  I only receive it with a 2,4,6 in it whe4n the item is not an each. 
     =iif(Len(Fields!tcibd003_conv.Value) >0  , Fields!inh4470_qshp.Value / Fields!tcibd003_conv.Value , Fields!inh4470_qshp.Value  )
    How do I trap for this?  I tried Fields!tcibd003_conv.IsMissing but that didn't seem to work as expected.
    TIA

    Hello,
    Sorry, I cannot get your requirment and report design structure currently. Can you post the following information to us ? It is benefite us for further analysis.
    1. The fields in your dataset. You can post the dataset with sample data if it is convenient.
    2. The Report design structure: Table or Matrix and Group inforamation
    3. It seems that you want to filter the report data based on a expression, please post more details about the filter logic and expected result.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Showing data from a web service in a DataGrid

    My web service returns a complex XML document (ie. not a
    "flat" one). I'm able to consume the web service and create an
    XMLList and XMLListCollection based on the return value. If I make
    parts of the XML simple ("flat") I'm also able to bind values into
    a DataGrid row. However, I haven't succeeded in trying to display
    XML attribute values in this same DataGrid or values from elements
    in other XML branches of the XML.
    So, I have an XML structure
    <root>
    <element1>
    <se1>A</se1>
    <se2>B</se2>
    </element1>
    <element2>
    <se3 value="1"/>
    <se4 id="2">C</se4>
    </element2>
    </root>
    I can easily display (A,B) in a DataGrid, but how about (A,
    B, 1, 2, C) in a single row?
    I can find a bit similar examples in the internet, but for
    some reason I can't make it work. I'm using web services from
    ActionScript with a handler, I imported WSDL into the project, I
    don't have any MXML WebService components (would they make a
    difference?), I haven't specified E4X anywhere (should I ?). I can
    display single attribute values in a normal text field.
    Could someone please tell me the trick or point some
    directions to look at. Thanks.

    Hi Sholmi,
    Have a look at this link.
    [http://www.****************/Tutorials/BI/WebService/Index.htm]
    Thanks,
    Vishall.

Maybe you are looking for