ABAP WebService to Receive XML

I have created a web service in ABAP. It is supposed to receive and XML string. When I send it simply a string (e.g. hello), it works (in the sense that the function module gets called). When I send it XML (e.g. <test>hello</test>), it does not. I get back a deserialization error. The text being sent is in the soap wrapper. The XML is OK (it passes checking by XMLSpy).
Ideas?
Thank you.

you should be able to use xml string.
whats the type of the import parameter of you function.
and how are you testing your webservice - which tool are you using?
Regards
Raja

Similar Messages

  • Creating ABAP webservice to receive XML message

    Hi All,
    I have a requirement to create an webservice/application in SAP ECC6 system which will receive XML message through a http request, parse the XML and update the data in some Z tables.
    Does anyone have any idea how to achieve that ?
    Do I need to write a BSP application/ WebDynpro for ABAP application ?
    Any input is highly appreciated.
    Points will be rewarded for helpful answers.
    Thanks,
    Atanu

    Hi Atanu,
    You do not need BSP/WebDynpro for this. Please go through the links below.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46d6c25d-0b01-0010-06a9-8e8218753c02">1. SAP Webservice</a>
    <a href="/people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap Consuming Web Service from ABAP</a>
    Please reward points if you find them useful.
    Cheers,
    Sougata.

  • R3 (rfc-sender) - XI - Webservice ( soap-receiver)

    Hi,
    I am getting below error whenever webservice(target system) is unavailable.
    HTTP 404 Not Found
    Then RFC got failed in R3, due to this error in XI
    R3 (rfc-sender) <-> XI <-> Webservice ( soap-receiver) Synch
    User will enter the request data in R3 and waiting for the response, but webservice is down(i.e not available)
    Request is reached to XI box and XI is trying to send data when webservice is down( i,e not available), RFC is waiting for the response from XI box.
    how we will handle this kind of situation,how should i give response back to RFC( because RFC sent the request and waiting for the response, XI could not send any response back as Webservce is down, Please advice me how should XI inform to the end user r R3 abt webservice.
    I am getting this error to my mail box as i have configured ALERTS. i do not want to change existing RFC.
    is there any chance to send response to R3 even webservice is down, please can any one suggest.
    Thanks,
    SIva
    Edited by: Siva Grandhi on Jun 18, 2008 1:12 PM

    Hi siva,
    check this blog on HTTP errors.
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    May be the URL you have given in SOAP at receiver adapter is wrong.Check that once.
    Error: 404 Not Found
    Description: The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
    Possible Tips:- for HTTP_RESP_STATUS_CODE_NOT_OK 404
    u2022 404 is an HTTP response code that indicates that the resource in question couldn't be found. Usually this is due to an incorrect URL, so it is better to cross check all URLs. Check pipeline URL in the SLD in the business system of the Integration Server For this go to SLD->Business System-><yourIntegrtaion Server>->Pipeline URL: It should be like this http://<host>:<port>/sap/xi/engine?type=entry Where host is the host name of the Integration Server and port is the HTTP(8xxx) port. To verify this in Integration Server you can do like this. Go to SXMB_ADM->Integration Engine Configuration->Choose Edit from Menu -> Change Global Configuration Data to switch to change mode. Then select System Landscape - Load Configuration. (This is not required always)
    u2022 Check that the port really is the ICM HTTP Port and not the J2EE port i.e SMICM then menu GOTO --> SERVICES and check the port number for HTTP. It should be HTTP port
    u2022 If the error is Page cannot be displayed, cannot find server in https configurations Check and correct the SSL configuration for the ABAP and the J2EE side of the system
    u2022 If the error is because of integration server when using Proxy communications then check these. i.e SXMB_ADM->Integration Engine Configuration->Corresponding Integration Server enrty should be dest://<Http Integration server-Destination> Where < Http Integration server -Destination > is the RFC destination (SM59) of type HTTP connection (type H) to the Integration Server. In this case, host name, port, and path prefix are saved in the RFC destination.
    Thanks,
    Vijaya.

  • Error in "---- RECEIVING XML ----", WL 6.1, sp 2  for Windows

    I have changed a few names and run the webservices/message example. The ConsumerClient.java
    when initially started has thrown exception regarding illegal character.
    The RECEIVING XML is generated by the server and, in case of ConsumerClient, all
    code is produced by wsgen utility. My guess is that the problem is caused by the
    line
    <FONT FACE=Helvetica><BR CLEAR=all>
    where quotes are missed.
    So, is this a bug in WL 6.1, sp 2 for Windows ? The output follows:
    ------------- RECEIVING XML -------------
    <definitions
    targetNamespace="urn:local"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:local"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema targetNamespace='urn:local'
    xmlns='http://www.w3.org/1999/XMLSchema'>
    </schema>
    </types>
    <message name="receiveRequest">
    </message>
    <message name="receiveResponse">
    <part name="result" type="xsd:anyType" />
    </message>
    <portType name="dpsfGetWSPortType">
    <operation name="receive">
    <input message="tns:receiveRequest"/>
    <output message="tns:receiveResponse"/>
    </operation>
    </portType>
    <binding name="dpsfGetWSBinding" type="tns:dpsfGetWSPortType"><soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="receive">
    <soap:operation soapAction="urn:receive"/>
    <input><soap:body use="encoded" namespace='urn:dpsfGetWS' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace='urn:dpsfGetWS' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    </binding>
    <service name="dpsfGetWS"><documentation>todo</documentation><port name="dpsfGetWSPort"
    binding="tns:dpsfGetWSBinding"><soap:address location="http://localhost:7001/dpfswsGetInit/receiveMsg"/></port><
    /service></definitions>
    -------------- SENDING XML --------------
    <?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.
    org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns0:receive
    xmlns:ns0='urn:dpsfGetWS' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml
    http:/
    /schemas.xmlsoap.org/soap/encoding/'></ns0:receive></SOAP-ENV:Body></SOAP-ENV:Envelope>-------------
    RECEIVING XML -------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
    <HTML>
    <HEAD>
    <TITLE>Error 500--Internal Server Error</TITLE>
    <META NAME="GENERATOR" CONTENT="WebLogic htmlKona WebLogic Server 6.1 SP2 12/18/2001
    11:13:46 #154529 ">
    </HEAD>
    <BODY bgcolor="white" alink="#397F70" link="#640078" vlink="#DE7E00">
    <FONT FACE=Helvetica><BR CLEAR=all>
    <TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
    <FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>
    </FONT></TD></TR>
    </TABLE>
    <TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT
    FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext
    Transfer Protocol -- HTTP/
    1.1</i>:</H3>
    </FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>
    </FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition
    which prevented it from fulfilling the request.</FONT></P>
    </FONT></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Scanner has tokens:
    [OPENTAGBEGIN]
    [NAME] (META)
    [NAME] (NAME)
    [CHARDATA] (GENERATOR)
    [NAME] (CONTENT)
    [CHARDATA] (WebLogic htmlKona WebLogic Server 6.1 SP2 12/18/2001
    11:13:46 #154529 )
    [TAGEND]
    [SPACE] (
    [CLOSETAGBEGIN]
    [NAME] (HEAD)
    [TAGEND]
    [SPACE] (
    [OPENTAGBEGIN]
    [NAME] (BODY)
    [NAME] (bgcolor)
    [CHARDATA] (white)
    [NAME] (alink)
    [CHARDATA] (#397F70)
    [NAME] (link)
    [CHARDATA] (#640078)
    [NAME] (vlink)
    [CHARDATA] (#DE7E00)
    [TAGEND]
    [SPACE] (
    [OPENTAGBEGIN]
    [NAME] (FONT)
    [NAME] (FACE)
    E7E00">
    <FONT FACE=e <-- bad character
    Exception in thread "main" Error at line:8 col:13 Line:8 ''' expected, got char[72]
    at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    at weblogic.xml.babel.parsers.StreamParser.streamParseSome(StreamParser.java:130)
    at weblogic.xml.babel.parsers.BabelXMLEventStream.parseSome(BabelXMLEventStream.java:46)
    at weblogicx.xml.stream.XMLEventStreamBase.hasNext(XMLEventStreamBase.java:135)
    at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:258)
    at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:171)
    at weblogicx.xml.stream.XMLEventStreamBase.startElement(XMLEventStreamBase.java:164)
    at weblogic.soap.codec.SoapMessage.read(SoapMessage.java:86)
    at weblogic.soap.WebServiceProxy.receive(WebServiceProxy.java:464)
    at weblogic.soap.WebServiceProxy.invoke(WebServiceProxy.java:430)
    at weblogic.soap.SoapMethod.invoke(SoapMethod.java:186)
    at examples.webservices.message.ConsumerClient.main(ConsumerClient.java:57)
    Thank you.
    -Michael

    Hi Michael,
    Thanks a lot for such detailed description. You know, I've considered this bug
    until I've found out that it works OK for my case if I DO NOT change <destinationtype>
    setup from "topic" to "queue". Actually, I do care about it mostly from the consistency
    perspective. This a small fly in comparison to the BUG I've found next.
    Currently, I am contacting BEA Support with that regard. In short words, I've
    found that 1) if you build WS on the top of JMS Queue; 2) use the webservices.message.ConsumerClient
    from WL examples or similar; 3) run this Client several times closing the Client
    application after each run; 4) control how many consumers your JMS Queue has after
    each run - you will see that the number of active consumers becomes equal the
    number of your runs. That is, WS initiated by each ConsumerClient remains connected
    to the destination, i.e. the Queue, even when the real client - ConsumerClient
    - is dead already. This results in multiple consumers for the same JMS Queue,
    i.e. now the JMS decides which consumer would get the message from the queue,
    i.e. your ConsumerClient has a chance of never getting the message and wait forever.
    I believe, the WS engaged by ConsumerClient in this use-case MUST close JMS connection
    by itself or on command somehow.
    Hey, please tell me more about "Bavarian Hat Dance", I am not familiar with this
    dance.
    Sincerely,
    Michael
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Michael,
    (Hey my name is Michael too!)
    You are probably right that this is a bug in wsgen (not neccessarily
    WLS - wsgen
    != WLS)! I would try to remove all the output files generated by wsgen
    (i.e. ear
    file, jar file for EJB, directory used to build EJB, client.jar, etc),
    first.
    Be careful not to mistakenly remove the source files (i.e. build.xml,
    etc.), though.
    Then I would stop WLS (if it's not already stopped), and remove the .wl_temp_do_not_delete
    directory, under the applications directory of the domain (i.e. config/examples,
    etc) directory you are using. Don't worry - WLS will recreate this directory
    the
    next time it is started. Finally, I would make sure the build.xml had
    no "lingering
    references" to the queue stuff, and re-run wsgen. Also, make sure the
    information
    in the config.xml is accurate. Regardless of whether this "Bavarian Hat
    Dance"
    works or not, it's probably an "eight-legger" (or "six-legger")!
    Regards,
    Mike Wooten
    "Michael Poulin" <[email protected]> wrote:
    My further investigation has shown that this error comes if I set destinationtype="queue"
    in <messageservice /> in wsgen task ( in build.xml ). If destinationtype="topic"
    it works properly. The most confusing thing is that I have only theQueue
    configured
    in WL JMS server.
    This destinationtype="queue"/"topic" issue in my test-case appearesas
    an obvious
    BUG in WL Web Services, i.e. in wsgen.
    -Michael Poulin
    "Michael Poulin" <[email protected]> wrote:
    I have changed a few names and run the webservices/message example.The
    ConsumerClient.java
    when initially started has thrown exception regarding illegal character.
    The RECEIVING XML is generated by the server and, in case of ConsumerClient,
    all
    code is produced by wsgen utility. My guess is that the problem is
    caused
    by the
    line
    <FONT FACE=Helvetica><BR CLEAR=all>
    where quotes are missed.
    So, is this a bug in WL 6.1, sp 2 for Windows ? The output follows:
    ------------- RECEIVING XML -------------
    <definitions
    targetNamespace="urn:local"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="urn:local"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <types>
    <schema targetNamespace='urn:local'
    xmlns='http://www.w3.org/1999/XMLSchema'>
    </schema>
    </types>
    <message name="receiveRequest">
    </message>
    <message name="receiveResponse">
    <part name="result" type="xsd:anyType" />
    </message>
    <portType name="dpsfGetWSPortType">
    <operation name="receive">
    <input message="tns:receiveRequest"/>
    <output message="tns:receiveResponse"/>
    </operation>
    </portType>
    <binding name="dpsfGetWSBinding" type="tns:dpsfGetWSPortType"><soap:binding
    style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="receive">
    <soap:operation soapAction="urn:receive"/>
    <input><soap:body use="encoded" namespace='urn:dpsfGetWS' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace='urn:dpsfGetWS' encodingStyle="http://xml.apache.org/xml-soap/literalxml
    http://schemas.xmlsoap.org/soap/encoding/"/></output>
    </operation>
    </binding>
    <service name="dpsfGetWS"><documentation>todo</documentation><portname="dpsfGetWSPort"
    binding="tns:dpsfGetWSBinding"><soap:address location="http://localhost:7001/dpfswsGetInit/receiveMsg"/></port><
    /service></definitions>
    -------------- SENDING XML --------------
    <?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.
    org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns0:receive
    xmlns:ns0='urn:dpsfGetWS' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml
    http:/
    /schemas.xmlsoap.org/soap/encoding/'></ns0:receive></SOAP-ENV:Body></SOAP-ENV:Envelope>-------------
    RECEIVING XML -------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
    <HTML>
    <HEAD>
    <TITLE>Error 500--Internal Server Error</TITLE>
    <META NAME="GENERATOR" CONTENT="WebLogic htmlKona WebLogic Server 6.1
    SP2 12/18/2001
    11:13:46 #154529 ">
    </HEAD>
    <BODY bgcolor="white" alink="#397F70" link="#640078" vlink="#DE7E00">
    <FONT FACE=Helvetica><BR CLEAR=all>
    <TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
    <FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal
    Server Error</H2>
    </FONT></TD></TR>
    </TABLE>
    <TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100%
    BGCOLOR=white><FONT
    FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068
    <i>Hypertext
    Transfer Protocol -- HTTP/
    1.1</i>:</H3>
    </FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server
    Error</H4>
    </FONT><P><FONT FACE="Courier New">The server encountered an unexpected
    condition
    which prevented it from fulfilling the request.</FONT></P>
    </FONT></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Scanner has tokens:
    [OPENTAGBEGIN]
    [NAME] (META)
    [NAME] (NAME)
    [CHARDATA] (GENERATOR)
    [NAME] (CONTENT)
    [CHARDATA] (WebLogic htmlKona WebLogic Server 6.1 SP2
    12/18/2001
    11:13:46 #154529 )
    [TAGEND]
    [SPACE] (
    [CLOSETAGBEGIN]
    [NAME] (HEAD)
    [TAGEND]
    [SPACE] (
    [OPENTAGBEGIN]
    [NAME] (BODY)
    [NAME] (bgcolor)
    [CHARDATA] (white)
    [NAME] (alink)
    [CHARDATA] (#397F70)
    [NAME] (link)
    [CHARDATA] (#640078)
    [NAME] (vlink)
    [CHARDATA] (#DE7E00)
    [TAGEND]
    [SPACE] (
    [OPENTAGBEGIN]
    [NAME] (FONT)
    [NAME] (FACE)
    E7E00">
    <FONT FACE=e <-- bad character
    Exception in thread "main" Error at line:8 col:13 Line:8 ''' expected,
    got char[72]
    at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    at weblogic.xml.babel.parsers.StreamParser.streamParseSome(StreamParser.java:130)
    at weblogic.xml.babel.parsers.BabelXMLEventStream.parseSome(BabelXMLEventStream.java:46)
    at weblogicx.xml.stream.XMLEventStreamBase.hasNext(XMLEventStreamBase.java:135)
    at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:258)
    at weblogicx.xml.stream.XMLEventStreamBase.hasStartElement(XMLEventStreamBase.java:171)
    at weblogicx.xml.stream.XMLEventStreamBase.startElement(XMLEventStreamBase.java:164)
    at weblogic.soap.codec.SoapMessage.read(SoapMessage.java:86)
    at weblogic.soap.WebServiceProxy.receive(WebServiceProxy.java:464)
    at weblogic.soap.WebServiceProxy.invoke(WebServiceProxy.java:430)
    at weblogic.soap.SoapMethod.invoke(SoapMethod.java:186)
    at examples.webservices.message.ConsumerClient.main(ConsumerClient.java:57)
    Thank you.
    -Michael

  • How to consume a ABAP webservice in a  webdynpro app?

    Hi,
    I have a BAPI in ABAP that is exposed as a webservice. I want to use this to build a webdynpro app so that i can consume this webservice. This BAPI returns the Employee data. As soon as the person logs into the portal i am going to pass his login id to this BAPI so that it retrieves the Employee data for that user id. But i need to know the procedure of consuming this webservice in a webdynpro app. Any pointers in this regard will be greatly appreciated.
    Thanks,
    Arun E V

    Hi Arun,
    Consumption of a web service is univesal I guess so it wont matter if it is an ABAP webservice. For consumtion of webservice in Web Dynpro you can go through the following tutorials
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20car%20rental%20web%20service%20with%20web%20dynpro.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20car%20rental%20web%20service%20with%20web%20dynpro.pdf</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating%20an%20email-client%20using%20web%20dynpro%20and%20web%20services.pdf</a>
    Do reward points if it helps
    Regards
    Sid

  • Consuming ABAP Webservice in Webdynpro app

    Hi,
    I have wrote a webdynpro app for consuming ABAP webservice. I used the procedure in the link below
    http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
    Everything seemed to be went well, I created model and Webservice destinations. I have written the code for calling the webservice, which does not return data as part of response. I mean though the RFC returns data at the backend,its not showing the returned records in the webdynpro table.
    I have also tried checking the same by setting external break point. when the webservice is executed from my webdynpro app,it goes to the ABAP debugger and i could clearly see the records in the export parameters of RFC,but the same is not returned in the reponse object.
    Could any one let me know what could be missing. Any help is greatly appreciated?
    I have used the following code in Init method of my View
    Request_ZMYRFC input=new Request_ZMYRFC (model);
    wdContext.nodeRequest_ZMYRFC ().bind(input);
    ZMYRFC  req= new ZMYRFC (model);
    req.setPUserid("EDLAS00C");
    req.setPLtc("E");
    input.setMYRFC (req);
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
        wdContext.currentRequest_ZMYRFCElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeZMYRFCResponse().invalidate();
          wdContext.nodeReturn_res().invalidate();
         wdContext.nodeItem_res_ret().invalidate();
          wdContext.nodeILtcg_res().invalidate();
          wdContext.nodeItem_res_ltcg().invalidate();
        catch(Exception e)
          manager.reportException(e.getMessage(), false);
    Thanks
    Santhosh

    santosh,
    Check provider system defination in nwa for webservice.After this mapp the provider system and service group after wd app deployed.This is mandatory while consuming webservice in webdynpro for latest versions of CE7.11 or later.for reference check this article/document. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46
    Thanks,
    Murthy.
    Edited by: Murthy Karaka on Mar 22, 2010 12:59 PM

  • Consuming ABAP Webservice from Android device

    Dear Experts,
    I am ABAP developer (limited knowledge on android) trying to connect  Android device to a.SAP Webservice
    Through trial and error and help from SDN and Android forums i managed to link up the ABAP webservice and android using KSOAP2 API.Its working perfectly now but only when i save the username password for SAP access in the webservice settings in transaction SICF.I need to access the service by passing the username and password values through the SOAP request header but so far my efforts have failed me.im presently using the following code to pass my auth values.
    I would be grateful if you can point me in the proper direction.
           String NAMESPACE = "mynamespace (works properly without auth)";
            String METHOD_NAME = "mymethod (works properly without auth)";
            String SOAP_ACTION = "mynamespace/mymethod (works properly without auth)";
            String URL = "myURL{works properly without auth)";
            SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
            Request.addProperty("Purchaseorder","4500001168");
            Request.addProperty("Username", "myusername");
            Request.addProperty("Password", "mypassword");
           SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
           envelope.setOutputSoapObject(Request);
           HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
    try
               androidHttpTransport.call(SOAP_ACTION, envelope);
               SoapObject response = (SoapObject)envelope.bodyIn;
               String testValue =  response.getProperty("PoHeader").toString();
               AlertDialog alertDialog = new AlertDialog.Builder(this).create();
               alertDialog.setMessage(testValue);     
               alertDialog.show();
           catch(Exception e)
                e.printStackTrace();
    Thanx & Best Regards

    Hi,
    you can develop a custom Transport class wich extends the: HttpTransportSE class by authentication features.
    example:
    public class AuthTransportSE extends HttpTransportSE{
         private String username;
         private String password;
         public AuthTransportSE(String url, String username, String password) {
              super(url);
              this.username = username;
              this.password = password;          
         protected ServiceConnection getServiceConnection() throws IOException {
              ServiceConnection midpConnection = new ServiceConnectionSE(url);
              addBasicAuthentication(midpConnection);
              return midpConnection;
         protected void addBasicAuthentication(ServiceConnection midpConnection) throws IOException {
            if (username != null && password != null) {
                StringBuffer buf = new StringBuffer(username);
                buf.append(':').append(password);
                byte[] raw = buf.toString().getBytes();
                buf.setLength(0);
                buf.append("Basic ");
                org.kobjects.base64.Base64.encode(raw, 0, raw.length, buf);
                midpConnection.setRequestProperty("Authorization", buf.toString());
    Afterwards you can initialize the Webservice with:
    AuthTransportSE androidHttpTransport = new AuthTransportSE(URL, userName, pasword);
    Cheers,
    Dennis.

  • How to use ABAP Webservice to Trigger the start of BPMN

    Hello,
    My scenario is that i define a webservice in the SAP ECC system and import it in the process composer as the service interface. As to the start event, i set the above service interface and operation as the trigger service.
    After then, i call this webservice in the user exit of a T-Code. However, the BPMN is not started by this webservice call.
    Anyone can explain on this and tell me how to use the ABAP webservice as the starting event service interface?
    Thanks in advance
    Erick

    Hi Erick,
    When you develop a process model and use some arbitrary service interface in the message start event then this will be exposed on the Java / BPM system you deploed the process definition on.
    That allows you to start the process via this web service once you know its endpoint.
    So in case you want to start your process from the ABAP side you would need to call this endpoint on the Java side out of your ABAP system.
    Simply calling the web service / code on your ABAP system and hoping that this will also invoke the Java stack won't work I AFAIK.
    Best regards,
    Martin

  • How send and receive XML file from PI 7.0 via SSL

    Hello experts,
    Can you point to some documentation , examples , links where I can get some information on how to send and receive XML files using PI 7.0 via SSL ?
    Thanks in advance.

    Hi,
      refer to the following links.
    Enabling SSL
    http://help.sap.com/saphelp_nwpi71/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    Adapter specific security
    http://help.sap.com/saphelp_nwpi71/helpdata/en/f5/799add57aeee4f889265094a04695c/frameset.htm
    regards,
         MIlan Thaker.

  • ABAP webservices

    Hi Experts,
    Can any once explain about ABAP Web services , can handles high volumes of data  and how much it is good in terms performance ?
    Which is the best one in ABAP webservices and  XI webservices?
    Regards,
    Praveen Kumar

    Hi
    Web Services Development in ABAP [original link is broken]
    https://www.sdn.sap.com/irj/sdn/webservices-elearning
    http://www.sappro.com/downloads/UDDI.pdf

  • How to receive XML from Flex HTTP POST

    Hi,
    We curreontly have a setup where we have a FLEX frontend send an XML through a HTTP POST and awaiting a response also in XML. On the backend this is handled relatively simply by a PHP script that basically does the following:
    read data (in XML)from FlEX HTTP POST into a new temp XML file.
    execute a c++ program with the XML file as one of the parameter.
    return the result to FLEX
    We have decided to move to BlazeDS for various reasons.
    Looking at the examples bundled with BlazeDS they have a jsp example that returns an XML result to FLEX so that part is fine. I am trying to find an example of JSP (or Servlet) that is able to read the XML data from FLEX and write it into a temp XML file. I would then try to use runtime.exec to invoke a local C++ program to process the XML file the result of which will be sent back to FLEX.
    Any help will be very much appreciated!

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I&#8217;d avoid calling an executable just to process XML &#8211;your<br />application server would provide enough support for reading and writing XML, no?<br />Also, if you&#8217;re only planning on working with XML then even BlazeDS might<br />be overkill because its focus is on sending strongly typed ActionScript data efficiently<br />to and from a client (it&#8217;s true that it does have a proxy service, but<br />that is not involved with processing the actual XML data).<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>How complex is your XML? Do you need to resolve ids and<br />references or can you parse it top down in a single pass? There are several<br />well known libraries in Java for dealing with XML &#8211; the choice depends on<br />how you need to interact with the XML. Most of them take an InputStream as a<br />source for reading XML and you can get the InputStream from the servlet<br />request. Googling should turn up numerous examples.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Pete<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><br /><br /><div><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> khwong<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Sunday, September 28, 2008 12:09 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How to receive XML from Flex HTTP POST<o:p></o:p></span></p><br /><br /></div><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />khwong in <br><br /><br><br /><b>General Discussion</b> --<br><br />  How to receive XML from Flex HTTP POST<br><br /><br><br />Hi, <br><br /><br><br />We curreontly have a setup where we have a FLEX frontend send an XML through a<br />HTTP POST and awaiting a response also in XML. On the backend this is handled<br />relatively simply by a PHP script that basically does the following: <br><br /><br><br />read data (in XML)from FlEX HTTP POST into a new temp XML file. <br><br />execute a c++ program with the XML file as one of the parameter. <br><br />return the result to FLEX <br><br /><br><br />We have decided to move to BlazeDS for various reasons. <br><br /><br><br />Looking at the examples bundled with BlazeDS they have a jsp example that<br />returns an XML result to FLEX so that part is fine. I am trying to find an<br />example of JSP (or Servlet) that is able to read the XML data from FLEX and<br />write it into a temp XML file. I would then try to use runtime.exec to invoke a<br />local C++ program to process the XML file the result of which will be sent back<br />to FLEX. <br><br /><br><br />Any help will be very much appreciated! <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b69b23">How to receive XML from<br />Flex HTTP POST</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b69b23!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div><br /><br /></div>

  • Receive xml as string from OSB and pass it to Bpel

    I was given xml and DTD by our external partners. I need to receive this xml, parse this and insert some of the
    values of the elements into DB.
    Question1:
    Since I don't have WSDL, can I receive xml in string and pass it on to OSB BS which calls Bpel process?
         If yes, how and can I get any example?
    How do I set up osb bs service to talk to bpel?
    I have installed oracle soa suite 10g with patch set 4. This runs with Oracle AS. I have my Bea weblogic 10.3 with OSB installed.
    Both the servers are running seperately.

    If I use
    string to xml --- fn-bea:inlinedXML()
    How do I extract a value of an element? When I log the xml that got extracted from a string, I only see the values of elements with no element names:
    eg: if incoming string format of xml is:
    <Customer>
    <name>aaa</name>
    <address>bb</address>
    </Customer>
    After fn-bea:inlinedXML($body)
    I see:
    aaa
    bbb
    in the log, but with no element names

  • JAVA webservice to ABAP Webservice

    Hi,
    There is a Webservice developed in Java and published.
    The same webservice we are now develping in ABAP. Though there is no change in the functionality of the webserice, the WSDL generated for ABAP webservice is looking different than the one for JAVA. How to resolve this issue? I do  not want to ask the service consumer to regenerate the Clinet Proxy for the new WSDL.
    Could you please help me in resolving this issue?
    Thanks & Regards,
    Kishore Babu T

    Hello Johannes,
    Which WSDL do I need ? In the wsnavigator I can choose RPC or Document, and then Default or SAP_WSDL to download the WSDLs.
    Try this: [Accessing a Service|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b8/a3cca166d440c29931c0c5494c32e5/frameset.htm]
    And do I need to publish the webservice (which I want to consume) on the Java stack ? or ist it already published when the wsnavigator can access it ? (the service resides on the Java stack, and I want to consume it from the ABAP stack from the same system)
    In short, no. You can safely use the Web service without publishing it - as Olivier explained, you need only the WSDL.
    The "publishing" term is usually used when you register (publish) a Web service in the UDDI server or the Services Registry. Publishing is only relevant if you want other people to be able to locate the registered service in the UDDI server.
    Hope this helps,
    Rossen

  • Receive XML with Business Connector, convert to IDoc

    Hi all,
    I am trying to receive XML files with SAP Business Connector (4.7) and convert them to IDOC and then forward the IDoc file to SAP System.
    At the moment, I have to do the testing for this.
    I don't know how to send the XML file to the special port (5555) of the server. I read that there are serveral possibilities like http, mail, ftp. Can anybody give me an advice how this works?
    Next problem is to get the created IDoc file to the SAP system. The SAP server is added in the SAP Business Connector and the connection works.
    I would be very pleased if anybody could help me.
    Thanks in advance!
    Kai

    hi,
    What i understand from your scenario is XI> BC> SAP system.
    1)XI-->BC
    U need to configure XI's-BCAdapeter(as receiver).
    in URL specify teh follwoing :
    http://<hostname>:5555/invoke/folder1.folder2./<service-to-be invoked>
    together with the username and password.
    2) BC--> SAP
    To invoke an IDoc, go to Routing rules and specify the sender, receiver, and the Message Type(IDoc name). In the next page, specify the name of the flow service to be created. and the Flowservice to be invoked whenever a message comes in.
    Hope this gives you some input.
    Regards,
    Siva Maranani

  • Serialisation failed  : ABAP webservices  as webdynpro model

    Hi All,
             I have created a webdynpro application consisting of a ABAP webservice model  . This webservice takes some input parameters which are  optional and give output which we are displaying as webdynpro table.. we have successfully deployed and run it on our development server .
    We have transported the EAR to Quality server after changing the target address under model> webservice> logical port corresponding to Quality webservice URL..
    But at quality server it is giving "Serialisation failed" for particular input parameter. for rest of the input parameter proper output is coming  .
    Please tell the possible solution.
    regards
    Poonam

    The input that you are trying to give might not be complaint with the data that you are providing .. go to http://server:port/wsnavigator and give the data there and test .If the data type and the length of the input parameter are not complaint with the data that you are providing u will get that error

Maybe you are looking for