WebService Action Block Return Type

Hi ,
   I would like to know on xMII 11.5 RC2 if the Webservice can only return
   it's XML data in a standard Iluminator Row Set structure or is there a way
   that one can get the return XML in a cutom format i.e.
    <ROOT>
          <MYDATA>blah blah</MYDATA>
    <ROOT>
Regards

On xMII XML format via the WebService (WSDLGen) mechanism, but you can return any xMII XML format via the Runner mechanism.
URL is something like: /Lighthammer/Runner?Transaction=YourTransaction&OutputParameter=DesiredXMLOutputParameter
There are more complex techniques that can be used to have xMII emulate any webservice with any inputs and outputs, but those involve creation of custom WSDL files and are probably a bit lengthy for an SDN post.
- Rick
Message was edited by:
        Rick Bullotta

Similar Messages

  • Unable to load webservice using webservice action block

    Hi,
    I am trying to call a webservice using xMII 11.5 .My webservice url is http://machinename/Test/Service1.asmx?wsdl.This webservice is invoked using internetexplorer.When I try to configure this using webservice action block I am getting the error message stating "SOAP service could not be loaded.White spaces are required between public id and system id".
    Can anyone help me on this issue.

    Hi,
    You go through the following threads:
    https://forums.sdn.sap.com/click.jspa?searchID=14545521&messageID=5310227
    https://forums.sdn.sap.com/click.jspa?searchID=14545521&messageID=5765282
    https://forums.sdn.sap.com/click.jspa?searchID=14545521&messageID=5803591
    Hope this will help you.
    Thanks,
    Manisha

  • Stub generated in Jdev9i for webservice with 'Vector' return type

    Hi,
    In the OAF page that I am developing, I am trying to consume a web service generated in SAP PI using Jdeveloper. My Jdeveloper version is 9.0.3.5(I need to use this version since I need to deploy the OAF page in EBS11i). The stub generated based on the WSDL is given below.
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Tue Jan 25 16:12:55 IST 2011
    * WSDL URL: file:/C://Working/XXXXXXX/RegConsComplaint_OB.wsdl
    public class RegConsComplaint_OBServiceStub
      public RegConsComplaint_OBServiceStub()
        m_httpConnection = new OracleSOAPHTTPConnection();
      public static void main(String[] args)
        try
          RegConsComplaint_OBServiceStub stub = new RegConsComplaint_OBServiceStub();
          // Add your own code here.
        catch(Exception ex)
          ex.printStackTrace();
      public String endpoint = "http://XXXXXX:8000/sap/xi/...../RegConsComplaint_OB";
      private OracleSOAPHTTPConnection m_httpConnection = null;
      private SOAPMappingRegistry m_smr = null;
      public Vector RegConsComplaint_OB(Element requestElem) throws Exception
        URL endpointURL = new URL(endpoint);
        Envelope requestEnv = new Envelope();
        Body requestBody = new Body();
        Vector requestBodyEntries = new Vector();
        requestBodyEntries.addElement(requestElem);
        requestBody.setBodyEntries(requestBodyEntries);
        requestEnv.setBody(requestBody);
        Message msg = new Message();
        msg.setSOAPTransport(m_httpConnection);
        msg.send(endpointURL, "http://sap.com/xi/WebService/soap1.1", requestEnv);
        Envelope responseEnv = msg.receiveEnvelope();
        Body responseBody = responseEnv.getBody();
        return responseBody.getBodyEntries();
    }I am wondering whether I will be able to use this stub generated by Jdeveloper since the input type is 'Element' and return type is 'Vector'; while in the Jdeveloper documentation the supported "primitive XML Schema types and arrays of primitive XML Schema types as parameters and return values for web services" do not include either of the two.
    Regards,
    Sujoy

    Hi Sujoy
    I have been having big problems consuming microsoft sharepoint webservices using jDeveloper 9i.
    Problems with jdk version compatability with jDev and NTLM authentication (Sharepoint).
    so switching to db connection using utl_http.
    Can you pls send me the code set for reference at [email protected]
    thanks.
    Regards
    Sachin

  • Calling Enterprise Services through xMII Web Service action block

    Hi All,
    I'm calling some Enterprise Service through xMII Web Service action block.
    After providing URL and user credentials, I'm getting error "SOAP Service could not be loaded: The element type 'p' must be terminated by the matching end-tag '</p>'."
    Can anyone point out what might be the reason ?
    Thanks,
    Sumit

    If you haven't already, try using the browser from the xMII server machine rather than your own (client).
    The error that you recieve usually means that instead of a WSDL an HTML is being returned when you use the WebService action block.
    Possible reasons - as Jeremy pointed out - improper credentials or some error with the webservice itself.
    Another thing you can possibly try out - use some web service analyser to access the webservice . There's one that goes by the name StrikeIron which is a freeware.Pretty neat tool.

  • Error when using Web service Action Block.

    Hi All
    I am calling recursive function in my transaction.Means same transaction i am calling inside a transaction.I have used the Webservice Action block to call the transaction.
    I have passed the parameters whatever is requied.
    But I am getting error when i am executing the transaction:
    "Error invoking Webservice Action: Status(500):Internal Server Error".
    Please suggest me on this.
    Thanks in advance.
    Regards,
    Manisha

    Hi Vishal
    This transaction is trying to achieve the recursive function.
    I want to call the same transaction within a transaction.So i have used WebService action block to call the transaction.
    I have passed the input parameters whatever required.I have given loginName and password as my server login name and password.But when i am executing the transaction, I am getting the following error:
    "Internal Server Error"
    If any idea please suugest me.
    Thanks,
    Manisha

  • Getting a error invoking web service action  block

    HI
    I am first time using web service action block in xmii. I am using it for executing my transaction . But it is giving error stating that
    Error invoking web service action block. I dont know please help me out?

    Hi Mike,
    I am using xMII - 11.5 version and with java 1.6.0_07. In My system i have installed service pack 3. When ever i use webservice action block and execute it, It gives error stating .
    [INFO ]: Execution Started At: 11:07:16
    [DEBUG]: 00000.01600 Begin Transaction 'TMP83E3D064-F6E8-4E3D-647F-6CE6B41C9E83'
    [DEBUG]: 00000.01600 Begin Sequence Sequence : ()
    [DEBUG]: 00000.01600 Begin Action WebService_0 : ()
    [ERROR]: Error Invoking Web Service Action: null
    [ERROR]: ACTION FAILED: End Action WebService_0 : ()
    [DEBUG]: 00001.42200 Begin Sequence Sequence_0 : ()
    [DEBUG]: 00001.42200 Begin Action Tracer_0 : ()
    [INFO ]: <?xml version="1.0" encoding="UTF-8"?><XacuteResponse xmlns="http://www.lighthammer.com/Xacute"><Rowsets DateCreated="2000-01-01T00:00:00" EndDate="2000-01-01T00:00:00" StartDate="2000-01-01T00:00:00" Version=""><FatalError/><Messages><Message/></Messages><Rowset><Columns><Column Description="" MaxRange="0.00" MinRange="0.00" Name="" SQLDataType="0" SourceColumn=""/></Columns><Row><Output/></Row></Rowset></Rowsets></XacuteResponse>
    [DEBUG]: 00001.43700 End Action Tracer_0 : ()
    [DEBUG]: 00001.43700 End Sequence Sequence_0 : ()
    [DEBUG]: 00001.43700 End Sequence Sequence : ()
    [DEBUG]: 00001.43700 End Transaction 'TMP83E3D064-F6E8-4E3D-647F-6CE6B41C9E83'
    [INFO ]: Execution Completed At: 11:07:17 Elapsed Time was 1421 mS
    please help me out .

  • Define the WebService action URL as a parameter

    Hi there,
    I would like to ask a question related to the use of the WebService action block.
    I've been using this action with no major issues, but would like to set the WSDL URL to be defined by a parameter. It could be in the shared memory, in the global properties, or somewhere else that is centralized. I've done some testing on  this, but had no success...
    Every real world project will have at least three different environments (DEV, QA and PRD), each with different settings for the web services that it must connect to, so I believe that a lot of people have dealt with this kind of problem.
    Please give me your insight on how to do that.
    I'm hoping not to get the answer: go to each action block and change the URL manually....
    Thanks!

    Sorry Jamie,
    which is exactly the action parameter to which i can link dinamically different soap address?
    I'm using 12.0.11 build (21) and I can see in the action these parameters:
    WSDLBaseUrl
    WSDLURL
    Username
    Password ecc..
    Should I pass the link to the WSDL or what?
    For example I have 3 web services on different machine (web services are identical), only deployed in different machines
    Should I pass to WSDLBaseUrl, after importing the structure
    "http://hostname:port/SapImport/WebService.asmx?WSDL"
    or something else?
    Thanks
    Mauro

  • WebService action in BLS

    I exposed a BLS transaction using
    http://<server:port>/XMII/WSDLGen/<transaction name>.
    Is it possible to communicate with this transaction through a WebService action  block in another transaction.?
    I have successfully used the WebService action block to communicate with a Java WebService hosted in axis2 environment.
    Please help
    Thanks and Regards,
    Rajath

    Thanks Michael
    I have a simple transaction which writes a file in to some location. I exposed this transaction using WSDLGen. And configured a BLS WebService action using the above URI in another transaction.
    When i executed the second transaction, i got an error : "Error invoking WebServer Action:null".
    I have given the sufficient security permissions to both the transactions and had also give the login credentials with admin privilege. What could be wrong???
    Any help?
    regards,
    Rajath

  • How to create a webservice with return type File

    Hi All,
    I have a class Letter and I am trying to expose viewReport as webservice.
    In Jdeveloper -> Business teir -> webservices -> Java web service and I have selected my method i.e. viewReport
    Now it throws error "The return type java.io.File of method viewReport can not be serialized into XML"
    I unserstood the issue but How can I achive this in JDeveloper
    public class Letter {
    public Letter() {
    super();
    public File viewReport(String name) {
    File folder = new File("C:\\APPS\\root\\pdf\\10052011");
    File[] listOfFiles = folder.listFiles();
    return listOfFiles[0];
    }

    You can't as File is nor serializable. It won't make sense as you would try to give a handle to a file on the server hosting the service to a remote system.
    Can you explain the use case in more detail?
    Timo

  • Webservice return type

    Dear All,
    I have a web service with return type as array.
    I need to return dynamic array.Is there any alternate way to this.
    Could anyone help me regarding this.
    Thanks & Regards
    sara

    On xMII XML format via the WebService (WSDLGen) mechanism, but you can return any xMII XML format via the Runner mechanism.
    URL is something like: /Lighthammer/Runner?Transaction=YourTransaction&OutputParameter=DesiredXMLOutputParameter
    There are more complex techniques that can be used to have xMII emulate any webservice with any inputs and outputs, but those involve creation of custom WSDL files and are probably a bit lengthy for an SDN post.
    - Rick
    Message was edited by:
            Rick Bullotta

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • Web Service Action Block

    I'm attempting to call a web service that we have developed. I'm able to configure the webservice block without any problems. However, when I attempt to execute the block I get a "Internal server error" message. When I look in the general log I have the following message:
    <b>Classname:</b> IntrospectionUtilities
    <b>Mesage:</b> Generic Reflection error (Set): java.lang.NoSuchMethodException: com.lighthammer.xacute.actions.webservice.WebServiceAction.setSoapService(java.lang.String) -> setSoapService
    Does anyone know what this message means ?
    Thanks
    Glenn

    Glenn,
    Unfortunately its not easy to tell why the Web Service call is failing without knowing what the Web Service is doing.  But I can explaing what the SoapService is in xMII and maybe this will help....
    The Soap Service to xMII is a helper class that parses the WSDL for the various ports and operations that are defined.  It gets the transport URI of the service and also the SOAP Body to be used as a reference. 
    If your WebService fails to return these or they are malformed then the SoapService object will not create properly and cause this method to fail.  My suggestion is to either examine your Web Service to make sure it meets proper W3 standards OR to use the POST action block to perform the HTTP operation. 
    Hope this helps.
    -Sam

  • Custom action with XML type input and output parameter.

    Hi,
    I want to develop custom action with xml type input and/or output parameter.
    Is there sample code for java side. How is the definition of input and/or output parameter and set/get methods?
    does it need special .jar file to develop custom action like this?
    Thanks.

    Cemil - yes, you can use XML data types.  Use the class
    com.sap.lhcommon.xml.XMLDataType
    for your parameter type.  Here is a snippet from a custom action we use to log XML (instead of just returning the #text node like the default logger does):
    public class XMLLogger extends ActionReflectionBase
        private String source;
        private String eventType;
        private String textMessage;
        private XMLDataType xmlMessage;
        public XMLLogger()
            log = new Logger("UserLog");
            source = DEFAULT_SOURCE;
            eventType = TYPE_INFO;
            textMessage = "";
            xmlMessage = new XMLDataType();
        public XMLDataType getXmlMessage()
            return xmlMessage;
        public void setXmlMessage(XMLDataType xmlMessage)
            this.xmlMessage = xmlMessage;
        public void Invoke(Transaction transaction, ILog ilog)
            StringBuffer sb = new StringBuffer();
            sb.append('[');
            sb.append(source);
            sb.append("] ");
            sb.append(textMessage);
            sb.append(XMLUtils.convertXmlToString(xmlMessage));
    XMLUtils is a helper class we wrote - it's just a bunch of standard Java XML boilerplate code.  The important part you need to know is XMLDataType.getDocument() will return an org.w3c.dom.Document.
    I hope that was enough information to help.
    -tim

  • FTP Get File List Action Block, It's double listing files!  ver 11.5

    Hi guys.. I have a good one!   I have an FTP Get File List action block in my BLS transaction.  Occasionally, it double lists the files in its output.   For testing I put a repeater with a logevent output where I log the filename, date, and size.  Heres what I saw for my action block output.
    2009-02-13 00:38:00,963  [UserEvent] : File Name: DMM_Export_0010056.txt, File Date 2009-02-13T00:36:00, File Size 339
    2009-02-13 00:38:00,963  [UserEvent] : File Name: DMM_Export_0010056.txt, File Date 2009-02-13T00:36:00, File Size 339
    This is xMII  version 11.5.6 b73  with java 1.4.2_07
    I have a workaround by putting in a distinct action block, after the filelist, but anybody have an idea why this might happen?   My theory is that something might be occuring if the file is being written to while we try to process it, but not sure. 
    I've been building BLS parsers since 2003, (Remember those fun times with Jeremy?)   I've never seen this happen.

    My example is a sample log file before the distinct action.  The general log shows nothing other than the subsequent transaction errors I get as a result of running the same error twice (Tcode return from BAPI calls etc)
    Here is something else interesting..  my userlog file is acting funny, like its trying to write on top of itself.  could it be the transaction is actually running twice or parts of it? 
    For example look at the following log entries
    This is how my log file entry for a production confirmation should look
    2009-02-13 00:38:06,854 [LHScheduler-Int10_NestingWOProdConf] INFO   UserLog - [UserEvent] :
    However sometimes... its looking like this...
    2009-02-13 2009-02-13 00:38:11,854 [LHScheduler-Int10_NestingWOProdConf] INFO   UserLog - [UserEvent] :
    Like it started writing to the log, then started again.
    The problem we are having is that we have JCO calls to SAP in this transaction that does goods movement, we get locking / block errors back from our  saying that we (our sap account) is already updating the information.   Sometimes the information would be posted twice!  You can see how this has become a HUGE issue posting data to a LIVE system twice.
    This is happening on 2 xMII servers.

  • Problem when calling a return type BOOLEAN SQL Function in a package

    Hi All,
    I am having problem when trying to call a SQL function in a package with return type BOOLEAN
    The SQL function signature is as follows
    CREATE OR REPLACE PACKAGE RMSOWNER.ORDER_ATTRIB_SQL ****
    FUNCTION GET_PO_TYPE_DESC(O_error_message IN OUT VARCHAR2,
    I_PO_TYPE       IN     VARCHAR2,
    O_PO_TYPE_DESC  IN OUT VARCHAR2)
    RETURN BOOLEAN;
    Following is my java code
    +CallableStatement cs3 = conn.prepareCall("{?=call ORDER_ATTRIB_SQL.GET_PO_TYPE_DESC(?,?,?)}");+
    +cs3.registerOutParameter(1, java.sql.Types.BOOLEAN);+
    +cs3.registerOutParameter(2, java.sql.Types.VARCHAR);+
    +cs3.registerOutParameter(4, java.sql.Types.VARCHAR);+
    +cs3.setString(2, "");+
    +cs3.setString(3, "ST");+
    +cs3.setString(4, "");+
    +ResultSet rs3 = cs3.executeQuery();+
    I get the following exception, i tried changing the sql type(registerOutParameter) from boolean to bit but i still getting this exception.
    But when i call any other functions with return type other than boolean they work perfectly fine.
    Please can anyone help me fix this issue, i am not sure if its anything to do with vendor JDBC classes?
    +java.sql.SQLException: ORA-06550: line 1, column 13:+
    +PLS-00382: expression is of wrong type+
    +ORA-06550: line 1, column 7:+
    +PL/SQL: Statement ignored+
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)+
    +     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)+
    +     at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)+
    +     at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954)+
    +     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422)+
    +     at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)+
    #####

    Hello People!
    There is another workaround!!
    See the example below:
    private String callBooleanAPi(String tableName,String apikey,String dtInicio,String dtFim,String comando) throws SQLException {
                   CallableStatement cs = null;
                   String call = "";
                   String retorno = null;
                   try {
                        if(comando.equalsIgnoreCase("INSERT")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x :=PKG.INSERT(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        } else if(comando.equalsIgnoreCase("UPDATE")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.UPDATE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        } else if(comando.equalsIgnoreCase("DELETE")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.DELETE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        cs = conn.prepareCall(call);
                        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
                        SimpleDateFormat sdfToSqlDate = new SimpleDateFormat("yyyy-MM-dd");
                        java.util.Date dataInicialVigencia =null;
                        java.util.Date dataFinalVigencia = null;
                        Date dtInicialFormatada =null;
                        Date dtFinalFormatada = null;
                        if(dtInicio != null && !dtInicio.equals("")){
                             dataInicialVigencia = sdf.parse(dtInicio);
                             dtInicio =sdfToSqlDate.format(dataInicialVigencia);
                             dtInicialFormatada = Date.valueOf(dtInicio);
                        if(dtFim != null && !dtFim.equals("")){
                             dataFinalVigencia = sdf.parse(dtFim);
                             dtFim =sdfToSqlDate.format(dataFinalVigencia);
                             dtFinalFormatada = Date.valueOf(dtFim);
                        cs.setString(1, tableName);
    cs.setString(2, apikey);
    cs.setDate(3, dtInicialFormatada );
    cs.setDate(4, dtFinalFormatada );
    cs.registerOutParameter(5, java.sql.Types.VARCHAR);
    cs.registerOutParameter(6, java.sql.Types.VARCHAR );
    cs.execute();
                        retorno = cs.getString(6);
                        System.out.println( cs.getString(5));
                   } catch(SQLException e){
                   throw new SQLException("An SQL error ocurred while calling the API COR_VIGENCIA: " + e);
                   } catch(Exception e){
                   Debug.logger.error( "Error calculating order: " + id, e );
                   } finally {
                   if (cs != null) {
                   cs.close();
                   cs = null;
                   return retorno;
    As you can see the CallableStatement class acepts PL/SQl blocks.
    Best Regards.

Maybe you are looking for

  • Iphoto 11 has no problems

    I photo 11 has no problems, the people who are using it wont give it a chance. Play around with it for a day or two. It works great, I love the new features. At first I thought "omg how do i do this or that" then i played around with it and figured i

  • Renumbering frames/layers cs-4?

    Morning all, I have been importing QT video;'s via: Import video frames to layers, I then duplicate some of the layers as well as add others. Now, these show up in the layers column as i.e. layer 1 copy, layer 1 copy 2 etc, etc. In the animation (fra

  • Spml2 :: Living la vida loca

    Hej, I just installed spml2 on the idm 7.1.1.2 and i runned some examples so far looks pretty nice... but I have no idea how to get information back.... I tried this for example:    String url = "http://--------------/idm/servlet/openspml2";         

  • Non-static method getPerimeter() cannot be referenced from a static context

    I am getting this error message. I assume it is because getArea( ) and getPerimeter( ) are nonstatic and main is static? Can somebody help me? Thanks in advance! Error messages: non-static method getArea() cannot be referenced from a static context  

  • Are 3

    hi, i'm unable to print are 3 even print preview is not coming IN TOCDE J1IA302 pl let me know is this the correct Form J_1I_ARE1 for o/p type J1IB