Server Proxy attachment with Attachment(s)

Hi everyone,
I have the requirement to create a server ABAP proxy that will provide a SOAP response with an attachment.   That is, the webservice will take the request message, do some work, and then send the response back along with a SOAP attachment.
If I create a consumer proxy I can send the attachment out without an issue. I just cant seem to do it with a server proxy though.
Does anyone have sample code on how to do this?
SPROXY -> create the server proxy (inbound sync interface) -> code that goes inside of the method??
Thanks in advance.

Thanks for the link Trevor.  That piece of code is something that we can already do.   The code that I am looking for would get executed inside of the method during the request/response.
For example, if I go into the ESR and build an Inbound Sync interface.  Then I go into SPROXY on the ECC box and build a proxy for it.  Next, I go into the provider class, open the method, and insert the code.
In this manner, a request coming in would trigger a response that would include an attachment (assuming there was a way to do this).

Similar Messages

  • Sync ABAP Server Proxy - Attachment in Response possible ?

    Hi I need to send an attachment in a synchronous ABAP Server Proxy.
    I proceeded as follows:
    1. design sync inbound interface in PI
    2. generate abap server proxy
    3. implement this abap proxy
    4. tried to attach file to response like this:
        data server_context type ref to if_ws_server_context.
        data attachment_prot type ref to if_wsprotocol_attachments.
        data attachment          type ref to if_ai_attachment.
        data attachments         type prx_attach.
        data lo_protocol         type ref to if_wsprotocol.
        data lo_payload_protocol type ref to if_wsprotocol_payload.
        try.
            server_context = cl_proxy_access=>get_server_context(
            attachment_prot ?= server_context->get_protocol( if_wsprotocol=>attachments ).
            attachment = attachment_prot->get_attachment_from_binary(
                data       = lv_xdata
                type       = if_ai_attachment=>c_mimetype_pdf
                name       = 'my attachment'
            append attachment to attachments.
            attachment_prot->set_attachments( attachments ).
          catch cx_ai_system_fault .
            output-mt_get_documents_resp-fault-fault_text = 'cx_ai_system_fault'.
            output-mt_get_documents_resp-fault-fault_url = 'ERR001'.
        endtry.
    However I cannot see any attachment in the response.
    Q1: is it possible at all to create attachments in sync server abap proxy?
    Q2: if it is, what is wrong with my coding?
    cheers
    simon:)

    Veronica,
        Unfortunately, this was not possible, due to the system EHP state.
    First after upgrade this functionality will be possible ( ECC 6.0 EHP5 - corresponding to NW AS EHP2 )
    For an example, as Stefan pointed out, you might want to open OSS if your system is up-to-date and you need one.
    best regards
    Simon:)

  • Server proxy implementation with synchronous inbound interface

    <b>Hi all,</b>
        How we can implement a server proxy with synchronous inbound interface.If any example weblog please send the link.
    <b>thanks,
    Kishan.</b>

    Hi,
    For sync interface. You have to have a sync MI with both request and response message type.
    when you generate a proxy for the same , you will get a method called execute_synchronous, and import and export parameter.
    You don't have explicitly identify anywhere that the interface is sync.
    Regards
    Vijaya

  • Weblogic server proxy issues with twitter4j api

    I am using weblogic 10.3.4 using twitter4j Api running behind the proxy. I am not sure why I am getting this error. I do have the proxy name,port number, userid and password set in the twiiter4j api. The same code works fine for me in tomcat behind proxy. When I was trying to migrate from tomcat to weblogic i am getting following error. Any help is really appreciated. I am not sure its the issue with weblogic
    Thanks for the help
    Vinoj
    <Failed to communicate with proxy: tmsproxy.tms.toyota.com/80. Will try c
    onnection stream.twitter.com/443 now.
    weblogic.net.http.HttpUnauthorizedException: Proxy or Server Authentication Required
    at weblogic.net.http.HttpURLConnection.getAuthInfo(HttpURLConnection.java:297)
    at weblogic.net.http.HttpsClient.makeConnectionUsingProxy(HttpsClient.java:440)
    at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:351)
    at weblogic.net.http.HttpsClient.New(HttpsClient.java:527)
    at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:239)
    Truncated. see log file for complete stacktrace
    Dumping beanImpl -> ejbName map
    weblogic.management.j2ee.mejb.MejbBean: Mejb
    connect timed out
    Relevant discussions can be found on the Internet at:
    http://www.google.co.jp/search?q=944a924a or
    http://www.google.co.jp/search?q=24fd66dc
    TwitterException{exceptionCode=[944a924a-24fd66dc 944a924a-24fd66b2], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLim
    itStatus=null, version=3.0.4-SNAPSHOT(build: f34757f6d8512eca8028601d9de303e0173d8d42)}
    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)
    at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
    at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
    at twitter4j.TwitterStreamImpl.getFilterStream(TwitterStreamImpl.java:304)
    at twitter4j.TwitterStreamImpl$7.getStream(TwitterStreamImpl.java:292)
    at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:462)
    Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:565)
    at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:287)
    at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:364)
    at weblogic.net.http.HttpsClient.New(HttpsClient.java:527)
    at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:239)
    at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:255)
    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java

    Hi,
    Has anybody got the solution like 64-bit libroxy or its source code to compile as 64-bit? I'm facing the same problem.

  • ABAP Server Proxy OR RFC - for attaching a file

    Hello ABAP gurus,
    Just to give a brief background, systems involved are ERP and PI
    Certain Files (3 files to be exact) are generated in the ERP directory/file system
    I need to transfer these files to PI "without" using the readily available FTP/NFS adapters (this is a limitation - no use of direct FTP is allowed)
    Making the directory as a "shared" directory between ERP and PI is also not an option.
    With the scenario above, I though of using an RFC or an ABAP Server Proxy to attach the said files to send them to PI
    Which is the better way to do it?
    I've seen a documentation for the ABAP Server Proxy that makes it possible to attach files to the proxy message, but for RFC I don't know if this is possible?
    Your expert advise is highly appreciated

    hI,
    Use class CL_PROXY_CLIENT in the program and method IF_PROXY_CLIENT~EXECUTE.
    You can refer documentation of this class as well as if you will search on any search portal using name of this class, you will get the briefe idea with the refernce procedure too.
    Unfortunately I am unable to post you few links but try search on it, hopefully you will get it.
    try below link.
    <link to blocked site removed by moderator>
    Edited by: Thomas Zloch on Oct 7, 2011 10:37 AM

  • Sending PDF as an attachment in the ABAP server proxy

    Hello All,
    I have a synchronous SOAP to ABAP PROXY.
    In the response ABAP server proxy i need to attach PDF file as an attachment.
    Could you please suggest any ideas of attaching PDF file as an attachment in the SERVER PROXY response.
    Thanks in advance.
    Hari

    Hi Hari,
    check this link: http://help.sap.com/saphelp_nw70/helpdata/en/51/d5cd16235e4643ae8ec92395c4ad97/frameset.htm
    Also search on SDN, you will get many thread links with same question
    ABAP Proxy Attachment
    Regards,
    Praveen Gujjeti

  • Problem with Consuming ABAP Server Proxy WSDL in InfoPath

    Tried to design a InfoPath (MS Office 2003) form from a WSDL file of a web service generated from an ABAP Server Proxy in a NW2004s SP10 system.  InfoPath rejected this WSDL with error “InfoPath cannot use the selected Web service method for receiving data because the method does not provide valid XML data”.  Tried other WSDL files from other web services from ABAP Proxy with InfoPath, all got rejected.
    Validated the WSDL file with XMLSPY, no error.  Tried to import the WSDL into XI 3.0, no error.  Also tried the WSDL in .NET C#, also worked fine.  It seemed only InfoPath does not like this WSDL from ABAP Proxy. 
    Created a similar web service in XI 3.0 and InfoPath had no problem with its WSDL.  Then I compared the two WSDL files.  There are differences.  After try and error on changing the differences, I have nailed down to the XML tag that caused the problem.  Please see the extracted WSDL line attached at the end.  In the XI 3.0 generated WSDL the wsdl:message and the wsdl:part have the same name.  In the ABAP Proxy generated WSDL the wsdl:part has the name “Parameters” which is different from the wsdl:message.  After I copied the wsdl:message name to the wsdl:part name, InfoPath accepted the WSDL file without any problem.
    I know the fix but I like to find out the root cause.  Is this a known issue?  Did we miss some configuration setting that’s causing this issue?  Any help will be much appreciated.
    WSDL from NW2004s SP10 ABAP Proxy
    <wsdl:message name="RegionR3GetList_Req_MT">
        <wsdl:part name="Parameters" element="tns:RegionR3GetList_Req_MT"/>
    </wsdl:message>
    <wsdl:message name="RegionR3GetList_Resp_MT">
        <wsdl:part name=" Parameters" element="tns:RegionR3GetList_Resp_MT"/>
    </wsdl:message>
    WSDL from XI 3.0 Interface
    <wsdl:message name="RegionR3GetList_Req_MT">
        <wsdl:part name="RegionR3GetList_Req_MT" element="tns:RegionR3GetList_Req_MT"/>
    </wsdl:message>
    <wsdl:message name="RegionR3GetList_Resp_MT">
        <wsdl:part name="RegionR3GetList_Resp_MT" element="tns:RegionR3GetList_Resp_MT"/>
    </wsdl:message>

    Anne Tarnoruder has pointed out to me that her SDN article "Consuming SAP Enterprise Services in a Microsoft Office InfoPath Form" has described the the cause and workaround of this issue on page 9.  I am extracting it below and mark this thread as answered.  Thanks to Anne but not sure how I can award point to her.
    Currently SAP supports only the Document style of WSDL, and not the Microsoft-specific RPC style, which causes a problem when consuming SAP services in the Microsoft environment. In this example, you need to apply a workaround that involves a minor correction of locally-stored WSDL files:
    a. In the Project Explorer toolbar, click the Show all files icon and expand the Web reference folder.
    b. For each Web reference in the project, perform the following steps:
    c. Open the WSDL file, replace all instances of <wsdl:part name="parameters" with <wsdl:part name="parameter" (remove the s in parameters) and save the file.
    d. Right-click the Reference.map file and choose Run Custom Tool to invoke a utility that generates code for XML Web services. This recreates the local proxy.

  • Debugging a server proxy with attachments

    Hello,
    Although there are other questions posted about debugging server proxies, I can't figure out how I can debug my server proxy that receives attachments. If I debug the program, because there's no attachment at that point, I get other errors.
    There's an unhandled exception in the coding. When receiver SAP system receives the message, the queue is stopped. Can I somehow restart and debug afterwards this erronous message that does carry the attachment?
    Thanks,
    Gökhan

    Hello Gökhan,
    did you try inserting an endless loop in the server proxy and start debugging the program from the SM50? This is the way I usually catch processes crossing system borders.
    Regards,
    Jörg

  • Creation of Server Proxy for  Message interface with External Defination

    Dear All,
    I am getting a problem while generating a server proxy for the inbound interface . The request message used in the inbound interface is a external definition which is uploaded using a XSD file. The XSD file was supplied by a third party which is having very high complex strucuture and used lot of abstract data types in the design. When i tried to generate the proxy in the R/3 system (Transaction SPROXY) for the inbound interface i am getting following error.
    Interface uses external and internal message definitions
    Message no. SPRX122 *
    Diagnosis
    In a message interface you can use messages from different sources:
    Message types and fault message types edited in the Enterprise Services Repository
    Messages imported into the Enterprise Services Repository (external definitions, RFC, IDoc)
    In the current message interface, message types from different sources have been used. Since messages from these different sources must be handled differently during proxy generation, such a mixture of messages within a message interface is not possible.
    System Response
    The interface cannot be generated.
    Procedure
    Change the interface definition accordingly in the Enterprise Services Repository.
    Please guide me, how to generate the proxy for the interface with external defination message. I could nt geneate manullay, because it is having very high complexity and its a big structure.
    Is there is any way to generate the proxy for interface with external definition
    Regards
    Vijayanand

    Hi,
    i.       Import your message schemas from external definitions, or RFCs or IDocs from SAP systems. These definitions already contain data types.
    ii.       Create a message interface and reference the messages of the external definition, or the RFC or IDoc message.
    Check this, it may help you
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/01623c4f69b712e10000000a114084/content.htm
    REgards
    Seshagiri

  • RFC with Multilevel Hierarchy call from Server Proxy

    Dear Experts,
    We would like to call BAPI inside a server proxy.
    PI has created an interface structure exactly identical as the BAPI structure, but while generating ABAP proxy, system has added additional controller structure for each hierarchy.
    Now our ABAP team is facing the difficulty to map Proxy structure with BAPI Structure as now the structures are not identical any more due to control structure .
    Also since the BAPI has multilevel hierarchy and to fill the bapi structure from proxy structure (which is having the same structure as bapi but with control records) there are lots of loops required.
    Please share your thoughts on how to get rid of looping on proxy structure when both the structure are identical but only control structure has been added to proxy structure.
    Also would like to know if we can restrict the control structure generation during proxy generation process.
    - Shri

    Yes, you have to read and map the abap proxy structure to bapi structure.
    Take a look here:
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/585f3c482a7331e10000000a114084/content.htm

  • Need some quick help with server proxy on PI 7.1 system

    Hi,
    I am implementing a server proxy on the PI 7.1 system to do some logging to a table. So, when I go the the proxy in sproxy and generate it, in the interface section on the properties tabs I only see a drop down that says point to point enabled. There is no implementing class to click into and thus not method to populate with the custom code. Some direction would be appreciated, I have been working 7.0 for a while, so the missing implementing class is new to me! I know the method name has changed from the execute_asycronous etc... Am I going to the wrong place now to find the implementing method?
    Thanks,
    Chris

    Whoops! Brain cramp. accidentally set the interface to outbound and not inbound in the ESR lol. Sorry.

  • Create a abap server proxy and consume the service with the pi WS Navigator

    hi all:
    i create a abap server proxy ,i use the t_code "sproxy"  to generate the proxy, and then write the abap code to implemente the method;    then i use the T-code (soamanager)  to define the  endpoint,  but when i click the " Open WSDL document for selected binding" to get the WSDL  file ; some error occur,the error is follow:
    ==========================================================================
    Service cannot be reached
    What has happened?
    URL http://foxxi:50000/sap/bc/srt/wsdl/bndg_000C2938EF591DEE8A9A8D3DD5CCB6AD/wsdl11/allinone/ws_policy/document call was terminated because the corresponding service is not available.
    Note
    The termination occurred in system XIF with error code 403 and for the reason Forbidden.
    The selected virtual host was 0 .
    What can I do?
    Please select a valid URL.
    If it is a valid URL, check whether service /sap/bc/srt/wsdl/bndg_000C2938EF591DEE8A9A8D3DD5CCB6AD/wsdl11/allinone/ws_policy/document is active in transaction SICF.
    If you do not yet have a user ID, contact your system administrator.
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:FOXXI_XIF_00-v:0-s:403-r:Forbidden
    HTTP 403 - Forbidden
    Your SAP Internet Communication Framework Team
    ==========================================================================
    when i go to the ws navigator to consume the service  i can not find the service which i define, but some system content display ,  what's the problem

    had a chance to look at this?
    /people/jitender.chauhan/blog/2009/04/20/service-enabling-in-abap

  • Deploying OracleAS Single Sign-On Server Cluster setup with a Proxy Server

    I have a question regarding setting up a OracleAS Single Sign-On Server in a cluster mode along with a Apache Proxy Server.
    Step1 - I'm planning to install OracleAS Single Sign-On Server on two nodes sso1.oracle.com and sso2.oracle.com in a Cluster. Both the nodes in the cluster accesed via Load balancer i.e sso.oracle.com.
    Step2 - Then I'm planning to setup two Apache Servers as Proxy Server i.e apache1.oracle.com and apache2.oracle.com. These two apache servers are accessed via Load balancer i.e apache.oracle.com
    The question I have is
    1)while setting up OracleAS Single Sign-On cluster I would provide Load balancer host i.e sso.oracle.com as part of the install. So that all the user requests coming to sso1.oracle.com/sso2.oracle.com get redirected back to Load balancer.
    2)But as part of the Apache Server proxy setup I am also supposed to redirect from SSO server to apache.oracle.com
    But using ssocfg.sh I can only provide either sso.oracle.com or apache.oracle.com NOT BOTH.
    In this case what I should
    1) avoid redirecting to sso.oracle.com instead redirect only to apache server OR are there any other methods to configure.
    I have above setup working fine in DEV environment, where there is only one sso server and one apache proxy server. Problem really comes when I go for setting OSSO server as a cluster in this case I have to redirect to load balancer as well as proxy server?

    why not using webcacheclustering between the apache and the 2 sso's?

  • Proxy Server 3.6 with Identity Server 5.1!

    Hi All,
    I'm doing a Proof of Concept on integrating Identity Server 5.1 with proxy server 3.6. The proxy server is configured as a reverse proxy for another web server (since the web server is not supported by agent pack).
    I've configured the reverse proxy and add the agent to the proxy. However, each time after auth. in the Identity server and return back to the reverse proxy, it'll go to http://rproxy.domain.com/.domain.com not http://rproxy.domain.com.
    Moreover, even the user session is invalid, the user can go to the reverse proxy without re-auth even I've disable all the cache in the proxy server.
    Is it possible to use reverse proxy with identity server? If yes, how to config?
    Thanks
    Clive Chan

    Hi Clive Chan,
    i am also have the same problem, can you tell me which patch have you add to solve the problem?
    Thanks a lot!
    Angus

  • BEA WebLogic Commerce Server 3.5 with MS SQL Server 2000 as DB

    Ooops !
    Sorry but in my last mail I forgot to attach the file with the
    stdout log with the described example portal errors. Here is
    the message and the file.
    Davide Pozzi
    Hi to all.
    I have a problem using BEA WebLogic Server 3.5 (with service
    pack 1) with SQL Server 2000 as the database. I followed the
    instructions for SQL Server 7 included in the file readme.txt > in WLCS_35_DDLand the (thin) Web documentation on the
    subject. The I tried to run the example portal and the
    templates examples. All is working well apart from the fact
    that some data seem not to be taken from the database. For
    example the example portal lacks the news titles in the "News > Index" portletand the ads in the "AcmePromotion" portlet. In > the templates examples some logo
    are missing (the E-Business
    Control Center loads, but no campains or discounts, etc. are
    loaded). When I start the example portal, a lot of exceptions > arise. In theattached text file the stdout log of Commerce
    Server is reported.
    Can anyone tell me a hint to solve these problems ? There are > known problemssetting up SQL Server 2000 with Commerce Server > 3.5 ? I've seen that Commerce
    Server 3.5 is not yet certified > for SQL Server 2000, is BEA going to certificate
    it ?
    >
    Thank you in advance for any help.
    Davide Pozzi[errors.txt]

    Ooops !
    Sorry but in my last mail I forgot to attach the file with the
    stdout log with the described example portal errors. Here is
    the message and the file.
    Davide Pozzi
    Hi to all.
    I have a problem using BEA WebLogic Server 3.5 (with service
    pack 1) with SQL Server 2000 as the database. I followed the
    instructions for SQL Server 7 included in the file readme.txt > in WLCS_35_DDLand the (thin) Web documentation on the
    subject. The I tried to run the example portal and the
    templates examples. All is working well apart from the fact
    that some data seem not to be taken from the database. For
    example the example portal lacks the news titles in the "News > Index" portletand the ads in the "AcmePromotion" portlet. In > the templates examples some logo
    are missing (the E-Business
    Control Center loads, but no campains or discounts, etc. are
    loaded). When I start the example portal, a lot of exceptions > arise. In theattached text file the stdout log of Commerce
    Server is reported.
    Can anyone tell me a hint to solve these problems ? There are > known problemssetting up SQL Server 2000 with Commerce Server > 3.5 ? I've seen that Commerce
    Server 3.5 is not yet certified > for SQL Server 2000, is BEA going to certificate
    it ?
    >
    Thank you in advance for any help.
    Davide Pozzi[errors.txt]

Maybe you are looking for