Customize SOAP request & response

Good Day to All,
I have a java web services, i need to customize my request and response to meet my client needs.
You will find herunder a sample data of what i want.
My original service
{color:#ff0000}*Request*
{color}<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://common/">
<ns1:GetClientGlobalPositionServicesElement>
<data></data>
<header>
<product></product>
<sessionId></sessionId>
</header>
</ns1:GetClientGlobalPositionServicesElement>
</soap:Body>
</soap:Envelope>
{color:#ff0000}*Response*
{color}<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<GetClientNewSessionResponseElement xmlns="http://common/">
<data>
<sessionId>12224094652581</sessionId>
</data>
<header>
<product/>
<sessionId>12224094652581</sessionId>
</header>
</GetClientNewSessionResponseElement>
</Body>
</Envelope>
My service should be as follow :
*_{color:#ff0000}Request{color}_*
<soap:Envelope>
<soap:Body>
<GetClientGlobalPositionServicesElement>
<data></data>
<header>
<product></product>
<sessionId></sessionId>
</header>
</GetClientGlobalPositionServicesElement>
</soap:Body>
</soap:Envelope>
{color:#ff0000}*Response*
{color}<Envelope>
<Body>
<GetClientNewSessionResponseElement>
<data>
<sessionId>12224094652581</sessionId>
</data>
<header>
<product/>
<sessionId>12224094652581</sessionId>
</header>
</GetClientNewSessionResponseElement>
</Body>
</Envelope>
All namspace and attributes should be remove.
Kindly advice how can this be done, knowing that handler were used but unable to remove envelope attribute.
Thank you in advance
Emile BITAR

if you're able to get the whole soap-envelop in a temp variable you could use the embedded java in the next thread : Removing namespace from xml  created
to remove the namespaces

Similar Messages

  • Create WSDL from SOAP request, response and endpoint URL

    We have a program that does not create WSDL for us but we do have a SOAP request, response XML file and the endpoint URL as well.
    How can I create WSDL file from these?
    If that is not possible, how can I create a Java web service client (JEE 5.0) when I have only the SOAP request and response XML and the endpoint URL? Some tutorial or any explanation to point me to the right direction would be highly appreciated.
    Thank you very much,
    Genti

    The endpoint is:
    http://servername/appname/service/rpcrouter
    and we have SOAP request and repsonse that we can build from the application but also the documentation that is provided
    The documentation says about the web service:
    Built on top of a pre-Axis version of Apache SOAP
    No WSDL support
    Uses literal encoding for Web Service calls
    Adding WSDL at the end of the endpoint does nothing at this point.
    Thank you for the reply though,

  • View the webservice soap request/response

    Hi,
    I am in wls81sp4. I have some webservice developed in workshop. And I created webservice controls for them. When the webservice is called in jsp, I couldn't see the request/response soap message on wls console even though I set -Dweblogic.debug.webservice=true -Dweblogic.webservice.verbose=true. I have another webservice, the client is the proxy, and I can see the message on console.
    How can I see the message from calling the control? Thanks

    HI Ronald,
    To get the SOAP Fault into your orchestration:
    1) On the Send port in BizTalk:
       a) WCF Adapter Properties, Messages tab: Propagate Fault Message = true
       b) WCF Adapter Properties, Messages tab: Inbound message body: Either use "soap:Body" or use a path that extracts your message OR /*[local-name()='Fault'] to get the SOAP fault
       c) "Enable routing for failed messages" - this has no impact on the SOAP Fault. So you probably want it set to true to handle real transmission errors (non SOAP faults).
    2) On the Send port within your orchestration
       - Select the operation & then "New Fault Message"
       - Set the message name to SoapFault (or whatever)
       - Set the message type to be the referenced schema: BTS.soap_envelope_1__2.Fault. (If this was a SOAP 1.1 operation you would use BTS.soap_envelope_1__1.Fault).
    3) In the Scope around your Send operation
       - Add new exception handler
       - Select "Exception Object Type" to the port-name.operation-name.SoapFault you created in step 2
       - Specify the object name, e.g. Fault
       - Fault is now the XML of the SOAP Fault & you can use XPath to get the Fault Reason and Message elements.
    Refer:
    How to catch and process SOAP faults
    MSDN has explained the process in detail:
    Using BizTalk Server Exception Handling. You can blindly follow it.
    Please mark as answer or vote as helpful if my reply does

  • Logging the SOAP request/response from rules engine

    Hi All,
    We would like to log the soap requests and response from the rules engine.
    The determinations-server.war is deployed on a weblogic server and we are not using seibel connector.
    Is it possible to log the soap messages for debugging purpose.
    Thanks,
    Suraj

    Hi All,
    We would like to log the soap requests and response from the rules engine.
    The determinations-server.war is deployed on a weblogic server and we are not using seibel connector.
    Is it possible to log the soap messages for debugging purpose.
    Thanks,
    Suraj

  • How to watch SOAP requests/responses

    Hello,
    I am developing web services on 9.0.4. I want to watch the SOAP Requests that are sent from client and that are received from server. Is there any monitoring service provided by Oracle ?
    Thanks
    Kiran

    On 904, you have the abilitty to use an HTTP proxy tool between the client and the service. This has to be driven from the client side. You can find informations on the way to do this with JDeveloper here:
    http://www.oracle.com/technology/products/jdev/collateral/tutorials/9050/mvcmodel_webservices_tut.html#test
    If you need to view it from the server side, you can turn on debugging at the servlet level, to get some more information, but this should not be used on production system. To get the list of options, use "java -jar oc4j.jar -listProperties". Those of interest to you are:
    http.request.debug - Used to gate whether to dump http traffic to console
    http.error.debug - Gates whether to dump HTTP exceptions to the console
    On production system, your best option will be to use a servlet filter :-(
    If you are using Windows to host your services, you can also take a look at Mindreef's SOAPscope to capture all the traffic at the NIC level.
    Hope this helps,
    Eric

  • Is there a way to attach request/response handlers in BEA Weblogic Workshop similar to Axis?

    Apache Axis allows developers to attach Request/Response handlers to do
    stuff like logging, authorization check etc.
    Something like...
    public class MyHandler extends org.apache.axis.handlers.BasicHandler {
    public void invoke(org.apache.axis.MessageContext msgContext) throws
    AxisFault
    Does BEA Weblogic Workshop has a similar capability?
    Thanks.
    Best Regards
    Hitesh

    Hi Hitesh,
    The logging in Workshop user log4j and is configured in the
    <WL-HOME>/weblogic700/server/lib/workshopLogConfig.xml file.
    To log the SOAP responses, add the following lines in the xml file:
    <category name="knex.SoapJwsReq"> <priority value="debug" /> <appender-ref
    ref="MYLOGFILE" /> </category>
    <category name="knex.SoapJwsResp"> <priority value="debug" /> <appender-ref
    ref="MYLOGFILE" /> </category>
    The MYLOGFILE can be configured by copying from the already defined
    appenders. The file location is relative to the domain directory.
    <appender name="MYLOGFILE" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="mylog.log" />
    <param name="Append" value="true" />
    <param name="MaxFileSize" value="3000KB" />
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1}: %m%n"/>
    </layout>
    </appender>
    As of now, the SOAP request message is not logged, only the responses are
    getting logged. This will be corrected within the next few days. Please also
    note that if you are using the Test View for running the web service, you
    should use the 'Test XML' tab for seeing the SOAP requests/responses. The
    'Test Form' tab uses HTTP GET, and hence you will not see any SOAP messages.
    Do let me know if you have any further queries.
    Regards,
    Anurag
    Workshop Support
    "Hitesh Seth" <[email protected]> wrote in message
    news:[email protected]...
    Thanks Anurag. What is the best recommended way in BEA Weblogic Workshop
    today to implement a logger which will log all SOAP Requests & Responses
    into a custom logging system.
    Best Regards
    Hitesh
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]...
    Hitesh,
    You can modify the SOAP request and response payload by using ECMA
    Script
    and XMLMaps.
    In the current release, Workshop does not support 'handlers' for SOAP
    messages.
    Regards,
    Anurag
    Workshop Support
    "Hitesh Seth" <[email protected]> wrote in message
    news:[email protected]...
    Apache Axis allows developers to attach Request/Response handlers to
    do
    stuff like logging, authorization check etc.
    Something like...
    public class MyHandler extends org.apache.axis.handlers.BasicHandler {
    public void invoke(org.apache.axis.MessageContext msgContext)throws
    AxisFault
    Does BEA Weblogic Workshop has a similar capability?
    Thanks.
    Best Regards
    Hitesh

  • How to get the soap request for the particular operations in CRM

    Hi friends,
    We got the wsdl files of different modules from the crm(Oracle CRM on demand). We converted the wsdl files to java classes using axis1.4 wsdl2java tool.Now all create,update,download,lookup operations are implemented in java using the generated classes and they are working properly with the client stub.Now the problem is how can we get the soap request and response of particular operations that we submitted to CRM .The request and response should get by using java code.We are looking no tool for the soap request/response. We are working in Eclipse IDE.
    thanks in advance...

    Refer the link. It might tellsa about attaching to transport request but using the way you can find also -
    Re: How To Transport STANDARD TEXTS??
    Regards,
    Amit
    Reward all helpful replies

  • PO 7.4: NW BPM: HTTP Error response for SOAP request or invalid content-type.HTTP 200 OK

    Hi Experts
    I am trying to call NW BPM scenario(File to BPM) from PI, and using below adapter config.
    I am getting below error.
    Failed to call the endpoint: Error in call over HTTP: HTTP 200 OK
    SOAP: Call failed: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Any idea how to fix this issue?
    Thanks,
    Sandeep Maurya.

    Hi Sandeep,
    Test the URL from your browser and check the proxy settings as well.
    Refer the below links
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT
    SOAP: Call failed: java.io.IOException: Failed to get the input stream from socket: java.net.SocketException: Connection…
    Regards
    Bhargava Krishna

  • Request Response Bean for SOAP Sender Adapter

    Hi Friends,
    Is it possible to use  Request Response Bean Module described (FIle to RFC to File here) for SOAP(sender) and JDBC(receiver) adapter?
    I want to configure SOAP to JDBC to JDBC scenario.
    http://wiki.sdn.sap.com/wiki/display/HOME/UsingRequestResponseBeanModuleinFILE+Adapter
    Scenario:
    I will do SOAP adapter call Asynchronously and JDBC receiver adapter will select data from database. This response will go back to SOAP adapter and then SOAP will divert this response to another JDBC adapter. This JDBC adapter will insert data into another database.
    I do not want to use ccBPM. Is there any design approach to implement this scenario?
    Thanks,
    Sandeep Maurya

    Hi Sandeep,
    SAP says SOAP sender adapter does not support Modules. You can serch Help.sap (for SOAP sender channel) to find the same.
    I would suggest to use AXIS adapter (provides all the functionality of SOAP) and supports the Modules as well.
    I have used the Module beans that you mentioned in the past... but it is not consistent with its processing.. sometimes it stucks with Message ID issue... I have seen same issue faced some other friends as well .. search on SDN you will find the issue with these modules...
    Using BPM would be another option...
    Thanks,
    Sunil Singh

  • SOAP Receiver Error: HTTP Error response for SOAP Request

    Hi gurus,
    I'm facing a weird error in File --> PI 7.31 java only --> soap receiver proxy.
    The other interfaces runs well. just one get the the following error:
    Exception caught by adapter framework: java.io.IOException: Error receiving or parsing request message: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.
    I check the payload and test in the inbound proxy. on error.
    Any hints?
    Thanks a lot!
    regards
    Christine

    Hello Christine,
    I faced the same issue,
    You can use the beans below to overcome the error.
    And charset should be utf-8

  • Need to get SOAP request and SOAP response message.

    Hi All,
    I need to know that how can I get the SOAP request and SOAP response message. Now I am using WSDL2Java tool from Axis to generate the stub classes (such as ServiceLocator, SoapBindingStub, and soapPort ) and applying the classes to make the SOAP request. I have seen the solution for getting the SOAP request with Dynamic invocation interface (DII) style (http://mail-archives.apache.org/mod_mbox/ws-soap-user/200310.mbox/%[email protected]%3e), but not Static stub like what I did. Could anyone suggest me how to do it please ( I can't run tcpcom on the linux server, because x-window is not allowed to install ). Thank you for any help in advance.

    You can try writing a client-side handler.
    Handler gets called before the actual request is sent, and you can get the SOAP
    message in it.
    You have to deploy the handler in client-config.wsdd.
    Handler is just like Servlet Filter.
    I think there might be a simpler solution, but I dont know.

  • SOAP request and response message

    Hi,everyone:
    I am working on one jaxrpc project.
    I would like to get a concrete SOAP request and response message.
    Do somebody know how and where i can get these two message?
    thanks in advance
    Hui
    [email protected]

    I am also interested in the sample. Please post, any examples, I just finished the tutorial looking for further resources too.
    R

  • SOAP  Request - BPM (JDBCs + Mappings + File) - SOAP Response

    Hi there,
    my scenario:
    -soap request to xi
    -bpm that do some tasks first with the jdbc-adapter and then with the file-adpater
    -soap response (succ/fault) back to the client
    do i need a s/a bridge to activate the bpm. i can't find any guideline.
    thx
    snyder

    Hi,
    You can go thro the following blogs for Sync/Asyn bridge.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi
    /people/ravikumar.allampallam/blog/2005/02/17/bridging-the-sync-async-bridge-with-fork-xi
    Regards,
    P.Venkat

  • Soap request- XI- RFC- RFC- soap response

    Hi,
    I want to implement a scenario like this.
    A third party system use the soap adapter to call the ECC RFC via XI.
    AND I want to write the RFC response into another RFC.
    After that i want to send back another Rfc response result to soap client (third party system).
    So the scenario looks like this
    soap request->XI->RFC->RFC->soap response
    I want to use BPM,but have not too much experience.appreciate your help.
    Regards

    Hi,
    You would need a Synch Asynch Bridge in this case.
    Steps in BPM.
    1. Receive --> Receives SOAP request message --> Select Opens Synch Asynch Bridge
    2. Transfrom --> Map SOAP request to RFC 1's request Message
    3. Send Synchronous --> Make the Synch Call to the RFC and get the Response back.
    4. Transform --> Map RFC 1's response  to RFC 2's Request
    5. Send Synchronous --> Make the Synch Call to RFC 2 and get the RFC response back
    6. Trasnsform -->Map RFC 2's response to SOAP response.
    7. Send --> Select Closes Synch Asycnh Bridge and Send SOAP response back.
    For synch asynch bridge , take a look at this too,
    http://help.sap.com/saphelp_nw04/helpdata/en/83/d2a84028c9e469e10000000a1550b0/content.htm
    Regards,
    Bhavesh

  • Sending the SOAP request back in the SOAP response

    Hi,
    I have a requirement in which I need to update a database from the information I receive in a SOAP request. Now my database will respond back with the number of records that are updated. Now I need to send back a SOAP response which should have the details that I received in the SOAP request.
    Can anyone help me on how to send the SOAP request details back in the SOAP response again? I don't want to use a BPM to do this. Also I know that I can use a select statement to get the records that are updated in my response mapping program. Any options other than these?
    - Ram

    Hi Stish,
      I do have exactly the same need, just with the difference that I'm sendind data from JDBC as sender and RFC as receiver, the RFC receive an ID fot example and return some data as a response and I want to update the DB with that response but I dont know how to merge the ID from the request and the data from the response in order to send it back and update the DB. I'm willing to do it with BPM but I don't know how to keep the request and the response and then merge them into the new message that will be sent to the JDBC, can you give me some specific steps?
    Thanks in advance.
    Gustavo Balboa.

Maybe you are looking for

  • How can I work on parallel tabs?

    Is it possible to work on multiple tabs on one screen at a time? As in, I would be able to view and use multiple webpages together. This feature would enable me to: >compare certain items on different pages, e.g. photos, images, patterns, tech. specs

  • When I open Firefox, it opens my last tab instead of my homepage.

    When I open Firefox browser, it opens the very last tab I had open instead of my homepage. It's getting very annoying since I can't figure out why or how to fix it. ~I have not installed any new software, search engines, or add-ons recently that woul

  • Error while creating new Movement Type

    All SAP Gurus, We are creating a new Z movement type by copying the 101 movement type (T code: OMJJ). But system is not allowing to create a new movement type and giving an error message as 'Specify the key within the work area'. We are unable to cre

  • Regarding ReCreating Catalog in SQL Server 2005 which was existing in SQL Server 2000

    Hello I was using SQL SERVER 2000 ... In one table I've created FULL TEXT SEARCHING ( Full text catalog along with full text indexing) Now we had to install our db in SQL SERVER 2005 standard edition. But while taking script it gave me two lines like

  • Switching from mac to pc and syncing iphone

    I am preparing to move from a macbook pro to a pc laptop. I have a first generation iphone that is synced over the air with exchange for calendars, email, and contacts. I currently sync with my mac for music through itunes. I plan to install itunes o