Expected type [STRING] found [MEMBER] ([Average]) in function [@ISACCTYPE]

Hi
We've upgraded from 11.1.1.0 to 11.1.2.1.
The following member formula worked previously:
if(@ismbr(YearTotal));
+     Jun;+
ELSEIF(@ISACCTYPE(Average));
+     @AVGRANGE(SKIPNONE,@CurrMbr(Measures)->Month,@ILSIBLINGS(@CurrMbr(Period)));+
ELSE
+     @ACCUM(Month,Jul:Jun);+
Endif;
Now get the following error:
+Error(1200354) - Error compiling formula for [YTD] (line 3): expected type [STRING] found [MEMBER] ([Average]) in function [@ISACCTYPE]+
There is no member or member alias called 'Average' (I did a search).
I refered to this forum item, but no solution was provided: @ISACCTYPE formula error
Your assistance is appreciated.
Cheers

Hold on!
I thought to query the SQL repository and got some help from this dodgy blog:
http://camerons-blog-for-essbase-hackers.blogspot.com.au/2011/07/stupid-planning-queries-3-accounts.html
For reference purposes, here's what I ran:
select               
               hspo.object_name
from               hsp_object     hspo
INNER JOIN          HSP_ACCOUNT     hspa     on hspo.object_id = hspa.ACCOUNT_ID
where               1=1
and               hspo.OBJECT_TYPE = '32' --Account dimension
and               hspa.TIME_BALANCE = 3 --Time Balance = Average
TIME_BALANCE
WHEN 0 THEN 'None'
WHEN 1 THEN 'First'
WHEN 2 THEN 'Last'
WHEN 3 THEN 'Average'
ELSE ''
Edited by: user964802 on Jan 17, 2013 11:19 AM
Edited by: user964802 on Jan 17, 2013 12:07 PM

