WSDL - s:any handling & string to structure

Hi,
We have a WSDL supplied to us by a partner, generated by Visual Studio. Helpfully it doesnt actually declare or include the XSD structures within the Type definitions.  There are 2 scenarios (examples below) that I need to deal with.
1) They declare the xml as a string so this will need to be converted to a structure and passed to an appropriate MI. (in the BPE so that errors are handled).
2) They declare the structure as <s:any /> which is valid WSDL but not so helpful to XI as it doesnt know what to do with it. 
If I define TheRequest and TheResponse from the WSDL in a Mapping then I can only see as far as TheRequestXML and TheResponseXML, no deeper.  I can see no Node operation to map 1 field to a whole structure.
It would be possible to do this in XSLT or a Java Mapping but that seems like the wrong way of going about this as it cant be that uncommon an occurance.
The XSD does not have any visibility of the methods in the WSDL (TheRequest / TheRequestXML etc). 
I can work around this by hacking the WSDL to include & use the types in the XSD explicitly, but that again seems wrong.
Namespace is defined
xmlns:s="http://www.w3.org/2001/XMLSchema"
<wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.somewhere.com/">
      <s:element name="TheRequest">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="TheRequestXML" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="TheResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="TheResponseXML">
              <s:complexType mixed="true">
                <s:sequence>
                  <s:any />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
Thanks
James

The message structure is defined in 2 parts:
WSDL
  +--> XSD
When someone calls the Soap Sender and sends over some data (a SOAP message) and this contains a structure like:
<some method>
<some top level soap / wsdl node>
.... importing or including
  <some top level xsd node>
   <rest of structure>
The maps then map any of the above nodes as the MI's use the top level soap methods.  The problem is that unless the WSDL explicitly defines the Type from the XSD (rather than using s:any or just sticking it in a string) then the fields are not visible to any maps.
I agree it's not ideal, but hey I didnt design the WSDL
I just want to know how to handle these 2 scenarios and map the s:any and string to the (known) XSD structure so it may be used as normal in a further map.
Cheers
James

