Consuming Web Services in SSIS Script Task

Hello
Sorry for my English, I' ll try to explain my problem.
I am new to SSIS. Using this article http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/01/28/consuming-web-services-in-ssis-script-task.aspx I have tried to consume web service.
1. I have created proxy class using VS Command Prompt
2. A have added proxy class to Script Task
3. But when I  want to create the instance of the proxy class, it can be accessed from the ScriptMain.cs. 
I will be very pleased for the help!

perhaps you missed this step:
--> Modify the code and add Credentials before calling the web method:
Public
SubMain()
Dim
ws As NewService1
ws.Credentials =
New System.Net.NetworkCredential("user name",
"password",
"domain name")
MsgBox("Square
of 2 = "& ws.Square(2))
Dts.TaskResult = Dts.Results.Success
End
Sub
Arthur
MyBlog
Twitter

Similar Messages

  • Calling a restful web service from a script task

    Hi.  I'm weak in c# but am looking to accomplish this...
    I want to call a RESTful web service from an ssis script task.  I don't want to create a web service so I'm hoping there is some publicly available one I can practice with before our web team provides me with the service I'll eventually use.  Can
    the community provide an example?  I wish I had more but my knowledge is very limited except for using ssis in more sql centric apps.  It would be great if I could exercise both a get and put verb but I understand i'll be lucky if I can even get
    a get to work. 
    Here is an example of a get I found on the web but I don't know if its a viable candidate for me to practice with from my package...
    using System;
    using System.IO;
    using System.Net;
    using System.Text;
    // Create the web request
    HttpWebRequest request = WebRequest.Create("http://developer.yahoo.com/") as HttpWebRequest;
    // Get response
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    // Get the response stream
    StreamReader reader = new StreamReader(response.GetResponseStream());
    // Console application output
    Console.WriteLine(reader.ReadToEnd());
    and in the same article an example of a put ...
    // We use the HttpUtility class from the System.Web namespace
    using System.Web;
    Uri address = new Uri("http://api.search.yahoo.com/ContentAnalysisService/V1/termExtraction");
    // Create the web request
    HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
    // Set type to POST
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    // Create the data we want to send
    string appId = "YahooDemo";
    string context = "Italian sculptors and painters of the renaissance"
    + "favored the Virgin Mary for inspiration";
    string query = "madonna";
    StringBuilder data = new StringBuilder();
    data.Append("appid=" + HttpUtility.UrlEncode(appId));
    data.Append("&context=" + HttpUtility.UrlEncode(context));
    data.Append("&query=" + HttpUtility.UrlEncode(query));
    // Create a byte array of the data we want to send
    byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());
    // Set the content length in the request headers
    request.ContentLength = byteData.Length;
    // Write data
    using (Stream postStream = request.GetRequestStream())
    postStream.Write(byteData, 0, byteData.Length);
    // Get response
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    // Get the response stream
    StreamReader reader = new StreamReader(response.GetResponseStream());
    // Console application output
    Console.WriteLine(reader.ReadToEnd());
     

    Hi
    db042190,
    These kinds of operations are commonly found outside the SSIS section of the forum, you just need to "borrow" the code and wrap into the Script Task. And based on what you see you are on the right tracks.
    One thing you need to be aware of: in production such RESTfull call usually lead to a fiasco for the machine residing in some kind of DMZ or Firewall rules prohibiting these methods or you need a proxy account to run the package and you face unbeggable admins
    who resist to relaxing security.
    My suggestion is to go the easy route: write the app up as a console, standalone app - it will be easier to debug and there will be complete examples of them in abundance on the web.
    Arthur
    MyBlog
    Twitter

  • UCCX - Consuming Web Services

    Hi All,
    I am looking for some advice in regards to consuming web services via UCCX scripting. In the past i have been doing so successfully in our environment by using document steps and Xpath expressions for both SOAP and REST web services that were configured to allow an HTTP GET request (tomcat running on apache server to expose public methods written in Java).
    Our company is in the midst of a Microsoft Dynamics 2012 (r2)  implementation and I have the task of establishing communication with AX in order to pass information back and forth. Our consultants with dynamics have setup a test web service using AIF, but it seems that these services require authentication. Currently the test web service is using NTLM authentication and exposed via SOAP. Apparently it is not possible to use HTTP GET for these web services.
    This means i had to write java code in Set steps to communicate with the SOAP services. I was able to successfully do this for some of our own web services using SOAP. however i am having problems with the AX test web service due to the authentication. (Thanks to Gergely Szabo, as i used some of his code found here: https://supportforums.cisco.com/document/97736/uccx-8x-really-simple-soap-client-no-custom-jar )
    I am hoping someone has some experience with having consumed AIF web services via Java or at least Java written within a UCCX script. Or if someone has been able to implement authentication and can provide some details for how that works? I don't even know if i can authenticate via NTLM from UCCX scripts due to it being a windows authentication protocol and not linux based.
    Any thoughts or ideas would be appreciated!
    Thanks,
    Kevin.

    Hi,
    Thus far I have been unsuccessful in my attempts to communicate with this particular web service. The consults did create another service using Basic HTTP Auth and I was able to consume and use the service using SOAPUI just fine.
    However, my soapResponseString code (small tweak of Gergely's code) is not working. After 2-3 minutes of sitting on that step in the CRS Editor my stacktrace exception is thrown and shows "Connection timed out". This is way past the time for the 5000ms read timeout, so I imagine the initial communication is successful but then eventually times out due to not returning a response?
    I tried to mimic the headers SOAPUI uses from it's HTTP Log, hence the number of urlCon.setRequestProperty lines..
    CODE for Set soapResponseString below:
    // create a ByteArrayOutputStream - this is actually a buffer
    // we are going to use to store the response coming from the SOAP server
    java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
    // this is quite unnecessary: assigning the value of the soapRequest (still holding our XML document)
    // to another variable, named content, type String; but anyway, it's just cleaner
    String content = soapRequest;
    // specify a timeout - 5000 milliseconds - if the web server does not start sending back
    // anything within this timeframe, an exception will be raised
    int readTimeout = 5000;
    try {
    // a new URL, which is the soapServiceEndpoint variable value (http://ip:port/ etc):
         java.net.URL url = new java.net.URL(soapServiceEndpoint);
    // creating a HTTP connection to the above URL:
         java.net.HttpURLConnection urlCon = (java.net.HttpURLConnection) url.openConnection();
    // setting some important header parameters, first of all, content length, this is most likely expected
    // by the SOAP server
         urlCon.setFixedLengthStreamingMode(content.length());
    // setting the timeout:
         urlCon.setReadTimeout(readTimeout);
    // we tell Java we will do input (in other words, we will read):
         urlCon.setDoInput (true);
    // we tell Java we will do output (in other words, we will send):
         urlCon.setDoOutput (true);
    // we tell Java not to cache:
         urlCon.setUseCaches (false);
    // we are using HTTP POST
         urlCon.setRequestMethod("POST");
    // finally, we set the Content-Type header,
    // this way we are telling the SOAP server we are sending an XML, using the UTF-8 charset
         urlCon.setRequestProperty("Content-Type","text/xml;charset=UTF-8");
    // here we are sending our Basic Auth - authStringEnc is a base64 encoded user:pass credential that's initialized in a previous step
      urlCon.setRequestProperty("Authorization","Basic " + authStringEnc);
    //set some other header information for the request required by the AIF Web Service 
      urlCon.setRequestProperty("SOAPAction","http://tempuri.org/myService/getSiteId");
      urlCon.setRequestProperty("Host", "myServer.myDomain.com:8080");
      urlCon.setRequestProperty("Connection","Keep-Alive");
      urlCon.setRequestProperty("User-Agent","Java/1.6.0_29");
      urlCon.setRequestProperty("Accept-Encoding","gzip,deflate");
    // opening an OutputStream (this is a one-way channel towards the SOAP server:
         java.io.DataOutputStream output = new java.io.DataOutputStream(urlCon.getOutputStream());
    // we write the contents of the content variable (= soapRequest = XML document):
         output.writeBytes(content);
    // telling Java to flush "speed up!" and then close the stream:
         output.flush();
         output.close();
    // now getting the InputStream (getting a one way channel coming from the SOAP server):
         java.io.DataInputStream input = new java.io.DataInputStream(urlCon.getInputStream());
    // buffered read from the InputStream, buffer size 4Kilobytes (= 4096 bytes):
    // and the buffer is always written to the other buffer, named baos, that we specified
    // on the first line of this block of code
         int bufSize = 4096; // buffer size, bytes
         byte[] bytesRead = new byte[bufSize];
         int bytesReadLength = 0;
         while(( bytesReadLength = input.read( bytesRead )) > 0 ) {
             baos.write(bytesRead,0,bytesReadLength);
         } //while block ends here
    // closing the InputStream:
         input.close();
    // closing the baos buffer
         baos.close();
    } catch (Exception e) {
    // again, if an error occurs, let's just send the stack trace to stdout (stdout.log)
    // and then return null or can we can return e.getMessage() to see the exception caught inside the script
        e.printStackTrace();
     return e.getMessage();
        //return null;
    } // try..catch block ends here
    // construct a new String, and return that to the CRS script:
    return new String(baos.toByteArray());
    } // closure ends here

  • Consuming Web Services in 11.2 does not work (UTL_DBWS)

    Hello
    i read some documents for consuming web services on the internet , but i get an error when i call add_numbers function as follows:
    i connected on WSUSER , then
    SQL> select add_numbers(1,3) from dual;
    The Error message is:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: java.lang.ExceptionInInitializerError
    ORA-06512: at "WSUSER.UTL_DBWS", line 193
    ORA-06512: at "WSUSER.UTL_DBWS", line 190
    ORA-06512: at "WSUSER.ADD_NUMBERS", line 25"
    I use the following steps to setup the UTL_DBWS :
    1-     Create new user 'WSUSER'
    2-     Run the UTL_DBWS scripts ( utl_dbws_decl.sql , utl_dbws_body.sql) on WSUSER.
    3-     Execute this command
    loadjava -u scott/tiger -r -v -f -genmissing dbwsclientws.jar dbwsclientdb11.jar
    4-     Log in as sys and grant these privileges to our new user:
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxySet','write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxyHost', 'write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','http.proxyPort', 'write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission','getClassLoader','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.net.SocketPermission','*','connect,resolve');
    execute dbms_java.grant_permission('WSUSER','SYS:java.util.PropertyPermission','*','read,write');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission','setFactory','');
    execute dbms_java.grant_permission('WSUSER','SYS:java.lang.RuntimePermission', 'createClassLoader', '' )
    5-     Create add_numbers function on wsuser to test utl_dbws:
    CREATE OR REPLACE FUNCTION add_numbers (p_int_1 IN NUMBER,
    p_int_2 IN NUMBER)
    RETURN NUMBER
    AS
    l_service UTL_DBWS.service;
    l_call UTL_DBWS.call;
    l_wsdl_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_service_qname UTL_DBWS.qname;
    l_port_qname UTL_DBWS.qname;
    l_operation_qname UTL_DBWS.qname;
    l_xmltype_in SYS.XMLTYPE;
    l_xmltype_out SYS.XMLTYPE;
    l_return NUMBER;
    BEGIN
    l_wsdl_url := 'http://www.oracle-base.com/webservices/server.php?wsdl';
    l_namespace := 'http://www.oracle-base.com/webservices/';
    l_service_qname := UTL_DBWS.to_qname(l_namespace, 'Calculator');
    l_port_qname := UTL_DBWS.to_qname(l_namespace, 'CalculatorPort');
    l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'ws_add');
    l_service := UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_qname);
    l_call := UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => l_port_qname,
    operation_name => l_operation_qname);
    l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
    <ws_add xmlns="' || l_namespace || '">
    <int1>' || p_int_1 || '</int1>
    <int2>' || p_int_2 || '</int2>
    </ws_add>');
    l_xmltype_out := UTL_DBWS.invoke(call_Handle => l_call,
    request => l_xmltype_in);
    UTL_DBWS.release_call (call_handle => l_call);
    UTL_DBWS.release_service (service_handle => l_service);
    l_return := l_xmltype_out.extract('//return/text()').getNumberVal();
    RETURN l_return;
    END;
    6-     Test the function
    Select add_numbers(1,2) from dual
    on the test i get the error message :
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.IllegalAccessException: java.lang.ExceptionInInitializerError
    ORA-06512: at "WSUSER.UTL_DBWS", line 193
    ORA-06512: at "WSUSER.UTL_DBWS", line 190
    ORA-06512: at "WSUSER.ADD_NUMBERS", line 25
    anyone have an idea to resolve this error .
    thanks alot

    Hi.
    Looking at the code, it seems it is my article you are asking about.
    http://www.oracle-base.com/articles/10g/utl_dbws10g.php
    I've just run through it on an 11.2 instance and it works fine for me.
    Make sure your server has access to the Internet and make sure the java classes are loaded successfully.
    Cheers
    Tim...

  • How to consume Web Service in ABAP WebDynpro

    Hi
    I want to know the entire details about how to consume Web Service in WebDynpro application.
    regards
    Piyush

    hI piyush,
    Have a look at this Blog by Thomas Jung.
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap
    on consuming webservies thru webdynpro ABAP
    Cheers
    Mary

  • Best practice for consuming web services

    Hi
    we are consuming web service in orchestration by "Add Generated Item".By using this option it creates 1 orch,1xsd file and some bindings.
    we have different projects for schemas,maps and orchestration under our solution in visual studio.
    Now i need to know that what will be the best practice for consuming web service in orchestration i mean in which project should i use "add generated item" (in orchstration project or in schemas project) coz it generates both 1 orch and 1
    schema.
    thanks

    From a service orientation perspective you should abstract the service artifacts from the other artifacts. Otherwise it will be very difficult to update the service interface without affecting the other artifacts. For example you don't want to have to redeply
    your entire application if only one field changes in the service you consume.
    So I typically generate the items, remove the unnecessary stuff, and put them in a separate project.
    Depending on the control you have over the services you want to consume, it would even be better to create another layer of abstraction. By that I mean create your own interface (schema) and map that one to the one the service exposes. This basically
    is only necessary if you consume external services that are beyond your control. By abstracting the interface it exposes, you limit the impact of changes of that interface on the rest of your system. All changes are abstracted behind your own interface.
    If you consume internal services, you can probably control the way the interface is defined. In a service oriented world all internal services expose a well known interface, based on the domain objects you have within your organisation.
    Jean-Paul Smit | Didago IT Consultancy
    Blog |
    Twitter | LinkedIn
    MCTS BizTalk 2006/2010 + Certified SOA Architect
    Please indicate "Mark as Answer" if this post has answered the question.

  • Windows authentification while consuming web service from ABAP

    Hi All,
    We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
    This one was working fine. Now we have added  windows user authentification to access this service.
    Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
    If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
    Could you please let me know how to handle this.
    Regards
    Vikram

    The dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications.  There is no prompt produced when running in Web Dynpro.  If possible assign a generic user within the logical port definition and this will be used automatically by all users.

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • Consuming web service in PI 7.3 and creating file

    Hi,
    I need to consume web service in PI 7.3 and create file from response. I have WSDL for the web service. Now confused about datatype/message type. Is there any document/note to follow?
    thanks,
    7Z

    I need to consume web service in PI 7.3 and create file from response. I have WSDL for the web service. Now confused about datatype/message type. Is there any document/note to follow?
    ==>
    Hi,
    There are 2 ways you can do this :-
    If your sender is a file and receiver is a webservice and you want to map the response back to the file then :-
    Sol 1 :- Async-Sync Bridge using RequesResponse Oneway bean
    Sender File channel ---> Soap Receiver Channel
    Soap Receiver Channel brings the response back to the File Receiver Channel.
    Now this File Receiver Channel should be called inside the Sender File Channel using the above bean.
    Data Type :
    Src - File struc to SOAP request (WSDL used as an external definition)(mapping 1)
    SOAP response(WSDL used as an external definition) to Tgt File Struc (mapping 2)
    Sol 2 :- Async Scenario
    Make a Sender File Channel --> use SOAP lookup channel (pass the request payload through the SOAP receiver channel) --> Map the response back to the File using File Receiver Channel.
    Data Type:
    Src - File struc to Tgt File Struc (mapping 1). Since you are passing the request payload through SOAP lookup in the UDF itself.
    ======================================================================

  • Consuming Web Services with ABAP - WSDL

    Hi All,
    I Want to consume web service in abap, i found lot of documents,Here i am having data in the internal table i need to pass
    it to wsdl file, The Web Service or Proxy generates a WSDL file. So this WSDL file can be consumed on ABAP Front and Encrypt the Data that is to be sent to the Banks.
    I found the input and output, Where i can find the method generated or we need to create it
    CALL METHOD io_clientproxy->XXXXXXXXXXXX
    please let me have your valuable ideas
    Thanks in advance,
    Arun.

    Hi Miguel,
    I have not heared about SPROXY, Here i found some code,which calls a web service method and where it is from.
    when i double click on my proxy it shows me some method.IF_PROXY_BASIS_INTERNAL~CREATE_FRAMEWORK
    this is the one web service method. and i meed to pass the internal table data to WSDL file.
    *-- create web service proxy class instance
    TRY.
        CREATE OBJECT io_clientproxy
          EXPORTING
            logical_port_name = 'LP4'.
      CATCH cx_ai_system_fault.
    ENDTRY.
    *-- call web service methods
    TRY.
        CALL METHOD io_clientproxy->get_airport_information_by_is
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault.
      CATCH cx_ai_application_fault.
    ENDTRY.
    *-- text processing
    output_string = output-get_airport_information_by_is.
    REPLACE ALL OCCURRENCES OF
        '<' IN output_string WITH '<' .
    REPLACE ALL OCCURRENCES OF
    '>' IN output_string WITH '>' .
    REPLACE ALL OCCURRENCES OF
    'xmlns=' IN output_string WITH 'xmlns:xsl=' .
    *-- parsing
    TRY .
        CALL TRANSFORMATION ('Y_AIRPORT_XML2ABAP')
                SOURCE XML output_string
                RESULT     outtab = outtab.
      CATCH cx_xslt_exception INTO xslt_err.
        DATA: s TYPE string.
        s = xslt_err->get_text( ).
        WRITE: ': ', s.
        STOP.
    ENDTRY .
    Regards,
    Arun.

  • NameSpace for XML But in SSIS Script Task

    Hello, 
    I am creating an xml Document that pulls information from a staging table in sql. However the issue I am having is that i need  a namespace or a start element to handle a ':' but i keep getting its not a hexadecimal blah blah. 
    I feel like I have tried everything for this. 
    So maybe someone can help me  
           writer.WriteStartDocument()
     writer.WriteComment("edited with XMLSpy v2010 rel. 3 (http://www.altova.com) by MESMERiZE (MSM)")
    writer.WriteComment("Samply XML file generated by XMLSpy v2010 rel. 3 (http://www.altova.com)")
    So i have the comments show up fine but then i need it to show 
    <mssext:sendWarrantyContractBatch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mssext="http://jlrint.com/mss/message/sendwarrantycontract/1" xsi:schemaLocation="http://jlrint.com/mss/message/sendwarrantycontract/1
    FRS_000143-SendWarrantyContractMessages.xsd">
     I can get the websites and all the xmlns to show up fine that is not the issue the issue is the mssext:sendWarrantyContractBatch 
    IS there any way to get the Colon to show up ?? 
    Remember this is in a ssis script task with visual basic 2008 code 

    check this link. it has a method specified in the comments section
    http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/create-xml-files-out-of-sql-server-with/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • To consume web service in ABAP is it required that server should be XI.

    Hi ,
    I am trying to connect to a webservice from netweaver 7.0 systemand it gives an error " Not configured as integration engine". Is it required to have integration engine to consume web service.
    Sanjay

    Hi Sanjay
    You can consume webservices in ABAP but its better to use XI in mid to avoid point to point communication. Using XI you can have a central hub for all services you consume or publish
    Check this link as well
    BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    Thanks
    Gaurav

  • Running a Select query against multiple sql servers using SSIS script task.

    Hi Guys,
    I need to fetch data from multiple sql servers using  SSIS scirpt task inside a foreach container.
    is there anyway i can build dynamic sql connections using ssis variables inside SSIS script task in each loop
    Please guide me or refer any blogs so that i will try..
    Thanks in advance.

    Your only options is using .net code, then it will be no different than using a console app in a loop.
    using (SqlConnection connection = new SqlConnection(connectionString))
    connection.Open();
    Console.WriteLine("ServerVersion: {0}", connection.ServerVersion);
    Console.WriteLine("State: {0}", connection.State);
    and so forth for each connection string
    the connection string would come from the ForEach loop
    Arthur My Blog

  • Code for consuming web services in ABAP

    *& Report  ZVM_GET_CITY_TIME
    REPORT  zvm_get_city_time.
    PARAMETERS:
      p_city TYPE zget_city_time_soap_in-city.
    DATA:
      cl_proxy TYPE REF TO zco_time_service_soap,
      input    TYPE zget_city_time_soap_in,
      output   TYPE zget_city_time_soap_out,
      systerr  TYPE REF TO cx_ai_system_fault,
      w_error  TYPE c.
    TRY.
        CREATE OBJECT cl_proxy
          EXPORTING
            logical_port_name = 'ZCO_TIME_SERVICE_SOAP'.
      CATCH cx_ai_system_fault.
        CREATE OBJECT systerr.
        WRITE:/ 'Error in creating object - ', systerr->errortext.
    ENDTRY.
    TRY.
        input-city = p_city.
        CALL METHOD cl_proxy->get_city_time
          EXPORTING
            input  = input
          IMPORTING
            output = output.
      CATCH cx_ai_system_fault.
        CREATE OBJECT systerr.
        WRITE:/ 'Error in calling the method - ', systerr->errortext.
        w_error = 'X'.
    ENDTRY.
    CHECK w_error NE 'X'.
    SKIP.
    WRITE:/ 'The current time in ', p_city, ' is ',
            output-get_city_time_result.

    <i> is there any other way to consume web services in ABAP</i>
    you can use cl_http_client class to make your program to act as http client and post the soap message too webservice. This way you dont need to generate proxy, but you should know the soap message format.
    Regards
    Raja

  • Problem at Consume WEB Service in ABAP

    hello!!
    I tell them my problem, is to create a web service from the SE80,  which could be used properly.
    Then there was a change of server, which migrated to the developments and the web service is recreation, but this can not be consumed.
    now I need help, is where do I indicate that the basis so that they can return to consume web services, what services or settings should be activated.
    any suggestion or help are welcome.
    The ECC system is a 5 AS ABAP only.
    from now, I appreciate any help or guidance I can get.

    What is the problem? Are all the services active in SICF for web services and how is the web service being consumed is it through a wsdl file ?

Maybe you are looking for