VBA Call WebServices: How to handle a returned empty complex array?

Hi,
    These days I got a task to call a web service by VBA in Excel, but faced the following two problems about empty complex array.
<b>1. When the returned value of a web service contains empty array, it crashed with "SoapMapper: array dimensions do not match definition"</b>
    Another guy faced the same question with me, detail at http://www.topxml.com/SOAPToolkit/rn-246726_SoapMapper-array-dimensions-do-not-match-definition.aspx
<b>2. When the input parameter contains empty array, it crashed with "Operation Not Supported"</b>
Dim arrayStudent() As Student
Call webservice.DoThings( arrayStudent )

Hello,
we have faced the same Problem in our PHP / Typo3 solution. We used this switch:
$object_array = array();
if (is_object($salesorders->SALES_ORDERS_HEAD->item)) {
     $object_array[] = $salesorders->SALES_ORDERS_HEAD->item;
} else {
     $object_array = $salesorders->SALES_ORDERS_HEAD->item;
Best regards
Gregor

Similar Messages

  • How to handle rebate returns

    hi,
    sap gurus,
    how to handle rebate returns in the normal process
    for eg:
    my given target to the customer is 1 lac and there is rebate agreement for him
    so by the end of the year he has reached the target and then
    we have settled the agreement thru automatic settlement and then
    after one month he has returned the goods and services back which are in rebate agreement and
    then how to handle that process.
    plz help me on this
    regards,
    balaji.t
    09990019711

    Hi Balaji,
      Raise appropriate debit memo  for that customer based on the client decision.
    Regards,
    kishore.

  • How to handle a return statement from a login webservice call

    Hi all,
    I am new to this iPhone apps. I am trying to wirte a webservice call in which I am comparing my username and password details in webservice and getting an boolean statement as a response. By using that response i should display valid or invalid statement on the screen.
    Now i am able to get the response from the webservice, but i am unable to handle that boolean variable present in the xml statement.
    Can any one please suggest me how to handle that boolean value from the xml statement?
    Thanks
    SRI.

    Since you are a registered developer you would be far better off posting this in the developers site, this forum is for users of apps.

  • How to handle BAPI RETURN message?

    Hi ,
    I developed a bapi ,it is calling from java  application . i don't konw how to send the return message to java application .Pl any one help out this problem.
    Thanks&Regards,
    Pratap

    bapi's normally have a return parameter of type BAPIRETURN (structure) or BAPIRET (internal table) that contain the result messages from a bapi. So if you develop your own bapi you should add this kind of export parameter.
    regards,
    Hans

  • How to handle carriage return/linefeed embedded in text field as first char

    Hi,
    I am trying to use sqlldr to import text that is comma-separated and double quote-enclosed, but contains embedded carriage return/linefeed pairs. I have a control file which works for most cases and looks like this:
    LOAD DATA
    INFILE './foo.new'
    APPEND
    CONTINUEIF LAST PRESERVE (<>'"')
    INTO TABLE <tablename>
    FIELDS TERMINATED BY "," ENCLOSED BY '"'
    TRAILING NULLCOLS
    Unfortunately, this fails when the very first character of the text field is a carriage return/linefeed pair, e.g.,:
    "11","22","33","\r\nThis is the fourth field","","","","",""
    In that case, what is actually the opening double-quote for the fourth field, is interpreted by the CONTINUEIF clause as the end of that line. Can anyone please point me to a solution?
    thanks.
    stan.

    Thanks for the suggestion. Unfortunately, I've already tried it, and it doesn't help. I believe the problem is that sqlldr tries to figure out where each record is delimited before it parses out the field. So, any field-level trimming depends on sqlldr first determining that the cr/lf is actually part of that record, and not an indication of the start of a new record (and it's doing the latter right now). Fwiw, Python's csv parser will handle this type of record just fine.
    regards.
    stan.

  • How to Handle NET, Return Phone - Verizon Wireless Store vs. Wireless Zone

    Background:
    My wife needed a new phone and we had available a NET credit on the her number for a new phone we were currently on a Month-to-Month since the original contract was up. She chose a Samsung Reality phone. We dropped one line of the Family plan (from 4 to 3 lines) because we would now be paying 9.99 monthly for data plan required on the new line and the secondary line wasn't being used anyway. New 1400 Family plan + 9.99 monthly data plan is activated with corporate discount.
    My wife has been using the Reality and doesn't like the touch wizard features and the way the phone answers the call as she's pulling it out of her pocket (among other things). We are within 20 days of the original purchase/upgrade and went back to the VZ store to return for an LG Chocolate Touch - which my wife like's better. It was a Friday - clerk says no phones in stock and if he orders it will be Tues/Wed before he can get the phone. We decide to come back the next week (Tues). Clerk let's us know the LG Chocolate is not available within 500 mile radius (he thinks it's being discontinued). My wife does not like the other available phones and/or the 29.99 data plan requirements on some phones. Now What!
    Her brother contacts his preferred provider - Wireless Zone. They say they have the LG Chocolate in-stock and can make the switch.
    Now I'm concerned about the return of the original upgrade phone to VZ store and then being able to get the NET discount on the LG Chocolate (after getting credit from VZ store - $35 service charge).
    Can the authorized reseller apply a NET if the original upgrade phone is returned and roll the contract on the corporate discount?
    Thanks for any help!

    That would depend on the policies of the authorized reseller. Some honor the NE2, some do not. When you use an authorized reseller, you are actually signing TWO contracts, and Verizon's is secondary to the reseller's - read everything carefully so you know what the rules are and what your options are.

  • How to handle Import Return

    Hi,
        Can anybody tell me the import return process with account Entries at all steps.
    Thanks in advance.
    Regards
    Pavan

    Gurus,
         Any Help Regarding this issue.

  • How to Handle Large Dumps and Complex Calculations in OBIEE

    Hi,
    We are working on some reports in OBIEE and we are unable to optimize performace. Please consider following scenerios:
    1) Detail Report
    In this particular report we have essentaily data dump. That is there are 5 Dimentions and a Fact table and we are just selecting
    fields from various Dimentions and facts. But the problem is there are over 5000 records. I guess that is making report very slow.
    Another issue is when we click on PAGE Contols, they simply dont work, that is if we click on (>>) to see all records its takes lots
    of time but show only first 25 records. Any idea what is the problem.
    2) Calculated Report
    We have one calculated report where there are 7 calculated columns. Because every column contains different Measures and we have to
    use lots of Filter expressions
    Eg: Filter (Measure1 USING {@VarDate} BETWEEN DIM1.FromDate and Dim1.Todate AND {@VarDate} BETWEEN DIM2.FromDate and Dim2.Todate AND <SOME OTHER FILTERS> )
    The Granuality of data is at employee level and there are around 1388726 records in Fact table.
    Is there is any way to optimize above except to create a summary table instead?
    kindly guide us on above scenerios

    Hi,
    Thanks for your reply, I was trying things suggested, I found that the actual physical SQL (which I can get from "Manage Session" link) run in like 4-5 seconds in Query analyzer but: when I studied SQL carefully it does not contain some fiters which we I have applied in report.
    From example i have a filter in report <Measure.Present = 1 > but in Physical SQL i cannot see that filter. However, the results it gives on dashboard are correct that is after it applies the fillter.
    Any idea why is this happening?
    My guess is because above filter is not being applied at physical sql level thats why query fetches like 20000 recors in server cache and then it applies <Measure.Present = 1 >. Thats why it might be taking time ?
    Please give me your suggestions.
    Thanks !

  • How to handle error msgs in one system which are available only in another?

    Hi Experts,
        I have two SAP systems A and B. An ABAP program in system A calls Function module in System B.
        System B returns any error with message id, class and variables in the event of any invalid data.
        How to handle this returned error message in system A when the message class exists only in system B.
        One way is to create a copy of this message class along with all the messages in system A.
        But the function module in system B calls many BAPIs which in turn may return messages from many different message classes. So making a copy of so many message classes in System A means creating so many custom objects.
       Is there any better way to handle this without creating the message classes in System A?
    Thanks & Regards
    Gopal
    Edited by: gopalkrishna baliga on Apr 27, 2010 6:28 AM

    Hi Gopal,
        As per my understanding your function module can retrun any number of error messages and it may have varied descriptions.It would be difficult to handle each of these error individually.
    One of the methods can be..use the raise exception otion whenever any error is encountered if you want to do in the shortedt way.
    you can catch all th set of error in soem exceptions and then use the same.
    Handling each error individually in the source system would be difficult if these errors do not exisit in the source system at all.

  • Getserver cookie - returns empty page

    Hi,
    I am using MVC,
    I have firstpage - a controller for that and a model class.
    I have second page - a controller for that and the model is the same as the first one.
    I am using a single model class but multiple controllers and multiple views. I am trying to use server cookies to set and get attributes between the pages.
    First Page - I have 2 attributes - on Do_init - I instantiate Model. Do_request - loads the firstpage. Do_handle-data - once the data is entered in firstpage, gets it from form fields and loads it into cookie.
    Do_handle_event - gets the values from the cookie and processes it and makes a table to be passed to the seconf page. I loaded this table in the cookie and - call second.do
    Second page - in controller  - DOInit - i have again instantiated Model - in Dorequest - I try to read from the cookie for the table data...But I am getting an empty page. I debugged it and in the Do request - where I call the get_server_cookie - nothing happens, just returns empty page...
    Does anyone know why?? can I not access the cookie by name in more than once controllers??
    Is this a right way of navigating between pages?? I want all the objects in the pages accessible across all the pages...should be able to read and write as per events...please suggest...
    Thanks
    Thilothama

    Hi,
         Put that cookie in the navigation->set_parameter and paas it to the next page in the page attributes as an 'AUTO'.
              Hope this may help you.
    Jyoti

  • Who know how to handle pl/sql table return from stored procedure calling from jsp

    I have some stored procedure which return pl/sql table (index by table), It is look like an array. how jdbc handle this?
    CallableStatement cs = con.prepareCall("EXECUTE bill.getcountry(?,?)");
    cs.setInt(1, cid);
    cs.registerOutParameter(2, java.sql.Types.VARCHAR);// ARRAY?
    ResultSet rs = cs.executeQuery();
    Array array = (Array) rs.getObject (1);
    ResultSet array_rset = array.getResultSet ();

    Not that familiar with the OCI (Oracle Call Interface), but I think this call will be problematic - the OCI deals with SQL data types and not with PL/SQL structures.
    The OCI has since Oracle 8i sported an object call interface (see OCI Runtime Environment for Objects for details).
    This allows you to use the CREATE TYPE command to create advance user data types - and these are supported by the SQL engine, PL/SQL engine and external languages via the OCI.
    So you need to have a look at the Perl-DBI documentation to see how it supports Oracle object types and consider using these. As for internal PL/SQL data structures. These are not supported by the SQL engine and I would expect limited or no support in the OCI for these. Anyway, using SQL data types makes a lot more sense ito flexibility and transparency across languages and environments.

  • How to handle multiple actions in the webservice ?

    Hi Guys,
    I have multiple operations in the webservcie and under soap action in the receiver soap adapter, i dont know how to handle multiple soap operations.
    can anybody guide me, how to acheive this ?
    Thanks,
    srini

    Hi Srini !
    This weblog shows the general design of a scenario with BPM
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
    This link:
    http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
    show how to insert a predefined BPM pattern. You could use one of the BpmPatternSerialize.... patterns to see how you BPM should look like...
    Basically it should be:
    1) Receive Step (async/sync, as you need) to trigger the BPM
    2) Send step (sync) for first webservice
    3) Send step (sync) for second webservice
    N) Send step (sync) for N webservice
    N+1) if the whole communication is sync, here you need to use a send step to return back the answer to sender.
    Regards,
    Matias.

  • How to call webservice?

    Hello,
    i am trying to call webservice.i tryed  following code for calling webservices via actionscript.it is givind the response.but it is not giving correct response.
    is this correct way to call webservice?is there other way to call webservice?can anybody tell me,how to call webservice?
    <mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”vertical” width=”420″ height=”380″ xmlns:net=”flash.net.*”>
    <mx:Script><![CDATA[
    import mx.rpc.soap.LoadEvent;
    import mx.rpc.AbstractOperation;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.soap.Operation;
    import mx.rpc.soap.WebService;
    private var serviceURL:String = "http://localhost:7080/icon-ws/services";
    private var wsdlURL:String = "http://localhost:7080/icon-ws/bulkUpload.wsdl";
    private function callWS():void {
    var service:WebService = new WebService(serviceURL, serviceURL);
    service.wsdl = wsdlURL;
    service.loadWSDL();
    var oper:Operation = service.getOperation("BulkUpload") as Operation;
    oper.addEventListener("result", resultHandler);
    oper.addEventListener("fault", faultHandler);
    oper.send();
    public function resultHandler(event:ResultEvent):void {
    Alert.show("Result returned"+ event.result.toString());
    public function faultHandler(event:FaultEvent):void {
    Alert.show("fault: "+ event.toString());
    ]]></mx:Script>
    <mx:Button id=”selectBut” label=”CALL webservice” click=”callWS()”/>
    </mx:Application>

    sorry for my english. I expect you understand me...
    I do that extended sp 
    Code Block
    use atdb_main_test
    Declare @Object as Int;
    Declare @ResponseText as Varchar(8000);
    DECLARE @login VARCHAR(50);
    DECLARE @user_passwd VARCHAR(50)
    Exec master..sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
    Exec master..sp_OAMethod @Object, 'open', NULL, 'get', 'http://172.xx.xx.xx:wwww/account.asmx?op=CreateEquipementMacAddress', 'false'
    EXEC master..sp_OASetProperty @Object, 'user_login', @login
    EXEC master..sp_OASetProperty @Object, 'user_passwd', @user_passwd
    EXEC master..sp_OASetProperty @Object, 'p_nb_poste', 1
    EXEC master..sp_OASetProperty @Object, 'p_id_site', 91400
    EXEC master..sp_OASetProperty @Object, 'p_id_type_poste', 83
    EXEC master..sp_OASetProperty @Object, 'p_adresse_mac', null
    EXEC master..sp_OASetProperty @Object, 'p_num_serie', null
    EXEC master..sp_OASetProperty @Object, 'login', null
    EXEC master..sp_OASetProperty @Object, 'passwd', null
    EXEC master..sp_OASetProperty @Object, 'default_gateway', null
    EXEC master..sp_OASetProperty @Object, 'ip', null
    EXEC master..sp_OASetProperty @Object, 'bCreateIPPhone', 'false'
    EXEC master..sp_OASetProperty @Object, 'vlanId', 0
    Exec master..sp_OAMethod @Object, 'send'
    Exec master..sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
    Select @ResponseText as ResponseText
    Exec master..sp_OADestroy @Object
    I use a SQL server 2000 and don't do anything else.
    But it doesn't work
    I don't know what to do ...
    the message is (1 row affected) but no tupple is written in my db...
    can you help me please ?

  • How to get the array of Complex when call a webserivce method it's return an array of user define data struct?

    When call a webservice opreation, it returns an array of complex type, sure, the calling is successed,  but i don't know how to get the return values,
    I have tried use Pendingcall.response & Pendingcall.getOutPutValues() in Pendingcall.onResult event function...
    Waiting....

    Flash Lite doesn't fully support webservices, so you will find it difficult to use the full api set.
    I suggest that you use SWX (swxformat.org) or simply HTTP requests for transactions.
    We have a tutorial on use with ColdFusion here:
    http://vimeo.com/6829083
    Mark

  • How to handle Asynchronous calls using OSB?

    Hi There,
    How to handle Asynchronous calls using OSB?
    Please help me out??
    -Venkat

    Hello friend, here is what you need.
    Oracle Service Bus, invoke asynchronous webservices | Oracle .. Java .. OpenSource .. SOA

Maybe you are looking for

  • SAP PI 7 Sample Scenarios

    When I look through the forum, I see a lot of questions about XI sample scenarios. However, all the results are for SAP XI. Is there any or many sample scenarios for PI 7? The methodology is the same, but there are a few differences procedurally. I a

  • Is it dangerous to frequently reset my iPod?

    (i posted this question earlier... im just trying to see if i can get any more advice) hey everyone, i recently purchased a 30 gb 5th generation iPod and have been constantly trying to get video on to it. when i finally did, the video would come up b

  • Cash Journal Confi - FBCJC2

    Hi While doing the cash Journal configuration (FBCJC2) for the Business transaction Type "C" - CASH RECEIPTS FROM BANK & "B" - CASH PAYMENT TO BANK . Is it necessary to maintain a contra account. for those tracastion types. or can we directly post th

  • HT201304 i have forgotten my pass code how do i find out what it is?

    i have forgotten my pass code how do i find out what it is?

  • How do I convert an Idesign CC epub to mobi

    I easily exported and Indesign CC file to epub, which works fine in IBooks.  How do I export it to mobi. Can I do it as easily? Thanks, Janis Friesler