Similar Messages

  • Expected type [NUMBER] found [STRING] (["member"]) in function[operator@div

    Hi,
    I am trying to recalculate a figure based on an annual percentage. The script is
    FIX(yr2011, Plan, CC_4363,draft)
    "AC_&&&&&& Salary" ="AC_&&&&&&Salary"* ("pay increase%"/100)
    endfix
    endexclude
    I receive the error "expected type [NUMBER] found [STRING] (["AC_&&&&&&"]) in function[operator@div"
    I looked at this forum and someone suggested using the @match function. I tried
    "AC_&&&&&& Salary" ="AC_&&&&&& Salary"* (@match(Accounts," pay increase%")/100);
    This validated but the salary figure disappeared.
    The reason I am not loading at monthly (level zero) is due to a business requirement. I am having to spread the figures down the months from the total year but if the total year is wrong or missing the montly data obviously disappears too.
    Thanks,
    Nathan

    A few questions:
    1) I see an ENDEXCLUDE, but no starting EXCLUDE. How does that relate to the code?
    2) Do you really have member names with six ampersands in them? Is that even an allowed character? I guess it is but it looks odd as & is the character used to define the usage of an Essbase Substitution Variable. Okay, that was a comment, not a question, I guess.
    3) Do you have a Pay Increase% in every month? Or is it annual?
    3) Why don't you stick the salary value to be allocated into another Account, e.g., "Annual Salary" and place it in a single month. Then your code could look like:
    FIX(yr2011, Plan, CC_4363,draft, "Jan":"Dec")
    "AC_&&&&&& Salary" ="Annual Salary"->"BegBalance" * ("pay increase%"->"BegBalance" / 100)
    endfix
    I created a BegBalance member which you may not have -- chose Dec or Jan as your home for Annual Salary and Pay Increase and go from there. I also forced the calc to happen at the month level -- I am assuming you have months in your app, but maybe not. Salt to taste.
    Regards,
    Cameron Lackpour

  • Function Module GUI_DOWNLOAD: Type String Issue

    I am working in 4.6C. I have used this Function Module many times in the past without issue, but not at this site. It abends and gives me the error message:
    The call to the function module "GUI_DOWNLOAD" is incorrect:                                                                               
    The function module interface allows you to specify only fields          
    of a particular type under "FILENAME". The field "FNAME" specified here  
    has a different field type.                                              
    Here is the field declaration in the code:
    PARAMETER: fname type rlgrap-filename DEFAULT 'C:/New_PO_Format.xls'.
    The import parameter in GUI_DOWNLOAD for FILENAME is type STRING. When I double click on STRING in the FM I get "Unable to find a tool to process request". And, TYPE STRING does not exist in the system? I started making a Z version of GUI_DOWNLOAD, but it started giving me headaches because I had to start copying other SAP function modules.
    Am I missing something? Or, is there a new and improved version of GUI_DOWNLOAD to use?

    data : v_file type string.
    PARAMETER: fname type rlgrap-filename DEFAULT 'C:/New_PO_Format.xls'.
    start-of-selection.
    v_file = fname.
    use v_file in gui_download parameter.
    Thanks
    Seshu

  • Send String[][] type to pl/sql procedure from function in App.module

    Hi,
    I use jdveloper 11.1.1.3.0
    I have a pl/sql procedure. the input type argument is 2-dimensional array(TAR) :
    types:
    create or replace TYPE ARRAYWEB as varray(160) of VARCHAR2(200);
    create or replace TYPE TAR as table of ARRAYWEB;
    Procedure:
    PROCEDURE testi(info IN TAR )
    I want to send type String[][] to this procedure from a function in Application module:
    1: String[][] str;
    2: CallableStatement plsqlBlock = null;
    3: String statement = "BEGIN testi(:1); END;";
    4: plsqlBlock = getDBTransaction().createCallableStatement(statement, 0);
    5: plsqlBlock.setArray(1, str); //get error
    6: plsqlBlock.executeUpdate();
    but in line 5 I don't know what type I should use, and this type(Array) doesn't work
    Habib

    Maybe this can help: http://www.devx.com/tips/Tip/22034
    Dario

  • MDX - function expects a string or numeric expression for the 1 argument. A tuple set expression was used.

    why this query
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    {([D Date].[Hierarchy].[Season].[2012 - 2013]),([D Date].[Hierarchy].[Season].[2013 - 2014])},
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    gives this error:
    Query (3, 3) The >= function expects a string or numeric expression for the 1 argument. A tuple set expression was used.
    while the following query works fine
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    [D Date].[Hierarchy].[Season].[2012 - 2013],
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    why having set inside Filter's boolean expression generates that error? how can we
    keep the set inside the Filter's boolean expression but
    solve the problem? please explain the reason and solution

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • Error: unexpected XML reader state. expected: END but found: START:

    I am getting following error while invoking method 'GetVersionInfo' (.net web service over dll) which takes one input parameter(string) and gives two output parameters(both short):
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: deserialization
    error: unexpected XML reader state. expected: END but found: START:
    {UPPLink}pnVersionMajor
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 40
    Expected Request is as follows:
    POST /UPPLink/UPPLink.asmx HTTP/1.1
    Host: 172.16.1.38
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "UPPLink/GetVersionInfo"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfo xmlns="UPPLink">
    <ignore>string</ignore>
    </GetVersionInfo>
    </soap:Body>
    </soap:Envelope>
    EXpected Response is as follows:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfoResponse xmlns="UPPLink">
    <GetVersionInfoResult>
    <pnVersionMajor>short</pnVersionMajor>
    <pnVersionMinor>short</pnVersionMinor>
    </GetVersionInfoResult>
    </GetVersionInfoResponse>
    </soap:Body>
    </soap:Envelope>
    The PL/SQL code I am using is as follows:
    DECLARE
    service_ sys.utl_dbws.SERVICE;
    call_ sys.UTL_DBWS.call;
    service_qname sys.utl_dbws.QNAME;
    port_qname sys.utl_dbws.QNAME;
    operation_qname sys.utl_dbws.QNAME;
    string_type_qname sys.utl_dbws.QNAME;
    number_type_qname sys.utl_dbws.QNAME;
    retx ANYDATA;
    strEntry VARCHAR2(100);
    retx_string VARCHAR2(100);
    majorVersion NUMBER;
    minorVersion NUMBER;
    params sys.utl_dbws.ANYDATA_LIST;
    v_outputs sys.utl_dbws.anydata_list;
    BEGIN
    dbms_output.put_line('Starting Function');
    service_qname := sys.utl_dbws.to_qname(null, 'UPPLink');
    strEntry := 'vab';
    dbms_output.put_line('Creating Service');
    service_ := sys.utl_dbws.create_service(HTTPURITYPE('http://172.16.1.38/UPPLink/UPPLink.asmx?WSDL'), service_qname);
    dbms_output.put_line('Creating Operation');
    operation_qname := sys.utl_dbws.to_qname(null, 'GetVersionInfo');
    dbms_output.put_line('Calling Service');
    call_ := sys.utl_dbws.create_call(service_, null, operation_qname);
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'true');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'UPPLink/GetVersionInfo');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    string_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    number_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'short');
    sys.utl_dbws.add_parameter(call_, 'ignore', string_type_qname, 'ParameterMode.IN');
    sys.utl_dbws.add_parameter(call_, 'pnVersionMinor', number_type_qname, 'ParameterMode.OUT');
    sys.utl_dbws.set_return_type(call_, number_type_qname);
    params(0) := ANYDATA.convertvarchar2(strEntry);
    dbms_output.put('Invoking with Input Parameter: ');
    dbms_output.put_line(ANYDATA.ACCESSVARCHAR2(params(0)));
    retx := sys.utl_dbws.invoke(call_, params);
    dbms_output.put_line('Invoke complete');
    majorVersion := retx.accessnumber;
    dbms_output.put_line('Major Version ' || majorVersion);
    v_outputs := SYS.utl_dbws.get_output_values(call_);
    minorVersion := ANYDATA.AccessNumber(v_outputs(1));
    dbms_output.put_line('Minor Version ' || minorVersion);
    sys.utl_dbws.release_service(service_);
    END;
    /

    Actually, the name needs to match what is specified in the WSDL file.

  • LINQ: Anonymous Type Q: Missing member?

    Hi,
    Dim files = IO.Directory.GetFiles("j:\", "*.*", IO.SearchOption.AllDirectories)
    Dim q = From file In files _
    Select New IO.FileInfo(file) _
    Let bla = "a"
    For Each item In q
    Stop
    Next
    Why is the loop variable "item" of type String? I expect it to be of an anonymous type with two properties, one of type FileInfo, the other one of type String (named bla)? Just
    because the first member is not explicitly named, it mustn't be dropped. I did not write "Select bla =..." but "Let bla = ..."
    If I change it to    
        Select FI = New IO.FileInfo(File)
    it works.
    Am I missing something?
    Armin

    I can agree with this but not for everything, example, I write the following in C# where Result is an anonymous type and could easily be done with a class but then again there is much more to write this and maintain for a method that is seldom used and easy
    to read for a C# or VB.NET programmer.
    public static void FindItemAndSetChecked(this CheckedListBox sender, string Text, bool Checked)
    var Result =
    from @this in sender.Items.Cast<string>().Select(
    (item, index) => new
    Item = item,
    Index = index
    where @this.Item.ToLower() == Text.ToLower()
    select @this
    ).FirstOrDefault();
    if (Result != null)
    sender.SetItemChecked(Result.Index, Checked);
    In VB.NET Option Strict On matches the C# code
    <System.Runtime.CompilerServices.Extension> _
    Public Sub FindItemAndSetChecked(ByVal sender As CheckedListBox, ByVal Text As String, ByVal Checked As Boolean)
    Dim Result =
    From this In sender.Items.Cast(Of String)() _
    .Select(
    Function(item, index)
    Return New With {Key .Item = item, Key .Index = index}
    End Function)
    Where this.Item.ToLower() = Text.ToLower()
    Select this).FirstOrDefault()
    If Result IsNot Nothing Then
    sender.SetItemChecked(Result.Index, Checked)
    End If
    End Sub
    Setting Option Infer Off means we must create a class which is easier in VB.NET then C# i.e. using statement (equivalent to import statement) and in C# should be placed in a non-static class where VB.NET does not matter so much.
    Sure the above could be a tad tighter but in this case I don't see any benefit where there would be a benefit for applying Option Infer Off for business classes.
    Note: The above was used as I used the C# extension in a reply today and was handy to move back to VB.NET
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Implicit coercion of a value of type String to an unError while Adding Dynamic Rows To Flex DataGrid

    Hi friends
    I  want to add interger for in next next rows while clicking tab  button,one i enter all the values in one row if i press tab means next  row will be editable.for making that i added the following code.i have  some error shows like this
        [Bindable]
                    private var tasks:ArrayCollection;
                    private static const ADD_TASK:int= "";
                    private function init():void
                        tasks = new ArrayCollection();
                        tasks.addItem(new Task(0.01,100000,0));
                        tasks.addItem({frmAmount:ADD_TASK});
                    private function checkEdit(e:DataGridEvent):void
                        // Do not allow editing of Add Task row except for
                        // "Click to Add" column
                        if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                            e.preventDefault();
            private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                    var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                    var dt:Object = e.itemRenderer.data;
                    // Add new task
                    if(parseInt(txtIn.text) != ADD_TASK)
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----->Multiple markers at this line:
                                                                                                                             -1067: Implicit coercion of a value of type String to an unrelated type int.
                                                                                                                                -txtIn
                    // Destroy item editor
                    commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                    e.preventDefault();
            ]]>
    Please help if any suggession
    Thanks in advance
    B.Venkatesan

    The error message indicates the problem fairly clearly.  _feed_list is defined as a ComboBox in your first line of code.  You are passing that as an argument in your populate(_feed_list) line of code.  However, the populate function is expecting an XMLList object to be passed, not a ComboBox.
    You probably really mean to be using...
              populate(feed_items);
    since that is the only XMLList to be found

  • Embedding with JPA annot: column "is not compatible with expected type"

    I have the following embed case (things I guess to be inessential omitted):
    @Entity
    public class Container {
    @Id
    @GeneratedValue
    @Column(name="ID")
    private long id;
    @Embedded
    @AttributeOverride(name="value", column=@Column(name="UID"))
    private Uid uid;
    @Embeddable
    public class Uid {
    private String value;
    When I run this through the mapping tool to build the schema, it correctly builds the UID column in the MySQL Agreement table as a VARCHAR.
    However, when I try to access the table, I get the following error (I've edited class names to match my simplified example):
    RROR_SYSTEM_FAILED:
    <4|true|4.0.0> kodo.persistence.ArgumentException: "Uid.value" declares a column that is not compatible with the expected type "varchar". Column details:
    Full Name: Agreement.UID
    Type: blob
    Size: 0
    Default: null
    Not Null: false
         at kodo.jdbc.meta.MappingInfo.mergeColumn(MappingInfo.java:720)
         at kodo.jdbc.meta.MappingInfo.createColumns(MappingInfo.java:567)
         at kodo.jdbc.meta.ValueMappingInfo.getColumns(ValueMappingInfo.java:143)
         at kodo.jdbc.meta.strats.StringFieldStrategy.map(StringFieldStrategy.java:52)
         at kodo.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:101)
         at kodo.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:75)
         at kodo.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:497)
         at kodo.jdbc.meta.FieldMapping.resolve(FieldMapping.java:456)
         at kodo.jdbc.meta.ClassMapping.resolveNonRelationMappings(ClassMapping.java:930)
         at kodo.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:886)
         at kodo.meta.ClassMetaData.resolve(ClassMetaData.java:1761)
         at kodo.jdbc.meta.ValueMappingImpl.resolve(ValueMappingImpl.java:541)
         at kodo.jdbc.meta.strats.EmbedFieldStrategy.map(EmbedFieldStrategy.java:62)
         at kodo.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:101)
         at kodo.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:75)
         at kodo.jdbc.meta.FieldMapping.resolveMapping(FieldMapping.java:497)
         at kodo.jdbc.meta.FieldMapping.resolve(FieldMapping.java:456)
         at kodo.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:890)
         at kodo.meta.ClassMetaData.resolve(ClassMetaData.java:1761)
         at kodo.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:683)
         at kodo.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:635)
         at kodo.meta.MetaDataRepository.resolve(MetaDataRepository.java:518)
         at kodo.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:288)
         at kodo.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:352)
         at kodo.kernel.QueryImpl.classForName(QueryImpl.java:1879)
         at kodo.kernel.ExpressionStoreQuery$1.classForName(ExpressionStoreQuery.java:74)
         at kodo.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:151)
         at kodo.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:119)
         at kodo.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:203)
         at kodo.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:176)
         at kodo.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:167)
         at kodo.kernel.jpql.JPQLExpressionBuilder.access$500(JPQLExpressionBuilder.java:30)
    ===
    I can't figure out why it thinks something should be a blob. Any thoughts?
    Thanks,
    -- Bryan Loofbourrow

    Ok, I found the problem. I hadn't added the Uid.java to the persistence.xml file, so although the mapping tool correctly recognized this as a varchar situation, the execution environment did not, taking Uid to be a nonpersistent class that it must treat as a blob.
    -- Bryan

  • Deserialization error: unexpected XML reader state. expected: END but found

    I have a JWSDP (on weblogic 8.1 SP2) web service that is supposed to return a string that contains a small XML file. The client can call and invoke the service just fine and the service runs. When the client reads the response it blows up with the error below, what is causing this? The response looks okay to me.
    ====================================
    ERROR FROM THE CLIENT
    ====================================
    [java] java.rmi.RemoteException: Runtime exception; nested exception is:
    [java] deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(Ljava.lang.RuntimeExceptionV(StreamingSender.java:248)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:230)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.StringLjava.lang.String;(DataExchangerSoap_Stub.java:70)
    [java] at jsp_compiled.__index._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponseV(__index.java:141)
    [java] at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(JspBase.java:33)
    [java] at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:971)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImplV(ServletStubImpl.java:402)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(ServletStubImpl.java:305)
    [java] at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6350)
    [java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(AuthenticatedSubject.java:317)
    [java] at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(SecurityManager.java:118)
    [java] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImplV(WebAppServletContext.java:3635)
    [java] at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThreadV(ServletRequestImpl.java:2585)
    [java] at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequestV(ExecuteThread.java:197)
    [java] at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    [java] at java.lang.Thread.startThreadFromVM(Ljava.lang.ThreadV(Unknown Source)
    [java] Caused by: deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.encoding.literal.LiteralSimpleTypeSerializer.deserialize(Ljavax.xml.namespace.QName;Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContextLjava.lang.Object;(LiteralSimpleTypeSeri
    alizer.java:133)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._deserialize_exchangeData(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchan
    gerSoap_Stub.java:117)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._readFirstBodyElement(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchangerS
    oap_Stub.java:104)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:158)
    [java] ... 14 more
    ====================================
    SOAP RESPONSE
    ====================================
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    </env:Header>
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:exchangeDataResponse xmlns:m="https://partners.mcdata.com">
    <exchangeDataResult xsi:type="xsd:string"><status>OK</status>
    <message>Transaction accepted.</message></exchangeDataResult>
    </m:exchangeDataResponse>
    </env:Body>
    </env:Envelope>
    ====================================
    WSDL
    ====================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://partners.mcdata.com"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://partners.mcdata.com"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="https://partners.mcdata.com">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse" type="s:string" />
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://208.47.133.243/riverbedshipserver/exchangeData" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://208.47.133.243/riverbedshipserver/exchangeData" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ====================================
    web-services.xml
    ====================================
    <web-services>
    <web-service
    name="riverbedshipserver"
    targetNamespace="https://partners.mcdata.com"
    uri="exchangeData"
    >
    <components>
    <java-class name="DataExchanger" class-name="com.mcdata.websvc.riverbed.server.DataExchangerImpl"/>
    </components>
    <operations xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <operation name="exchangeData" component="DataExchanger" method="exchangeData">
    <params>
    <param name="sender" style="in" type="xsd:string" location="header"/>
    <param name="password" style="in" type="xsd:string" location="header"/>
    <param name="transactionType" style="in" type="xsd:string" location="header"/>
    <param name="data" style="in" type="xsd:string" location="header"/>
    <return-param name="exchangeDataResult" type="xsd:string"/>
    </params>
    </operation>
    </operations>
    </web-service>
    </web-services>

    This is caused by the response xml parameter is greater than the response parameter you have specified in your wsdl. Try to use packet monitoring to monitor all the process, you will notice that problems.

  • Unexpected XML reader state. expected: END but found: START:

    Hi,
    I am wrote a web client using JWSDP-2.0 and JWSDP-1.4.
    When I run my client I get following error.
    java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: m_dValue; nested e
    xception is:
    java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: m_dValue
    at com.engagenet.protoObj.wizcon.TagServiceSoap_Stub.readTagValues(TagServiceSoap_Stub.java:92)
    at com.engagenet.protoObj.wizcon.TagService_Impl.main(TagService_Impl.java:78)
    Caused by: java.rmi.RemoteException: Runtime exception; nested exception is:
    deserialization error: unexpected XML reader state. expected: END but found: START: m_dValue
    at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:331)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:313)
    at com.engagenet.protoObj.wizcon.TagServiceSoap_Stub.readTagValues(TagServiceSoap_Stub.java:70)
    ... 1 more
    Caused by: deserialization error: unexpected XML reader state. expected: END but found: START: m_dValue
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:233)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:1
    55)
    at com.sun.xml.rpc.encoding.ObjectArraySerializer.deserializeArrayInstance(ObjectArraySerializer.java:
    207)
    at com.sun.xml.rpc.encoding.ArraySerializerBase.deserialize(ArraySerializerBase.java:260)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:1
    55)
    at com.engagenet.protoObj.wizcon.TagServiceSoap_ReadTagValues_ResponseStruct_SOAPSerializer.doDeserial
    ize(TagServiceSoap_ReadTagValues_ResponseStruct_SOAPSerializer.java:43)
    at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:1
    55)
    at com.engagenet.protoObj.wizcon.TagServiceSoap_Stub._deserialize_ReadTagValues(TagServiceSoap_Stub.ja
    va:336)
    at com.engagenet.protoObj.wizcon.TagServiceSoap_Stub._readFirstBodyElement(TagServiceSoap_Stub.java:31
    1)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    ... 2 more
    Here is my wsdl file
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:WizWebService" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="urn:WizWebService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <s:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:WizWebService">
    <s:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
    <s:complexType name="ReadTagValues_return_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="tns:TagValue[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="ReadTagValues_tagNames_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:string[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="ReadTagStringValues_return_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="tns:TagStringValue[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="ReadTagStringValues_tagNames_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:string[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagValues_return_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="tns:QUALITY[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagValues_tagNames_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:string[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagValues_tagValues_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:double[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagStringValues_return_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="tns:QUALITY[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagStringValues_tagNames_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:string[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="WriteTagStringValues_tagValues_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="s:string[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:complexType name="GetTagNames_return_Array">
    <s:complexContent mixed="false">
    <s:restriction base="soapenc:Array">
    <s:attribute wsdl:arrayType="tns:TagName[]" ref="soapenc:arrayType" />
    </s:restriction>
    </s:complexContent>
    </s:complexType>
    <s:simpleType name="TAG_FORMAT">
    <s:restriction base="s:string">
    <s:enumeration value="F_STRING" />
    <s:enumeration value="F_NUMERIC" />
    </s:restriction>
    </s:simpleType>
    <s:simpleType name="QUALITY">
    <s:restriction base="s:string">
    <s:enumeration value="Q_ERR" />
    <s:enumeration value="Q_OK" />
    </s:restriction>
    </s:simpleType>
    <s:complexType name="TagStringValue">
    <s:sequence>
    <s:element name="m_bstrValue" type="s:string" />
    <s:element name="m_Quality" type="tns:QUALITY" />
    </s:sequence>
    </s:complexType>
    <s:complexType name="TagName">
    <s:sequence>
    <s:element name="m_bstrName" type="s:string" />
    <s:element name="m_Format" type="tns:TAG_FORMAT" />
    </s:sequence>
    </s:complexType>
    <s:complexType name="TagValue">
    <s:sequence>
    <s:element name="m_dValue" type="s:double" />
    <s:element name="m_Quality" type="tns:QUALITY" />
    </s:sequence>
    </s:complexType>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="ReadTagValuesIn">
    <wsdl:part name="tagNames" type="tns:ReadTagValues_tagNames_Array" />
    </wsdl:message>
    <wsdl:message name="ReadTagValuesOut">
    <wsdl:part name="return" type="tns:ReadTagValues_return_Array" />
    </wsdl:message>
    <wsdl:message name="ReadTagStringValuesIn">
    <wsdl:part name="tagNames" type="tns:ReadTagStringValues_tagNames_Array" />
    </wsdl:message>
    <wsdl:message name="ReadTagStringValuesOut">
    <wsdl:part name="return" type="tns:ReadTagStringValues_return_Array" />
    </wsdl:message>
    <wsdl:message name="WriteTagValuesIn">
    <wsdl:part name="tagNames" type="tns:WriteTagValues_tagNames_Array" />
    <wsdl:part name="tagValues" type="tns:WriteTagValues_tagValues_Array" />
    </wsdl:message>
    <wsdl:message name="WriteTagValuesOut">
    <wsdl:part name="return" type="tns:WriteTagValues_return_Array" />
    </wsdl:message>
    <wsdl:message name="WriteTagStringValuesIn">
    <wsdl:part name="tagNames" type="tns:WriteTagStringValues_tagNames_Array" />
    <wsdl:part name="tagValues" type="tns:WriteTagStringValues_tagValues_Array" />
    </wsdl:message>
    <wsdl:message name="WriteTagStringValuesOut">
    <wsdl:part name="return" type="tns:WriteTagStringValues_return_Array" />
    </wsdl:message>
    <wsdl:message name="GetTagNamesIn">
    <wsdl:part name="bstrStnName" type="s:string" />
    </wsdl:message>
    <wsdl:message name="GetTagNamesOut">
    <wsdl:part name="return" type="tns:GetTagNames_return_Array" />
    </wsdl:message>
    <wsdl:portType name="TagServiceSoap">
    <wsdl:operation name="ReadTagValues">
    <wsdl:input message="tns:ReadTagValuesIn" />
    <wsdl:output message="tns:ReadTagValuesOut" />
    </wsdl:operation>
    <wsdl:operation name="ReadTagStringValues">
    <wsdl:input message="tns:ReadTagStringValuesIn" />
    <wsdl:output message="tns:ReadTagStringValuesOut" />
    </wsdl:operation>
    <wsdl:operation name="WriteTagValues">
    <wsdl:input message="tns:WriteTagValuesIn" />
    <wsdl:output message="tns:WriteTagValuesOut" />
    </wsdl:operation>
    <wsdl:operation name="WriteTagStringValues">
    <wsdl:input message="tns:WriteTagStringValuesIn" />
    <wsdl:output message="tns:WriteTagStringValuesOut" />
    </wsdl:operation>
    <wsdl:operation name="GetTagNames">
    <wsdl:input message="tns:GetTagNamesIn" />
    <wsdl:output message="tns:GetTagNamesOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TagServiceSoap" type="tns:TagServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
    <wsdl:operation name="ReadTagValues">
    <soap:operation soapAction="#ReadTagValues" style="rpc" />
    <wsdl:input>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="ReadTagStringValues">
    <soap:operation soapAction="#ReadTagStringValues" style="rpc" />
    <wsdl:input>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="WriteTagValues">
    <soap:operation soapAction="#WriteTagValues" style="rpc" />
    <wsdl:input>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="WriteTagStringValues">
    <soap:operation soapAction="#WriteTagStringValues" style="rpc" />
    <wsdl:input>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetTagNames">
    <soap:operation soapAction="#GetTagNames" style="rpc" />
    <wsdl:input>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="encoded" namespace="urn:WizWebService" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TagService">
    <wsdl:port name="TagServiceSoap" binding="tns:TagServiceSoap">
    <soap:address location="http://212.157.43.123:80/wiz_ws/wizws.dll?Handler=TagService" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Here is my web client
    // This class was generated by the JAXRPC SI, do not edit.
    // Contents subject to change without notice.
    // JAX-RPC Standard Implementation (1.1.3, build R1)
    // Generated source version: 1.1.3
    package com.engagenet.protoObj.wizcon;
    import com.sun.xml.rpc.encoding.*;
    import com.sun.xml.rpc.client.ServiceExceptionImpl;
    import com.sun.xml.rpc.util.exception.*;
    import com.sun.xml.rpc.soap.SOAPVersion;
    import com.sun.xml.rpc.client.HandlerChainImpl;
    import javax.xml.rpc.*;
    import javax.xml.rpc.encoding.*;
    import javax.xml.rpc.handler.HandlerChain;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.namespace.QName;
    public class TagService_Impl extends com.sun.xml.rpc.client.BasicService implements TagService {
    private static final QName serviceName = new QName("urn:WizWebService", "TagService");
    private static final QName ns1_TagServiceSoap_QNAME = new QName("urn:WizWebService", "TagServiceSoap");
    private static final Class tagServiceSoap_PortClass = com.engagenet.protoObj.wizcon.TagServiceSoap.class;
    public TagService_Impl() {
    super(serviceName, new QName[] {
    ns1_TagServiceSoap_QNAME
    new com.engagenet.protoObj.wizcon.TagService_SerializerRegistry().getRegistry());
    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, java.lang.Class serviceDefInterface) throws javax.xml.rpc.ServiceException {
    try {
    if (portName.equals(ns1_TagServiceSoap_QNAME) &&
    serviceDefInterface.equals(tagServiceSoap_PortClass)) {
    return getTagServiceSoap();
    } catch (Exception e) {
    throw new ServiceExceptionImpl(new LocalizableExceptionAdapter(e));
    return super.getPort(portName, serviceDefInterface);
    public java.rmi.Remote getPort(java.lang.Class serviceDefInterface) throws javax.xml.rpc.ServiceException {
    try {
    if (serviceDefInterface.equals(tagServiceSoap_PortClass)) {
    return getTagServiceSoap();
    } catch (Exception e) {
    throw new ServiceExceptionImpl(new LocalizableExceptionAdapter(e));
    return super.getPort(serviceDefInterface);
    public com.engagenet.protoObj.wizcon.TagServiceSoap getTagServiceSoap() {
    java.lang.String[] roles = new java.lang.String[] {};
    HandlerChainImpl handlerChain = new HandlerChainImpl(getHandlerRegistry().getHandlerChain(ns1_TagServiceSoap_QNAME));
    handlerChain.setRoles(roles);
    com.engagenet.protoObj.wizcon.TagServiceSoap_Stub stub = new com.engagenet.protoObj.wizcon.TagServiceSoap_Stub(handlerChain);
    try {
    stub._initialize(super.internalTypeRegistry);
    } catch (JAXRPCException e) {
    throw e;
    } catch (Exception e) {
    throw new JAXRPCException(e.getMessage(), e);
    return stub;
         public static void main(String []args)
    try
    TagService_Impl proto = new TagService_Impl();
    TagServiceSoap tSoap = proto.getTagServiceSoap();
    QUALITY Q_ERR = QUALITY.fromString("Q_ERR");
    String tagName[] = {"aem_opc", "aem_ws_test", "wizsys_minute"};
    TagValue[] tValue = tSoap.readTagValues(tagName);
    for(int i = 0; i < 3; ++i)
    if(tValue.getM_Quality().equals(Q_ERR))
    System.out.println("" + tagName[i] + " read failed " + tValue[i].getM_Quality());
    else
    System.out.println("" + tagName[i] + " read failed " + tValue[i].getM_dValue());
    catch(Exception e)
    e.printStackTrace();
    Am I doing any thing wrong. All java files I am using is generated as a result of this command.
    wscompile.bat -verbose -gen -d classes -s src -keep etc/config.xml
    I only add main method in TagService_Impl.java class which I highlighted above.
    Any help is apprecited.
    Thanks
    Shreey

    I stumbled upon this exception when I tried to send a complex type as a return parameter. The sequence in which the server sent the components of the complex type was different from the one the client artifacts expected. And because the deserializer generated by xrpcc can't survive this, it throws the exception that's bothering you.
    It may or may not be the same case with you, this is merely what I had to find out.

  • Passing internal table with a field of type string to & from BAPI

    Hello ABAP gurus,
    I have a simple BAPI which has to send back an internal table.
    Internal table structure is as follows
    DATA: BEGIN OF itab OCCURS 0,
            config_id(8),
            blobdata like zstring,
    END OF itab.
    where zstring is a string of variable length.
    When I try to activate the BAPI I get a message
    "itab" must be a flat structure. You cannot use internal tables, strings, references or structures as components.
    However, just for testing, I changed blobdata to type of char and I can successfully activate and use the BAPI.
    But, our requirement is to pass a string of variable length.
    How can I resolve this issue? I have searched sdn and other blogs but didn't help so far.
    Any feedback on this will be highly appreciated.
    Thanks
    Ram

    Hi Prasad ,
         Try this way :
    Acc to your requirement ,create a structure with a parameter and a string , create a table type for that structure .
    use that table type in the changing parameter as you need that bapi to accept and return a table .
    for the below example ,  ZTEST_05 is a structure , ZTT_TEST_05 is a table type of ZTEST_05 .
    ZTEST_05 has got 2 fields , one is a param of type char(8) and another is a string of type STRING .
    I created the below mentioned BAPI and I was able to activate it without any errors .
         FUNCTION ZTEST_BAPI_ITAB_01.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(BAPI_P1) TYPE  ZTEST_05
    *"  CHANGING
    *"     VALUE(BAPI_CP1) TYPE  ZTT_TEST_05
    ENDFUNCTION. 
    Revert if any issues .
    Regards,
    Ranjita

  • 1067: Implicit coercion of a value of type String to an unrelated type

    Hi,
    I created a webservice based on sql server 2005 with several methods successfully.
    I am having headach now just trying to do some simple tests with Flex :-(
    I used the "Import WebService", it created some code "generated webservices".
    My test method p_SEARCH_NAME_SOUNDEX is based on a sql procedure wich take a varchar (128) as a parameter => NAL_NOM.
    I am just trying to debug this function (error at line in red)
           public function searchEntry(name:String):void
                // Register the event listener for the findEntry operation.
                //agenda.addfindEntryEventListener(handleSearchResult);
                myWS.addp_SEARCH_NAME_SOUNDEXEventListener(handleSearchResult);
                // Call the operation if we have a valid name.
                if(name!= null && name.length > 0)
                   myWS.p_SEARCH_NAME_SOUNDEX(name);
    I got this error message:
    067: Implicit coercion of a value of type String to an unrelated type generated.webservices:NAL_NOM_type1.
    FLEX has creaetd a type called NAL_NOM_type1 for my class:
    * NAL_NOM_type1.as
    * This file was auto-generated from WSDL by the Apache Axis2 generator modified by Adobe
    * Any change made to this file will be overwritten when the code is re-generated.
    package generated.webservices
        import mx.utils.ObjectProxy;
        import flash.utils.ByteArray;
        import mx.rpc.soap.types.*;
         * Wrapper class for a operation required type
        public class NAL_NOM_type1
             * Constructor, initializes the type class
            public function NAL_NOM_type1() {}
            public var varchar:String;public function toString():String
                return varchar.toString();
    I tried to do myWS.p_SEARCH_NAME_SOUNDEX(NAL_NOM_type1(name));
    and also declared "name" as NAL_NOM_type1... but i still get this error.
    This is how it declared my webservice method:
            public function p_SEARCH_NAME_SOUNDEX(nAL_NOM:NAL_NOM_type1):AsyncToken
                 var _internal_token:AsyncToken = _baseService.p_SEARCH_NAME_SOUNDEX(nAL_NOM);
                _internal_token.addEventListener("result",_P_SEARCH_NAME_SOUNDEX_populate_results);
                _internal_token.addEventListener("fault",throwFault);
                return _internal_token;
    I am even not on the level of assigning the data to my grid... i just want to see how it gets the data first in debug.
    Thanks in advance for you help.
    kr,
    Meta

    Thanks _Natasha_
    I tried this:
    var t = new NAL_NOM_type1();
    t.varchar = name;
    myWS.p_SEARCH_NAME_SOUNDEX(t);
    It passes the 1st step :-) but I get another error now :-/
    I think it try to get back NAL_NOM_type1 from the server of course on the WSDL side it know only NAL_NOM
    Error: Cannot find definition for type 'http://NABSQL64DEV/::NAL_NOM_type1'
        at mx.rpc.xml::XMLEncoder/encodeType()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc \xml\XMLEncoder.as:1426]
    I guess I have to change my constructor type... i am not used to these stuff :-s
    is this generating method the best way to access your data with webservices?
    the turorials I saw are xml file or array based... is there any link similar to my issue so I can learn better?

  • Problem with field type STRING in table

    Hi Experts,
             I am new to ABAP. I have created a new transparent table which hold error info. One of the field has to store data of size about 1500 char.
    Since CHAR type is not acceptable for this field So I gave STRING type. Now when I try to create a TABLE parameter in a RFC enabled functional module using "LIKE YERROR" Then I get a error:
    "YERROR must be a flat structure. You cannot use internal tables, strings, references, or structure as component" 
    Why is this error? How to resolve it? Is it because I have used a field of type STRING in the table? If this is the problem then what other type can I use?
    What are other know problems with using STRING type?
    Please help!
    Thanks
    Gopal

    Hi,
    Try to declare it as type LCHR , it can hold up to 32000 chars.
    Regards
    vijay

  • How can we place a enter char in type String for Smartform

    I'm facing a problem in smartform. I'm using "Read_Text" functional module to read the text. The problem is text contains multiple lines like for example
    Shipping Lines,
    Marks,
    Lahore , Pakistan.
    i want to show it in smart forms as it is showing above. How can i do that.
    Regards,
    Masoom Ali

    I'm facing a problem in smartform. I'm using "Read_Text" functional module to read the text. The problem is text contains multiple lines like for example
    Shipping Lines,
    Marks,
    Lahore , Pakistan.
    i want to show it in smart forms as it is showing above. How can i do that.
    Hi,
    Declare no. of variables based on the lines you are going to get.suppose if you think that 10 lines of text you will get using READ_TEXT, then create variables for 10 lines.
    After the READ_TEXT statement Loop at TDLINE and populate each line into a variable using CASE statement based on SY-TABIX and display all variables one by one in a TEXT ELEMENT of smartform.
    data : var1,var2,var3...... type string.
    loop at tdline into tline.
    case sy-tabix.
    when '1'.
    var1 = tline.
    when '2'.
    var2 = tline.
    end loop.
    Regards,
    Radha Krishna

Maybe you are looking for

  • How do I migrate my old emails in Mail from one Mac to another?

    I've upgraded from a G5 (OS Tiger) to a Mac Pro (OS Leopard). I've set up Mail on the Pro, but I want to migrate/move all my email folders, Inbox messages, Sent mail, etc. from my G5 to the Pro. I thought manually grabbing all folders and files from

  • Getting IllegalThreadStateException, while exporting the report to PDF

    Hi Friends, I am using JRC to create report in PDF format. But intermitently I get java.lang.IllegalThreadStateException while trying to export ReportClientDocument into PDF format using the PrintOutPutContrller. The I am using for this is ExportOpti

  • Creating Report Group

    Hi. I'd like to ask how to create / edit a Report Group? I'd like to create one, put 2 reports there and write transaction which will launch that report group. I'd be thankful for help or links Greetings. P.

  • Uploading a Book

    I have an Audio book of 6 CD's. Can someone explain how to get them uploaded to my MacBook Pro and then on to my iphone? Thank you, Jeanette

  • API for end dating a Supplier Bank account- R12

    Hi I'm looking for a API to end date a supplier bank account. Could someone help me wiht this. THanks