ABAP Class as web service

Hi All,
Is there any way to expose a ABAP class as a web service. I know we can create a FM or BAPI and expose them as web service.
Ex : If I have a SalesOrder class and this class has methods like getOrder(),getDetails(),getItems()  etc etc
Now I would like to create a service where the above methods are methods inside the service.
(We don't have XI in our landscape)
Please correct me if my assumption is wrong.
Thanks ,Anilkumar

i think you need to embedd the class/methods in a rfc enabled fm to create a webservice.
Rajeev

Similar Messages

  • How do we call smartforms in abap program or web services

    how do we call smartforms in abap program or web services
    How many types of smartforms are there?
    points will be rewarded

    Hi
    See this sample program
    Using the fun module smartform is called from the program
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    <b>call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'</b>
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function <b>FM_NAME</b>
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Add java classes as Additional Classes to web service and JAXB 2.0 usage

    Hi,
    I start using JDeveloper 11g TP3 to create web service. I encounter two problems.
    1. I created a schema file as the following,
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://FromWSDL/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://FromWSDL/">
    <xsd:complexType name="sayHello">
    <xsd:sequence>
    <xsd:element name="arg0" type="xsd:string" default="Tommy"/>
    <xsd:element name="arg1" type="tns:arg1Enum"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:simpleType name="arg1Enum">
         <xsd:restriction base="xsd:string">
         <xsd:enumeration value="preserve"/>
         <xsd:enumeration value="replace"/>
         <xsd:enumeration value="collapse"/>
         </xsd:restriction>
    </xsd:simpleType>                         
    <xsd:element name="sayHello" type="tns:sayHello"/>
    <xsd:complexType name="sayHelloResponse">
    <xsd:sequence>
    <xsd:element name="return" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
    </schema>
    then I used TopLink/JPA-->JAXB 2.0 Content Model from Schema, I got four java files: Arg1Enum.java, ObjectFactory.java, SayHello.java, and SayHelloResponse.java.
    After, I create a java class with @WebService and @WebMethod annotation. Right Click on the web service class,
    select Web Service Properties-->Additional Classes, I added the four java classes. but there are error message for SayHello and Arg1Enum
    "the type SayHello cannot be serialized into XML and no custom serilizer has been defined for it"
    2. In JDeveloper, I create Java model from the above schema, then reverse the steps, create a new schema from Java Model, the original schema and the schema from Java Model are not same, especially for "defaultValue" and "required" fields for the custom element(SayHello and Arg1Enum).
    Any help will be appreciated

    First what you mean by "deploying classes as web services"? Chances are you
    can do it with something like Glue from The Mind Electric ... but chances
    are that you don't want to. What are you trying to accomplish?
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Simon Wallis" <[email protected]> wrote in message
    news:[email protected]..
    Hi, can WebLogic deploy simple Java classes (not EJB's or JB's, just
    classes) as a web service? How easy it is to do?
    The WebLogic installation has one measly web services example, and it's an
    EJB which is not what I want to do.
    Thanks,
    Simon.

  • Exposing java class as web service

    Hi All,
    I have a requirement where I have to Expose a java class as web service u2013 In NWDS 7.0, we have a web service perspective where we can do this. But in 7.2, I could not find this perspective.
    And second requirement is to Consume web service in java class.
    Please help me ASAP.
    Thanks.

    Hi All,
    Waiting for some suggestions.
    Regards,
    Nishant

  • Best Practice for WSDL Generate Proxy Class for Web Service with Two Versions

    Dear All
    Thank you in advance for you help.
    I would like to generate proxy classes for same function but with two versions.
    Old version web service (v23.2) is used for stable modules in a project which is not going to modify.
    However, enhancement is added in new version web service (v24) and is going to use in any future modules.
    For example,
    wsdl.exe -o="TestProxy.cs" -l:CS -n:Test -sharetypes https://community.workday.com/custom/developer/API/Notification/v23.2/Notification.wsdl https://community.workday.com/custom/developer/API/Notification/v24.0/Notification.wsdl
    It generates similar classes with an '1' added at the end of the class name.
    ublic partial class Event_TargetObjectType {
    private Event_TargetObjectIDType[] idField;
    public partial class Event_TargetObjectType1 {
    private Event_TargetObjectIDType1[] idField; ...}
    Since the function inside some class is the same, is it possible for WSDL.exe to generate proxy classes automatically that if the class is the same, then generate one class only (sameFunction())  but if it detects the class is different, then add '1'
    to the end of class name (differentFunction() and differentFunction1())
    i.e.
    public class sameFunction()
    public class differentFunction()
    private int a;}
    public class differentFunction1()
    { private int b;
    Best Regards
    mintssoul

    Hi  mintssoul,
      As per this case, I have shared corresponding details below :
    1.As far as I know, WCF doesn’t support method overloading directly
    2.Because WSDL doesn’t support method overloading (not OOPs).
    3.WCF generates WSDL which specifies the location of the service and the operation or methods the service exposes.
    4.WCF use Document/Literal WSDL Style : Microsoft proposed this standard where the soap body element will contain the web method name.
    5.By default all the WCF services conform to the document literal standard where the soap body should include the method name.
    6.but you can differ the method in the same manually by using Name attribute like below 
    For example:
        [OperationContract(Name="Integers")]
        int Display(int a,int b)
        [OperationContract(Name="Doubles")]
    double Display(double a,double b)
    7. Or I suggest you that can use svcutil to map multiple namespaces for generating wcf service proxies .
        for more information about this, refer here :
    http://stackoverflow.com/questions/1103686/use-svcutil-to-map-multiple-namespaces-for-generating-wcf-service-proxies

  • WSDL error during generation of  ABAP proxy for web service

    Hi friends,
    I am getting error during the generation of ABAP proxy object for web service developed in .NET .
    Error : Proxy generation terminated: WSDL error (<extension> not supported).
    How to make this WSDL file compatible  for  ABAP proxy.
    I have tried to edit WSDL file in XML Spy but did not get any option to replace/remove the tag <extention>.
    If any one worked on this. Please help me its urgent.
    Thanks and regards,
    Shivanand.

    HI ,
    I am having the same issue!!!
    Does ABAP Proxy Generation support <extension> ?
    Is there a list available of what is supported and what not (please consider I do not have access to sap notes)?
    Thanks

  • Start ABAP Debug in Web Services Application - won't take non-Dialog user

    Hello all. We are trying to Replicate Employees from SuccessFactors to SAP ECP/ERP with a delivered integration from SAP, but we''re having trouble interpreting some of the errors we're getting in the Application Log
    As shown in the Web Services Utilities Message Monitor - our message is successfully Delivered - we would like to set a break-point in Class CL_PAOCF_EC_EE_MDR_IMPL and run our test. Unfortunately we have to use a Technical User in our middleware connector to consume the Service (to connect to the Java Application Server?) and setting External Breakpoints or enabling Debugging in SICF will only permit Dialog users. Does anyone know how we can run our Web Service and invoke an External Breakpoint in our application posting Class?

    Hello Keith,
    What is the "user type" for this user? In our system we have the user for the middleware defined as "Service type" and external debugging is possible with that user.
    BR,
    Suhas
    PS - Read the documentation of the data element XUUSTYP for further details.

  • Abap Class for Enterprise Service

    Hi guys.
    I've published as webservice in SAP ECC as enterprise service get it in Enterprise Service Workplace.
    I have two questions:
    1- How can I know the abap class associated to this enterprise service.
    2- Could I extend the functionality of this enterprise service? For instance I'd like to response with one more field. Is that possible or I have to create a new one?
    Thaks a lot.
    Regards.
    Edited by: Christian  Abad Chico on Feb 20, 2012 4:03 PM

    Hi
    May be the below link helps you,
    [http://wiki.sdn.sap.com/wiki/display/EmTech/PublishWeberviceinABAP,ConsumeWebserviceinABAPandAdobeFlex.]
    Regards,
    Vijay V

  • Examples about ABAP Proxies and Web Services creation

    Hi everybody.
    I have been reading SAP NW PI 7.1 help about Web Service creation and sincerely, I am a bit confused. Also I have searched SDN forums, blogs and documents but my confusion persist.
    I will try to depict my integration scenario below.
    SLD are conformed by two machines: SAP ECC 6.0 system, client 100 and SAP PI 7.1 system, client 001.
    There are two integration scenarios.
    1. ABAP Client Proxy -> PI -> Web Service
    I need to consume a Web Service provided by a third part. They provided me with WSDL files and I imported them into ESR. I already construted all other objects (data types, message types, etc.). In the examples I found I cann't see what to do with those definitions, I don't find any suitable example. This is an asynchronous scenario. The Web Service will be consumed from SAP ECC 6.0 system through an ABAP Cliente Proxy.
    2. Web Service -> PI -> ABAP Server Proxy
    I need to provide a Web Service for others to consume it. I already have created the WSDL for Service Interface I created in ESR using the respective wizard in Integration Builder. This is an asynchronous scenario. The Web Service will be consumed by others outside landscape configuration. When the Web Service is consumed must run an ABAP Server Proxy.
    In spite of my investigation about Web Services building in SAP NW PI 7.1 I cann't finish my work successfully.
    I just need a good example, any suitable example for each integration scenario.
    Thanks in advance.
    Rafael Rojas.

    Hi,
    1. ABAP Client Proxy -> PI -> Web Service
    1. Create all necessary objects in ESR
    2. Create integration scenario objects with PROXY as sender SOAP or WS adapter as receiver
    3. Create client proxy in your SAP backend using SPROXY
    4. Create ABAP client proxy to execute the proxy which then will call your PI runtime to execute the webservice.
    2. Web Service -> PI -> ABAP Server Proxy
    1. Create your necessary objects in ESR
    2. Generate server proxy in your back end system
    3. Create integration scenario objects with PROXY as receiver and SOAP or WS adapter as sender
    4. Generate WSDL from integration scenario and pass it to your partner.
    You can find many blogs which discuss these steps in more detail.
    Regards,
    Lim...

  • User defined class  for Web Services

    I am trying to use the Web Service Publishing Wizard to publish
    a class as a web service. The wizard will not allow me to select
    the method I wish to publish. When I click on the "Why Not?"
    button the message says:
    "One or more parameters did not have an XML Schema mapping
    and/or serializer specified"
    I use user defined classes as parameters of the methods of the service web.
    How cam i install this web service on "Oracle J2EE Web services"?

    If you use Java Beans (or single dimension arrays of Java Beans) that implement the java.io.serializable interface as per this article:
    http://otn.oracle.com/tech/webservices/htdocs/samples/customtype/content.html
    then Oracle9iAS will handle the publishing process of custom data types. The publishing wizard in Oracle9i JDeveloper 9.0.2 doesn't support this yet, but the link in the article to the JDeveloper help gives a fairly straightforward workaround. This workaround will be eliminated in Oracle9i JDeveloper 9.0.3 (due late August).
    Does representing your parameters as Java Beans work for your problem?
    Mike.

  • Contivo Java class as web service

    Hai,
    We used the contivo mapping and from that generated one java class. We need to use it as webserivce.
    With the help of Eclipse and AXIS( 1.4 ) made a try, and while making it as webservice , getting warning as “The service class "Transform_source1_to_dest1" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.”
    In wsdl file also some errors are getting in namespace imports.
    So please help me to solve this problem.
    Can we use the Contivo generated java class directly as a web service ? for that which web service engine can be used?
    Apache AXIS 1.4
    JDK 1.5
    Contivo Analyst 3.11.2.1.5
    Thanks in advance…………….
    Rgds,
    Rajeev

    Rajeev,
    Contivo transforms can be invoked indirectly through two APIs, which have often been used for invoking transforms from web services. One API is called Transform and the other is called TransformAny. The Javadoc for both is distributed with Analyst, and the "Runtime Guide" is also distributed with Analyst.
    Does this get you closer?
    Regards,
    Walter

  • Expose Web Module Java Class as Web Service

    Hi Expert,
    can you please tell me whether Web module java class method can be expose as Web service in sap netweaver 7.1?
    if possible give me some scenario.
    Please Help
    Regards,
    Vanita

    Please Help.
    I am stucked in middle.
    Regrads,
    Vanita

  • Abap to java web service

    Hi All,
         Can any one help me how to consume a JAVA Web Service using R/3 6.0 version? I want to send some data to the third party system so please send me the Sample code if possible or steps to be followed to achieve this.
    Thanks in Advance

    Hi Uwe,
    Thank you.
    I have WSDL or URL how i can call to them ,in the example that you send i don't find the place that it called.
    Do i have to create proxy for that ?
    BR
    Nina

  • Error converting CFML arguments to Java classes for web service invocation.

    Hello all.
    I am working on writting a small application that will use a web service that is provided by our IVR (Angel.com). I am able to login, however when I attempt to do anything with complex objects, I get the error stated in the title.
    It seems to be having a problem with the array, because when I remove it, or turn it into a simple string, i get errors about the function not being found. I am fairly new to web services, and especially dealing with complex data types, so any help would be much appreciated.
    You can see my testing page at
    http://webservices.fpitesters.com/AngelCalls.cfm
    The WSDL I am using can be found at
    http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl
    Here is sample code that does what I want it to do in Java / Apache Axis
    http://www.socialtext.net/ivrwiki/index.cgi?java_sample_code
    Here is a description of the function I am having problems with
    http://www.socialtext.net/ivrwiki/index.cgi?placecall
    And attached is my code.
         <cfset email = "xxxxxxxxxxxxxxxxxx">
         <cfset pin = "xxxxxxxxxxxx">
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="login" returnvariable="login">
              <cfinvokeargument name="email" value="#email#"/>
              <cfinvokeargument name="pin" value="#pin#"/>
         </cfinvoke>
         <cfdump var="#login#">
         <cfset Token = login.getToken()>
         <cfdump var="#token#">
         <cfset CallItem.maxWaitTime = 100>
         <cfset CallItem.phoneNumbers[1] = "7632344306">
         <cfset CallItem.siteNumber = 100041>
         <cfinvoke webservice="http://www.angel.com/outbound/wsdl/OutboundCallService.wsdl" method="placeCall" returnvariable="call">
              <cfinvokeargument name="Token" value="#Token#"/>
              <cfinvokeargument name="CallItem" value="#CallItem#"/>
         </cfinvoke>
         <cfdump var="#call#">

    If you are not initializing phoneNumbers as an array before setting
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    it will be passed as a struct with a key of 1.  This could cause your argument conversion error.
    So:
    <cfset CallItem.maxWaitTime = 100>
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    <cfset CallItem.siteNumber = 100041>
    Will result in
    struct
    MAXWAITTIME
    100
    PHONENUMBERS
    struct
    1
    7632344306
    SITENUMBER
    100041
    <cfset CallItem = StructNew() > <!--- For Good Measure --->
    <cfset CallItem.maxWaitTime = 100 >
    <cfset CallItem.phoneNumbers = arrayNew(1) /> <!--- Required --->
    <cfset CallItem.phoneNumbers[1] = "7632344306">
    <cfset CallItem.siteNumber = 100041>
    Will result in
    struct
    MAXWAITTIME
    100
    PHONENUMBERS
    array
    1
    7632344306
    SITENUMBER
    100041
    - Jason Morgan

  • Consuming a Web service thru XI with Web Dynpro for ABAP

    Hi all,
    Does anyone know how to call a web service thru XI from Web Dynpro ABAP. The web service will call an RFC and bring back some data.
    Some guidelines on how to achieve this will be very much appreciated.
    Thanks
    KG.

    Hi Kunal,
    Do you want to use XI at the runtime of the service ? Usually for a synchronous call, XI is used only at the design time to design the message interface. Using this message interface the proxy class  in ur ABAP system can be generated. In the interface method of your proxy class you can call your RFC. Finally generate a webservice out of this proxy class via SPROXY tsn.
    Get the WSDL url of this webservice in tsn WSADMIN . Using this url you can call the service (peer-to-peer, no XI involved at runtime) with Webdynpro.
    I hope this answers your question.
    Regards,Girish

Maybe you are looking for

  • How can I authorize deauthorized songs in my itunes once an account has been deactivated? all?

    My partner and I shared the same itunes with different accounts. since we are no longer together she has cancelled her account so now some songs don't play. Is there a way to find every song on my itunes that has been deauthorized and authorize all a

  • Automatic clearing in GL

    Hi all, Can you anybody pls explain about "Automatic clearing " in GL. And where it is exactly required in GL,and what are configuration needed. Thanks&Regards Jay

  • When paste to vim xterm, blanks lines are added after each line

    Need expert's help: When I copy from windows Firefox to my vnc's vim xterm, somehow after each line, several blank lines are added after every single line/paragraph. This is really annoying! I don't know how to solve it. I changed a my .vimrc to a ve

  • Problem mit der graphischen Anzeige der Frequenz

    Hallo liebes Forum, wir basteln gerade an einem Programm zur Strömungsdatenerfassung. Das Eingangssignal ist frequenzmoduliert. Es erscheint kein Signalverlaufsgraph für die Frequenz, obwohl die numerische Frequenzanzeige funktioniert. Außerdem wird

  • Compairing a form submission using cfselect to a db record

    Hello; I am writting a small contact form. I want to use cfselect so it will be populated with all the states.I have it working fine, my problem is, when the email is sent from the form, it sends the ID of the state, not the actual state name.I am tr