How to run RFC code in webservice.

Hello Experts,
I am new to webservices but I have done lot of work in Java Webdynpro with RFC.
I have created a model using webservice and I am trying to use this application. I have written following code in wdInit() of my application -
<b>Request_ZAccessoryModel_zhressStationRequisition input = new Request_ZAccessoryModel_zhressStationRequisition();</b>
wdContext.nodeRequest_ZAccessoryModel_zhressStationRequisition().bind(input);
try{
     wdContext.currentParametersElement().setServiceid("12");
     wdContext.currentParametersElement().setYusertype("EMP");
     wdContext.currentParametersElement().setYymod("DIS");
   wdContext.currentRequest_ZAccessoryModel_zhressStationRequisitionElement().modelObject().execute();
    catch(Exception e)
but this is showing me error at that line where I am initializing the Request Node with "New" keyword (line in bold).
Please correct me if I am missing something or If I am going to wrong way.
Thanx in Advance
Roshan Gupta

Dear All,
I am getting following error while deploying the webservice based webdynpro application -
The initial exception that caused the request to fail, was:
   java.lang.Error: Unresolved compilation problems: Syntax error on keyword "return"; "Identifier" expected Syntax error on keyword "return"; "Identifier", "new" expected Syntax error on keyword "return"; "Identifier", "new" expected Syntax error on keyword "return"; "Identifier", "new" expected
    at com.test.webdervice.model.p1.ComplexType_ZhressStationRequisitionResponse.<init>(ComplexType_ZhressStationRequisitionResponse.java:361)
    at com.test.webdervice.model.Response_ZAccessoryModel_zhressStationRequisition.<init>(Response_ZAccessoryModel_zhressStationRequisition.java:56)
    at com.test.webdervice.model.Request_ZAccessoryModel_zhressStationRequisition.<init>(Request_ZAccessoryModel_zhressStationRequisition.java:106)
    at com.test.webdervice.TestWebServiceAppComponentView.wdDoInit(TestWebServiceAppComponentView.java:99)
    at com.test.webdervice.wdp.InternalTestWebServiceAppComponentView.wdDoInit(InternalTestWebServiceAppComponentView.java:1260)
Please help me to sortout this error.
Thanks in advance,
Roshan Gupta

Similar Messages

  • How to run the code generator

    I urgently need to know how to run the code generator using creator. Can anyone assist? I cant find any tips in the forums.

    I am following the procedure to create a new custom component (or extend an existing component) available at http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/writing_custom_components.html.
    Part of the procedure says: you need to use the JSC to run the code generator based on sun-faces-config.xml metadata.

  • How to run servlet codes in WebServer 6.1?

    I am new to Java Web Server and at our place we had installed WebServer 6.1. How to run Servlets in this - the default directory is
    http//win2000:81/Sun/WebServer6.1/docs
    I have'nt insatlled any new virtual class / servers - just running with the default class and servers.
    I could not find any virtual directory named servlet (similar to JavaWebServer 2.0) here.
    Someone kindly tell me how to post servlet files and run them.

    Refer "Sun ONE Web Server 6.1 Programmer's Guide to Web Applications"
    http://docs.sun.com/app/docs/doc/817-1833-10
    Meena

  • How to run ABAP code as a daemon process?

    Background:
    I need a daemon process to check status and react on it. This daemon may run for a long time.
    Current:
    to implement this, use an update module, to call a normal module with an endless loop (the loop may end dependent on some condition). While the message Update Terminate was got.
    Question:
    1. is the current way feasible? if it's OK, what might be the cause of the above problem?
    2. if the current way is not OK. what's the way to run ABAP code as a daemon process?
    Thanks and kind regards,
    Said
    p.s.
    Also please refer to the link below for more information:
    can update module call normal module?

    You could use InDesign Server, that can be run as a service. Have a look at its documentation for more details.
    -Manan

  • How to convert Java code to Webservice and deploy in to JBOSS via JDEV11g

    Hi All,
    Greetings. I am trying to develop Java Web service from JDeveloper 11g which has 2 basic methods. I can able to develop the WS out of the Java through Jdev and can able to test the webservice with the help of "Test Web Service" menu option under .JPR.
    But when I am trying to deploy the WS.War file in to JBOSS app server (which is our project default server) from JDEV I couldn't able to get the option thought I have created the JBOSS server connection in Jdev. I can see only weblogic server connection under DEPLOY menu. Even if I edit the SOAP URL in WSDL to point JBOSS host and port and manually deploy the WAR in to JOBSS, it is not working, getting deployment error.
    Anyone please guide me how to edit the WDSL which should point my JBOSS server (http://localhost:8080) and how to deploy the WAR and access the webservice from my Browser. Step by step help will be really appreciated since I am new to WS. Make this WS work is very important and urgent task in our project. But no luck so far.
    Thanks in advance for each of you. Waiting for the position help.
    klogube

    Hi Shay,
    Thanks for providing the blog URL which helped me to solve my first project. Now I have changed my WebServices deployment server from JDEV Default Apps server (Weblogic) to JBOSS. Now I can directly deploy Ws.WAR from JDEV to JBOSS. But I am getting the error in the JBOSS log as soon as I deploy the WAR.
    2009-02-02 17:21:29,985 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war
    java.lang.IllegalStateException: Endpoint already registered: jboss.ws:context=Testing-SampleWebServices-context-root,endpoint=DateTestingWSSoapHttpPort
         at org.jboss.wsf.framework.management.DefaultEndpointRegistry.register(DefaultEndpointRegistry.java:89)
         at org.jboss.wsf.framework.management.ManagedEndpointRegistry.register(ManagedEndpointRegistry.java:59)
         at org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect.create(EndpointRegistryDeploymentAspect.java:49)
    .................etc
    2009-02-02 17:21:29,987 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@a99914c8{ url=file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war, deployedLastModified=0 }
    org.jboss.deployment.DeploymentException: Could not create deployment: file:/opt/jboss-4.2.3.GA/server/default/deploy/Testing-SampleWebServices-context-root.war; - nested throwable: (java.lang.IllegalStateException: Endpoint already registered: jboss.ws:context=Testing-SampleWebServices-context-root,endpoint=DateTestingWSSoapHttpPort)
         at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:991)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
         at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    .....etc
    Please help me, how to overcome this error and invoke my WS from http://localhost:8080...... (JBOSS path). I am trying to create client application too for invoke my WS and I failed to create the same while I am mapping the WSDL path in to the client application. Getting error, WSDL path is not available under localhost. (Note: I can able to see the list of WS's deployed in to JBOSS under: http://localhost:8080/jbossws/services which display the Endpoint name and address. But cant able to access the URL)
    Thanks
    klogube

  • How to run Java codes from ABAP

    Hi Gurus,
    I have .JAVA & .CLASS files which connect to the website through HTTPS connection and generates the TEXT file at C:\ by obtaining some data from WEB Site. This java files needs SSL certificate Which has been imported in SAP. How can i run the Java files from SAP R/3, Please help me.
    Thanks
    Ganesh

    hiii
    refer to following link..
    Java from ABAP?
    Re: Calling Java API from ABAP using JCo
    i hope it will solve your problem
    regards
    twinkal

  • Get a RFC Code via a RFC

    Hi, I'd like to make a documentator of RFC, with a special format for my company. I'm using the RFCs: RFC_FUNCTION_SEARCH, RFC_GET_FUNCTION_INTERFACE.
    But I have to get 2 things important for the project:
    - The code of a RFC
    - The information of (CreatedBy, CreateDate, ModifyBy, ModifyDate)
    Can any body say me, how can I get this information?
    Thanks!!!!
    Martin

    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    In SLD – System Landscape Directory
    TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
    Ts for Third Party (Logical system):-
    BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
    BS for Third Party (Logical system):-Enter the XI logical system name.
    Re: How to run RFC code in webservice.
    Error generating proxy
    Model Binding Error

  • How to run the samplecode JMF20_guide.pdf provide?

    The pdf document has a samplecode in page 100,but how to run the code?My code like this:
    public static void main(String[] args)
    CaptureAudio ca=new CaptureAudio();
    ca.captureDevice();
    //capture and play audio from a microphone
    public void captureDevice()
    Vector deviceList=CaptureDeviceManager.getDeviceList(new AudioFormat("linear",44100,16,2));
    if(deviceList.size()>0)
    di=(CaptureDeviceInfo)deviceList.firstElement();
    else
    System.exit(-1);
    try
    Player p=Manager.createPlayer(di.getLocator());
    catch(IOException e)
    catch(NoPlayerException e)
    but sames not of my desired result,why?
    I had a microphone on my computer,It sames the code could capture the device.
    Another question,how could I capture the video device?
    Vector deviceList=CaptureDeviceManager.getDeviceList(new VideoFormat("JPEG"));
    Is this?

    1. The code you showed here isn't the complete one so you can see the whole picture. This code can be used in audio transmission ( example code can be found in AVTransmit2.java in the JMF/Solutions). For your current piece of code, if you want to see if you already got the capture device ready, Simply print out the deviceList to console.
    2. If it still does not work, open Java registry app, and click capture device tab, then click the button: "detect capture device", which goes through a search/registration process.
    3. If you tried to got all Audio/Video capture devices, simply use
    deviceList = CaptureDeviceManager.getDeviceList(null);

  • How to run a .bat code?

    how to run a .bat code?
    I have a code ,batch (.bat) in richtextbox1, and want , to text(code .bat) in richtextbox1 it was launched in the console cmd
    without the use of saving a file with this code and run it

    In your code, right-click on the word "Desktop". In the context menu, select "go to definition". The object browser opens. You will see other members of the SpecialFolder enum. You can examine these values and read the description below.
    One of them is "ProgramFiles". If you pass this value to GetFolderPath, it returns the path of the program files.
    Another way: In your code, move the caret to the word "desktop" and press Ctr+J. It will open the same list of enum values. Whenever you select an item in the list, the tooltip should also show a description of the enum value.
    Then look at
    System.IO.Path.Combine to combine the program files path with the sub folder path. The result will be the full path of the directory. You can call Path.Combine for every path name or file name that you want to add.
    Armin

  • How to run a command line window from code?

    In an application I need to run a dll file with a few arguements. These arguements can be given in the command line window. The execution of the dll file will return a string that i need to get (for the parsing etc).
    1. How can I open a command line window from the Java code?
    2. How to run commands on it?
    3. How to get the results of the commands from the command line into my program?

    In an application I need to run a dll file with a few
    arguements. These arguements can be given in the
    command line window. The execution of the dll file
    will return a string that i need to get (for the
    parsing etc).
    A dll is used by other programs. It is not possible to run it from the command line.

  • How  can i run this code correctly?

    hello, everybody:
        when  i run the code, i found that it dons't work,so ,i  hope somebody can help me!
        the Ball class is this :
        package {
        import flash.display.Sprite;
        [SWF(width = "550", height = "400")]
        public class Ball extends Sprite {
            private var radius:Number;
            private var color:uint;
            private var vx:Number;
            private var vy:Number;
            public function Ball(radius:Number=40, color:uint=0xff9900,
            vx:Number =0, vy:Number =0) {
                this.radius= radius;
                this.color = color;
                this.vx = vx;
                this.vy = vy;
                init();
            private function init():void {
                graphics.beginFill(color);
                graphics.drawCircle(0,0,radius);
                graphics.endFill();
    and the Chain class code is :
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        [SWF(width = "550", height = "400")]
        public class Chain extends Sprite {
            private var ball0:Ball;
            private var ball1:Ball;
            private var ball2:Ball;
            private var spring:Number = 0.1;
            private var friction:Number = 0.8;
            private var gravity:Number = 5;
            //private var vx:Number =0;
            //private var vy:Number = 0;
            public function Chain() {
                init();
            public function init():void {
                ball0  = new Ball(20);
                addChild(ball0);
                ball1 = new Ball(20);
                addChild(ball1);
                ball2 = new Ball(20);
                addChild(ball2);
                addEventListener(Event.ENTER_FRAME, onEnterFrame);
            private function onEnterFrame(event:Event):void {
                moveBall(ball0, mouseX, mouseY);
                moveBall(ball1, ball0.x, ball0.y);
                moveBall(ball2, ball1.x, ball1.y);
                graphics.clear();
                graphics.lineStyle(1);
                graphics.moveTo(mouseX, mouseY);
                graphics.lineTo(ball0.x, ball0.y);
                graphics.lineTo(ball1.x, ball1.y);
                graphics.lineTo(ball2.x, ball2.y);
            private function moveBall(ball:Ball,
                                      targetX:Number,
                                      targetY:Number):void {
                ball.vx += (targetX - ball.x) * spring;
                ball.vy += (targetY - ball.y) * spring;
                ball.vy += gravity;
                ball.vx *= friction;
                ball.vy *= friction;
                ball.x += vx;
                ball.y += vy;
    thanks every body's help!

    ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
      and i changed the ball.pv property as public in the Ball class, and  the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
    2010-04-21
    Fang
    发件人: Ned Murphy <[email protected]>
    发送时间: 2010-04-20 23:01
    主 题: how  can i run this code correctly?
    收件人: fang alvin <[email protected]>
    I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class.  All of the properties in your Ball class are declared as private, so you probably cannot access them directly.  They would need to be public.  Also, I still don't see where you import Ball in the chain class such that it can use it.

  • How to run the Transaction Code - BIC for Bank keys uploading

    Hi
    How to run the Transaction Code - BIC for Bank keys uploading.
    please give me suggestion.
    Thanks
    Indu

    Go to BIC transaction screen
    Fill the selection screen parameters as below
    1. Update Run (Test Run: Check Off: Real Run:Check On)
    2. Set Deletion Flag (Check On)
    3. Maximum no. of records: 999999
    4. Detail List (Check On)
    5. Display variant: 1SAP
    6. Presentation server (Select Radio Button)
    7. Application server (Deselcet Radio button)
    8. File name and Path: Select relavant file which is to be upload
    9. Bank country: If needed (Give respective country name)
    10. Select execute button or F8
    NOTE: Make sure that before executing run execute TEST RUN by deselecting Update Run check box
    Hope this will meet your requirement
    Thanks.

  • How to run the open script code from eclipse?

    Hi,
    How to run the open script code from eclipse.
    Please let me any soulutions on this.

    Hi Konda
    I am not quite sure you can do that and it would even be not supported... Again, what is the purpose? Why do you want to run your openscript code in Eclipse?
    What is the code you try to run?
    As an example, even if you include al the jar files and so on. don't think the function "Launch Browser" could work because it isn't only java code orjar files.....
    If you give us more background. maybe we can guide you to a better solution...
    JB

  • How to run netbeans swing code without netbeans

    hi
    i created a GUI use netbeans and it compiles and runs under netbeans. my question is how can i run it on a machine doesnt have netbeans. i realise that in the netbeans project scr file, there s two .java file, but have no idea how should run it. i tried to do
    javac <GUI class name>.java
    but got lots of erro like this:
    GUI_main.java:545: package org.jdesktop.layout does not exist
    jPanel20Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    how can i do it corectly???
    dav

    Hai,
    u need to search the Classes ur using in netbeans installation directory
    i.e., org.jdesktop.layout some class.
    May i know y ur using org.jdesktop.layout package
    From where u got GroupLayout. Search GroupLayout.class and set the classpath.
    javac -classpath <path of the class files>
    regards,
    RdRose.

  • Running T-code miro, how should i set the DRSEG-SGTXT value automatically

    Hi experts,
    When i run t-code miro, i want to fill into the text value(DRSEG-SGTXT) on the item line automatically.
        Its value is the PO description by default. I has tested the user exits (Related to T-Code MIRO,such as LMR1M001/002/003/004 etc) and badi(INVOICE_UPDATE). They can't work very well.
       I'd like to input Purchasing Document Number and enter, material items are display and its text value(DRSEG-SGTXT) is also filled in.  
    Any clue is appreciated.
    - Daniel

    Hello,
    start the report RSMODPRF and see the documentation.
    http://www.sap-img.com/abap/field-exits-smod-cmod-questions-and-answers.htm
    There are some threads in SDN for this topic, you can search in SDN
    Kind regards,
    JP

Maybe you are looking for