Similar Messages

  • Handling Strings?

    I'm currently working with a database, in which some primary
    keys are varchars. I'm supposed to make an application that creates
    an "automatic" primary key for each new register, currently for
    instance, if the max(pk) is 100, the new one is 101. My question
    is, how to handle strings in a way in which if max(pk) is abx, I
    can do abx +1 to get aby - or similar. Any comments?

    Here is how I might approach the problem:
    1. See if the last set of values are numbers using a Regular
    Expression to look at the end of the string for numbers
    2 If so, strip out those numbers into a variable and the
    characters into a second variable
    2.1 Add 1 to the variable.
    2.2. Join the second variable with new first variable to get
    your new number
    3. If there are no numbers at the end, then append 1 to the
    end.

  • Error in method READ_CONTAINER_C when passing string to structure in Unicod

    Hi All,
    We are upgrading system from non-unicode to unicode.
    While passing a string to a structure ( MOVE RECEIVERS-RECEIVER TO RECEIVER_OBJECT, where
    RECEIVERS_RECEIVER = string
    RECEIVER_OBJECT = structure )
    following error is thrown :
    "RECEIVER_OBJECT" and "RECEIVERS-RECEIVER" are not mutually convertible in a unicode program.
    To resolve this error, I've used :
    CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C
    EXPORTING
    IM_VALUE = RECEIVERS-RECEIVER
    IMPORTING
    EX_CONTAINER = RECEIVER_OBJECT
    EXCEPTIONS
    ILLEGAL_PARAMETER_TYPE = 1
    others = 2
    But I observed the problem of inccorect values for numeric fields. For example suppose the string contains the value 'abc1234' and we use CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C to transfer this string to a structure suppose, S1 with 2 fields namely field1(3) type c and field2 type i. then field1 gets the correct value i.e. 'abc' but field2 gets incorrect value and not '1234'. Can anyone provide the resolution? Prompt reply will be highly appreciated.
    Thanks.

    There is no error in this method. The 'problem' is caused by the fact that you are combining character type and Type I in your parameter which has generic type CSEQEUNCE.
    It is advised that you  'copy' your data component by component in Unicode.

  • How to assign string to structure in unicode system R/3 4.7 ?

    Hi All,
    We are upgrading system from non-unicode to unicode.
    While passing a string to a structure ( MOVE RECEIVERS-RECEIVER TO RECEIVER_OBJECT, where
    RECEIVERS_RECEIVER = string
    RECEIVER_OBJECT = structure )
    following error is thrown :
    "RECEIVER_OBJECT" and "RECEIVERS-RECEIVER" are not mutually convertible in a unicode program.
    To resolve this error, i hv used :
    CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
    EXPORTING
    IM_VALUE = RECEIVERS-RECEIVER
    IMPORTING
    EX_CONTAINER = RECEIVER_OBJECT
    EXCEPTIONS
    ILLEGAL_PARAMETER_TYPE = 1
    others = 2
    While activating the code, following error message is thrown :
    "RECEIVER_OBJECT" is not type-compatible with formal parameter "EX_CONTAINER".
    Please help me out to solve this issue ..
    I need to know what I am missing here to make my code correct.
    Thanks in advance.
    Priya

    Hi All,
    My issue is resolved by using following class and method : CL_ABAP_CONTAINER_UTILITIES=> READ_CONTAINER_C  and passing 'string' in export parameter and structure in 'import' parameter.
    Cheers !!
    Priya

  • Converting any date string to GMT standard

    Hi All,
    I want to convert any date string to GMT standard.
    The date string may be like this.
    "Sat Sep 15 14:23:40 IST 2001"
    I have tried to change my defaultTimeZone .
    But I don't know why it's not working.
    Is there something to do with Locals?
    Can anyone please tell me the way to
    accomplish that ?
    Thanks in advance.
    Sujoy

    Java stores all the dates in GMT Format , considering the machines TimeZone Setting ....and also i guess date has methods like toGMTString() and toLocaleString() . To convert the date to GMT i guess u can just say toGMTString() of the date . If u have the stringified version of date
    just make a new Date(String) and then calling toGMTString of it .

  • Is there any limitation in xtract structure,while doing enhancement.

    is there any limitation in xtract structure, while doing enhancement.

    Hello Satish
    There is no limitation as such defined by SAP but let me teel you one thing, if your extract structure contains a lot of enhancement than it s better you go for using two extractor and then use Multiprovider for viewing all the data....basically when you enhance structure you customer exits which slower down the performence....
    For example you have 0FI_GL_4 extructure and want to see the payment detail by some SD attributes like sales office divisoion..bla bla bla...if small enhancement is there you can include these field in 0FI_GL_4 extract structure but if it is significant than you should create another extractor for getting SD related data and merge them in BW side in Multiprovider
    Thanks
    Tripple k

  • Event Handling in Tree structure

    Hi all,
      I have created an alv tree structure using the FM's 'RS_TREE_CONSTRUCT' and  'RS_TREE_LIST_DISPLAY'. Can anyone tell me how to handle double-click event with these FM's. My requirement is that i should display the tree structure of the Materials from Raw material till Finished materials and i have done that. After that, when i select one of these materials (Either double-click or provide some icon for each item and select that icon), i should be able to call an existing report with the data of the line selected.
    Any help will be greatly appreciable.
    thanks and regards,
    Raja Sekhar.

    Hi Raja..
    This post was from long back..
    And today i have same requirement.. So could you tell me that what you have done for this...
      Thanks in Advace

  • Can a structure be stored in a string using structure notation

    Is there any way to store a structure as a string, for
    example in a database, that could be converted runtime like
    javascript can with eval, something like <cfset
    tmp=Evaluate("{VarA=[1,2,3]}")>

    The closest you can come is if you want to serialize and
    deserialize the structure as a JSON object (JavaScript Object
    Notation).
    <cfscript>
    struct = StructNew();
    struct.key1 = "Key 1";
    struct.key2 = "Key 2";
    struct.key3 = "Key 3";
    myJSONStruct = SerializeJSON(struct);// converts the
    structure to a JSON string
    myStructBack = DeserializeJSON(myJSONStruct);
    </cfscript>
    <cfdump var="#myJSONStruct#" />
    <cfdump var="#myStructBack#" />
    Of course, you'll need to know how to use a JSON
    string/object in your JS for this to be helpful but this will
    convert your struct to a string representation and allow you the
    option to convert it back in CF, if needed.

  • Not getting any levels for mining structures in VS business intelligence studio

    I am trying to do data mining with a data warehouse I created. I have the columns Chrome title, chrome window handle, date, time and chrome memory. I want memory to be  predicted having the rest as input. But when I try to create mining structures,
    i am getting only 1 level all the time. When I click on 'suggest' button in data mining wizard i am always getting a score of 98 time and thats all. Rest are showing 0. I tried with many tables in my ware house but all behaving this way. Please help.
    mayooran99

    Thank you!  Is this correct?
     CREATE DATABASE AdventureWorksDW2008R2_data
    ON
    (FILENAME
    =
    'C:\SSIS Downloads\AdventureWorksDW2008R2_Data')
    FOR
    ATTACH_REBUILD_LOG
    I tried this and it gives me a cannot find file specified error, but my file IS located at
    C:\SSIS Downloads
    error is:
    Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file "C:\SSIS Downloads\AdventureWorksDW2008R2_Data". Operating system error 2: "2(The system cannot find the file specified.)".
    I will continue to play with it, thanks very much!
    Try as below,
    sp_attach_single_file_db 'AdventureWorksDW2008R2'
        ,'C:\SSIS Downloads\AdventureWorksDW2008R2_Data.mdf'
    Note: If you get any security issue then refer this link
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/232e4aaf-73cf-4eb8-9f6c-6a4fc91a6036/i-cant-attach-mdf-operating-system-error5
    Regards, RSingh

  • Handling Multi hierarchial Structure using  XSLT or Java Mapping in XI

    Hello Experts,
    I have an requirement wherein i have sender as IDOC and File as Receiver.My target File structure is multi hierarchial with parent level and many child sub level node.
    I tried to generate flat structure using graphical mapping by creating an intermediate structure and then mapping it to flat structure but that seems to be very complex for my scenario as there are many sub level at target structure..
    Is there any simple way of handlng these????
    Thanks

    Hi ,
    I tried to implement your solution ..I am able to convert my idoc to XMLusing XLST but i have a question that how to convert that XMP to flat file as XI Receiver File adapter understand only 1st level of hierarchy..It doesnt understand nested level of hierarchy which is in my case...
    Below is the xslt code which i have written:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <MT_SALES_PO_DATA_INBOUND>
                   <xsl:value-of select="WPUBON01/IDOC"/>
                   <xsl:for-each select="WPUBON01/IDOC/E1WPB01">
                        <E1WBBB01>
                             <Store_ID>A001</Store_ID>
                             <SYS_INVOICE_NO>
                                  <xsl:value-of select="substring(BONNUMMER,'3','15')"/>
                             </SYS_INVOICE_NO>
                             <Cashier_ID>
                                  <xsl:value-of select="KASSID"/>
                             </Cashier_ID>
                        </E1WBBB01>
                   </xsl:for-each>
                   <xsl:for-each select="WPUBON01/IDOC/E1WPB01/E1WPB02">
                        <E1WBB02>
                             <Transaction_Type>
                                  <xsl:value-of select="VORGANGART"/>
                             </Transaction_Type>
                             <Article_Description>
                                  <xsl:value-of select="QUALARTNR"/>
                             </Article_Description>
                             <ITEM_CODE>
                                  <xsl:value-of select="ARTNR"/>
                             </ITEM_CODE>
                             <xsl:for-each select="WPUBON01/IDOC/E1WPB01/E1WPB02/E1WBB03">
                                  <E1WBB03>
                                       <Condition_Type>
                                            <xsl:value-of select="KONDITION"/>
                                       </Condition_Type>
                                       <xsl:for-each select="">
                                            <E1WBB04>
                                                 <TAX_Code>
                                                      <xsl:value-of select="MWSKZ"/>
                                                 </TAX_Code>
                                                 <TAX_Amount>
                                                      <xsl:value-of select="MWSBT"/>
                                                 </TAX_Amount>
                                            </E1WBB04>
                                       </xsl:for-each>
                                  </E1WBB03>
                             </xsl:for-each>
                        </E1WBB02>
                   </xsl:for-each>
              </MT_SALES_PO_DATA_INBOUND>
         </xsl:template>
    </xsl:stylesheet>
    Any idea how do i convert these XML to falt file USing XSLT or File Receiver adapter in XI???
    Thanks

  • How to use Fault schema in WSDL for Error Handling in ALSB

    We are not able to view the fault element in our alsb flow under body variable and when we get the error in test console the error comes in bea fault schema,but we want the error in our own defined fault schema.Pls. guide.
    Below are the steps we followed to create a wsdl.
    Steps:
    1. We created a webservice project in workspacestudio and generated a wsdl.
    2. Then we have added a fault element manually in that wsdl.
    3. Now we have generated a webservice from that modified wsdl.
    4. Again we have generated a wsdl from webservice created in step 3.
    5. step 4 wsdl is tested and running well on server.
    When we try to configure that service as Proxy/Business service in ALSB and view the XPATH Expression Editor, we are not able to view Fault element under variable structures under body variable as shown below.But when we see the design view of our running wsdl in workspace studio it shows the fault element.How to get the fault element in variable body so that we can view the error in our logs in our defined Fault schema instead of BEA fault schema.WDSL is enclosed as an attachment.
    Thanks in advance

    Have you tried using the "Log" action in your pipeline proxy and log for $body and $fault. This will defin return the $body and $fault if these were parsed correctly

  • Most efficient way to handle Strings?

    I've heard that Strings are immutable, so you should use StringBuffers. For example, lets say you have an array of Strings called testArray...
    String matchMe = "";
    for (int i = 0 ; i < testArray.length ; i++)
        matchMe = resultOfSomeExpression;
        if (testArray.equals(matchMe))
    doSomeOperation;
    ...matchMe = resultOfSomeExpression will produce a new String object every time you go through the loop. So I've heard you're supposed to make matchMe a StringBuffer and use StringBuffer.replace() to reset it. That seems really cumbersome to me. I've been using StringBuffers as much as possible, but it requires a lot more code that just using Strings. What do other people do? What's the best procedure?
    Ethan

    The best procedure is what works best for you - but, what I suggest is that you use a String object when you don't plan on modifying it, and that you use a StringBuffer object if you're going to modify a sequence of characters or will construct strings dynamically. The rationale behind this is that behind the scene the compiler uses StringBuffer to handle concantenation of strings.

  • Need help in handling string of characters

    Hi,
    I am trying to scan string and separate different text based on business logic. For example:
    String = 'My bus comes at 999 F Street at 8 am'
    Now I need to scan the string and break the sentence into multiple words like:
    - First occurrence of number which is 999 goes into var1 variable.
    - Last occurrence of number which is 8 goes into var2 variable.
    I am wondering if this can be achieve with regular expression of any oracle internal function.
    Thanks,
    Edited by: skas on Jun 6, 2013 10:34 PM

    nkvkashyap wrote:
    or you can even try like this...
    with data(str) as
    (select 'My bus comes at 999 F Street at 8 am' from dual),
    data1 as
    (select regexp_replace(str, '[^[:digit:]]+', ' ') a from data)
    select regexp_substr(a,'[^ ]+',1,1) var1,regexp_substr(a,'[^ ]+',1,2) var2 from data1;
    Output:
    var1         var2
    999     8
    No need to make this complicated ;)
    SQL> with data(str) as
      2  (
      3   select 'My bus comes at 999 F Street at 8 am'
      4   from dual
      5  )
      6  select     regexp_sUBsTR(str, '\d+') VAR1,
      7     regexp_sUBSTR(str, '\d+',1,2) VAR2
      8  from data;
    VAR V
    999 8Edited by: jeneesh on Jun 7, 2013 11:11 AM
    Missed David's post.. This is the same as his post..

  • Problems in Handling String Variables with Pro*C

    I have a Pro*C program that select one record from a table. Although I don't have any NULL values in this record, I got the following error:
    ORA-01405: fetched column value is NULL.
    This problem only accurs when I try to retrieve[b] characters. Everything works fine when I handle numbers.
    I also tried to use indicators with the output value from the query. Another error was returned:
    ORA-03106: fatal two-task communication protocol error.
    I am not sure wheather the problem is from my program or some configuration of the environment or the client.
    The database (Oracle 9i) is in a remote machine, and I am using Oracle Client (9i) in my machine running Tru64 OS.
    The code that I am using is as follows:
    EXEC SQL BEGIN DECLARE SECTION;
    int db_classId;
    char db_neId[101];
    EXEC SQL END DECLARE SECTION;
    EXEC SQL SELECT class_id, ne_id INTO :db_classId, :db_neId
    FROM NE_ROUTE WHERE ne_id like 'BA%';
    Can anyone help on this issue? Is it something to do with NLS_LANG parameter?
    I just want to note down that all queries work fine with SQL Plus

    Hi,
    I used different select statements as you suggested, but I still get the same error. I also changed the statement to make sure it doesn't return a NULL value.
    I tried the following cases
    1. EXEC SQL SELECT 'name' INTO :db_neId FROM DUAL;
    and I get >> ORA-01405: fetched column value is NULL.
    2. EXEC SQL SELECT NVL('name','name2') INTO :db_neId FROM DUAL;
    and I get >> ORA-01405: fetched column value is NULL.
    3. EXEC SQL SELECT 'name' INTO :db_neId :ind_ne FROM DUAL;
    and I get >> ORA-03106: fatal two-task communication protocol error.
    I haven't try to change the precompiler options yet. The program is very simple as I only use to test the connection with the database. I am just trying to retieve any character from the database.
    Any suggestions?

  • Any one provide logical structure of the database

    Hi,
    Can any one tell me the logical structure of the database.
    Thanks,

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref53

Maybe you are looking for

  • SQL*PLUS console not coming back when create a tablespace in ORACLE RAC11g

    Hi all, I have run a create command in oracle RAC 11g system (2 nodes, ASM) by SQL*PLUS, every datafile for this tablespace is 1.5GB, I want to create 6 tablespace at the first: 1. It run successfully for the first tablespace , it toook 4-5 minutes t

  • How to change Purch Org in table T001W for STO

    Hi, In the Production System wrong Purch. Org is appearing for the Plant Vendor Assignment in table T001W. Can someone pls tell how this incorrect Purch. Org can be changed to the correct one? Thanks

  • Please help me regarding VAR customer create new message in work center

    Hi, guru I have encountered with a problem regarding, for example, when VAR customer 'X' create new message in work center and specify message processor to partner no '1'  (partner no 1 has employee role with username 'A' in BP) but when username 'A'

  • Css2 question

    I just took a class for dreamweaver but it was useless, cause they didn't mention anything I needed help with. So i was wondering if anyone knew any good sites to learn on how to use css2. I need to use it very minimaly, as all I'm trying to figure o

  • Default Purchasing group in Purchase Requistion

    Hi, I need to default the purchasing group in the purchase requistion item. I found a BADI ME_PROCESS_REQ but this is internal use only for sap. Regards. Khusro Habib