OSB and WSDL response message

Hi all,
from the WSDL, that I put at bottom of this post, I've created a new OSB project importing the WSDL itself and creating a proxy service based on it.
I've implemented it using the fn-bea:execute-sql function:
<ctx:route><ctx:service>{   
fn-bea:execute-sql (
$myDataSource,
'resultset',
'SELECT id, name, type_id, domi_country_id, open_date, close_date FROM myTable WHERE id=?',
xs:string($body/urn:clientDataLookup/portfolioNumber/text())
}</ctx:service></ctx:route>
For getting the response, in the pipeline reponse I added a REPLACE action:
Replace [ node contents ] of [ . ]
in [ body ] with
[ <urn:clientDataLookupResponse>
<xmlCntent>{ $result/con:service/resultset }</xmlCntent>
</urn:clientDataLookupResponse>
I deduced the above xml response message using the OSB xquery wizard navigating through variable structure section and selecting $body - clientDataLookup (response) variable:
$body/urn:clientDataLookupResponse/xmlCntent
from that xpath expression I deduced the above xml response message.
My question: is that approach correct ? Why should I rewrite the xml response message ?
I'm wondering how to allow OSB to generate the correct xml response message in automatic way and then use it as template and fill only the xmlCntent param.
Thanks in advance
ferp
<definitions name="ClientDataLookup"
targetNamespace="http://wsdl/ClientDataLookup.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://wsdl/ClientDataLookup.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<message name="ClientDataRequest">
<part name="buId" type="xsd:string"/>
<part name="portfolioNumber" type="xsd:string"/>
</message>
<message name="ClientDataResponse">
<part name="xmlCntent" type="xsd:string"/>
</message>
<portType name="ClientData_PortType">
<operation name="clientDataLookup">
<input message="tns:ClientDataRequest"/>
<output message="tns:ClientDataResponse"/>
</operation>
</portType>
<binding name="ClientData_Binding" type="tns:ClientData_PortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="clientDataLookup">
<soap:operation soapAction="clientDataLookup"/>
<input>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:bsource:dataservice"
use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:bsource:clientdataservice"
use="encoded"/>
</output>
</operation>
</binding>
<service name="ClientDataService">
<documentation>WSDL File for Client Data Lookup</documentation>
<port binding="tns:ClientData_Binding" name="ClientData_Port">
<soap:address
location="http://localhost:8080/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>

In most common use cases a service bus transforms the messages from one format to other. In your case you are actually doing the same. You are transforming the message from database structure to the structure which is defined by the WSDL. The snippet you are using is not XML, its an XQuery snippet. There is nothing unusual about it. The tree structure in the left side is given for that purpose only, to facilitate writing XPaths and XQuery snippets. If you do not want to type anything and want to get it graphically (or example when its a big XML), use Eclipse IDE of OSB and create a XQuery transformation which you can call from OSB message flow.
Edited by: AbhishekJ on Nov 11, 2011 12:57 AM

Similar Messages

  • 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.

  • Regarding the OSB Project WSDL Response

    Hi i have developed a service in eclipse with XQuery , while testing this service in soap ui i am not getting the WSDL response .can u plase any one help me on this it's very urgent...................

    Does your operation have response tag ?
    Check your WSDL file that you used to create OSB service, to see whether the operation that you have used is having request and response tags and messages configured to it.
    Otherwise you can share your WSDL file here.
    Thanks,
    VJY

  • NPS and Accounting-Response messages problem

    Hi,
    We have a number of Proxim AP8000 access points, doing wireless authentication using NPS. Now we are facing an interesting problem.
    The access points are sending Accounting-Request messages using an arbitrary UDP source port, but they do expect receiving the Accounting-Response message on port 1813. NPS on the other hand is sending the response back on to the same port as the request
    originated, which access point is not listening on at all.
    I need to somehow instruct NPS to change its behavior and always send the radius accounting related messaged to port 1813. I wonder if such a thing is possible.

    Hi,
    There may be some misunderstanding of RADIUS.
    Remote Authentication Dial-In User Service (RADIUS) is an industry standard protocol described in RFC 2865, "Remote Authentication Dial-in User Service (RADIUS)," and RFC 2866, "RADIUS Accounting."
    RADIUS messages are sent as User Datagram Protocol (UDP) messages. UDP port 1812 is used for RADIUS authentication messages and UDP port 1813 is used for RADIUS accounting messages. Some network access servers might use UDP port 1645 for
    RADIUS authentication messages and UDP port 1646 for RADIUS accounting messages. By default, NPS supports receiving RADIUS messages
    destined to both sets of UDP ports.
    Exactly one RADIUS packet is encapsulated in the UDP Data field, where the
    UDP Destination Port field indicates 1812 (decimal). When a reply is generated, the source and destination ports are
    reversed.
    Therefore, the source port of the request message is set by RADIUS client(your APs). Most RADIUS clients use a randomly selected source port number.
    Besides, UDP is stateless. So there isn’t a “listening” state of it.
    According to your description, your RADIUS works right in the way as it is designed.
    For detailed information, please refer to the link below,
    Remote Authentication Dial In User Service (RADIUS)(RFC2865)
    http://tools.ietf.org/html/rfc2865
    Remote Authentication Dial In User Service (RADIUS)(RFC2138)
    http://tools.ietf.org/html/rfc2138
    Hope this helps.
    Steven Lee
    TechNet Community Support

  • PI soap receiver cannot transform attachments in WSDL response message

    Hi,
    Need a solution for this, urgently?
    In synchronous proxy to webservice scenario, the response message payload has <multiref> tag in it.
    After going through sdn, help, etc got to know that PI doesn’t support multiref in soap-messages.
    Then whats the solution for this.
    1. Server-config.wsdd" in section <globalConfiguration>. Adding this line <parameter name="sendMultiRefs" value="false"/> didnt made any difference.
    help highly appreciated, 
    Thanks
    Pratibha

    As far as I understand you may receive multiref messages as attachments. Have you checked the Keep Attachment check box in receiver communication channel?
    Regards,
    Prateek

  • Synchronous message handling between OSB and MQ

    Hi,
    I have a requirement to have a PS in OSB that gets some XML data from another application.
    The PS implementation has to be synchronous.
    The interface is like
    External Application<->OSB PS<->MQ<->OSB <-> External Application
    Can anyone help me with the request-reply implementation(i.e. synchronous call handling) between OSB and MQ.
    Required functionality :
    OSB will get XML data from the external application,will do the data transformation to make it compatible with MQ interface and will then send data to MQ and will wait for the reply from MQ that it then sends back to the external application after transformation.
    Queries:
    How to correlate two messages i.e. request msg to mq and reply msg from mq in OSB?
    What kind of Proxy Service implementation is required to have such functionality?
    If someone can help me with similar kind of implementation,it will be of great help to me.
    Thanks in advance

    OSB support this pattern out of the box . You can implement the MessageID pattern as specified in this link:
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/MsgIDPatternforJMS.html
    When you configure the business service to use MessageID as the correlation pattern, the following happens under the hood:
    1. Business service sends request to the MQ request queue. The MQ JMS provider sets the message ID on the message and this is returned to the bs. The business service also sets the reply queue details in the JMSReplyTo Header in the request.
    2. The business service then waits for a response message which has a correlationID equal to the messageID in the request message.
    3. The system which processes the request from the MQ should set the correlation ID of the response to the same value as the Message ID in the request.
    4. The business service process the reply if it is received before the timeout interval. No need to purge the queues for message arriving out after timeout since OSB does this automatically for you.
    A point to note here is that if you deploy this in a cluster , you need to create 'N' local MQ queues for reply, where N is same as the number of managed servers in the cluster. Else you could lose replies in a scenario where the reply for a request sent by man server 'X" is processed by man server "Y". The request-response correlation tables are maintained internally on man server memory. Since Y had no clue of the requests sent in X it would just discard the reply received.
    So create dedicate queues for each man server and specify them in the business service definition.
    Another key thing for this to work would be to get right the MQ setup between the queue manager in OSB domain and the remote system which process the MQ requests. A simple setup would be for you to create all reply queues as local queues under your OSB queue manager and create only a transmission queue with the same name as your OSB queue manager in the remote system. You need to ask the remote system to do the MQOpen with the ReplyToQueue and ReplyToQM names for queue and queue manager names. This will put the replies to the transmission queue to your QM and through it can reach the right reply queue.
    Edited by: atheek1 on Mar 29, 2010 7:50 AM

  • 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

  • Need Help! have an issue from my auto response email, it showing the "MIME This is a multi-part message in MIME format. " and the signature message disappeared.

    ave an issue from my auto response email, it showing the "MIME This is a multi-part message in MIME format. " and the signature message disappeared and replaced with some unreadable message

    Hi msnyder1112,
    Thank you for posting in MSDN forum.
    Since this issue is related to the VB.NET, so we will move this case to VB forum:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral , you will get better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Obtaining the WSDL and sending a message (like Web Services)

    Hi All,
    Is it possible to use a service interface defined in XI as any other web service? Consider the following scenario.
    1. Create an async service interface (outbound) in XI (This has a message mapping and the message goes to some inbound interface). 
    2. Can we write an external application (a Java swing client or something) which can send a message to this service interface?
    3. While writing a normal web services client we specify the url of the WSDL and then send a SOAP message using some APIs.
    4. Can this be achieved in XI? If so could you provide me some links or blogs etc to have some idea about this. Also how do we specify the URL of the interface.
    5. I have seen a similar application (an HTML file) which takes the XML payload (conforming to the message type of the interface) and sends the message to the interface. In this case the URL is formed from sender namespace, server name, port etc. The name of this HTML is XIHttp_adapter.html.
    6. Can somebody give me more inputs in this direction?
    Many Thanks,
    Sandeep

    Hi Sandeep,
    The Info below should surely help you find an answer.
    If you're on WAS 6.20 and up, you can expose an RFC as a webservice directly from WAS.
    Or if you’re on Basis layer 4.6D, you'll need to use XI (or some other integration tool) to expose the RFC as a webservice.
    To do this in XI you'll need to:
    Integration Repository
    1) Import the RFC
    2) Define a message and datatype for the SOAP interface
    3) Create inbound and outbound interfaces
    4) Create maps between the RFC and SOAP messages
    5) Create an interface map
    Integration Directory
    1) Create an RFC Receiver Channel
    2) Create a SOAP Sender Channel
    3) Generate the WSDL (Tools->Define Web Service)
    You can then handoff the WSDL and a login username and password to your developer and they will have everything they need to make the WS call.
    Here are answers to a few doubts u might have:
    1) Do I need to actually create a WS that calls the RFC ? Isn’t the virtual interface exposed by the XI sufficient?
    Yes, you need to create a WS in XI that calls the RFC.
    2) If I really have to create the WS and deploy it in order to expose it with the XI, then what is my benefit of exposing it with the XI, why not just exposing it as a normal WS ?
    You don't have WAS 6.20 or up. Even if you did, you may still want to expose it using XI in order to have all of your integration go through the same application.
    3) If I expose my web service through the XI, how does the client application executes one of its methods? To which url does it have to access (the XI or the actual WS)?
    You expose a SOAP interface in XI by generating a WSDL file. This file contains all of the information a developer will need to call the webservice including the URL.
    You actually specify the URL when you generate the WSDL. Be sure to read the documentation to get the correct format because the URL that the wizard suggests isn't correct.
    Also check this Pdf for the Receiever SOAP Adapter configuration:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789
    Also the target URL must be the URL to the WSDL. So, if you try putting it in your browser you must see the wsdl code.Please do ensure the same.....
    I hope this helps.
    Regards,
    Abhy

  • Capturing the Response message and sending to two diffrent systems

    Hi Experts,
    My Scenario is -
    Legacy->PI-> SOAP
    Legacy System Supports SOAP call  and sync calls.  Now my requirement is how can I send the response received from the target SOAP system to the actual sender as well as to another ECC system?
    In this case ECC will not trigger any request message, it will only receive the response message from SOAP system.
    P.S -- how to
    Thanks
    Sugata

    Hi,
    Another way, but a bit more resource intensive, is to use ccBPM, use an sync/async bridge and route the response message back to the caller but also send it to an extra receiver.
    Regards,
    Horia

  • Relating request and response messages

    Hello,
    Concerning how to relate messages. I have a jpd putting messages 'send' queue, and a responses arrive on a 'receive' queue. Both queues may be remote. Several jpd’s will run at the same time. The message correlation id appears to be intended for this purpose. Does anyone know some way to listen to the queue, only listening for a message with the desired correlation id? It would be pretty slow if I read every message, and reject it if the correlation id is wrong. A 'Message Selector' appears to be the way to do this.
    Does anyone know of a good way to do this, maybe using Message Broker ?
    thanks!
    -JM

    Hi Dmitri,
              Thanks for you reply.
              >>What are you planning to put into correlation id field?
              I can put the id of the job being processed. This exists in the application. Alternatively, I could use the process id of the jpd. (It is a wli jpd).
              >>Why not redesign it slightly so message sender would set 'response queue' field in the message
              If I understand your suggestion correctly, I would need a dedicated queue for each running process. There could be many running at the same time, so I'm not sure I can do that.
              thanks anyway!

  • Relate request and response messages

    Hello,
    Concerning how to relate messages. I have a jpd putting messages 'send' queue, and a responses arrive on a 'receive' queue. Both queues may be remote. Several jpd’s will run at the same time. The message correlation id appears to be intended for this purpose. Does anyone know some way to listen to the queue, only listening for a message with the desired correlation id? It would be pretty slow if I read every message, and reject it if the correlation id is wrong. A 'Message Selector' appears to be the way to do this.
    Does anyone know of a good way to do this, maybe using Message Broker ?
    thanks!
    -JM

    Hi Dmitri,
              Thanks for you reply.
              >>What are you planning to put into correlation id field?
              I can put the id of the job being processed. This exists in the application. Alternatively, I could use the process id of the jpd. (It is a wli jpd).
              >>Why not redesign it slightly so message sender would set 'response queue' field in the message
              If I understand your suggestion correctly, I would need a dedicated queue for each running process. There could be many running at the same time, so I'm not sure I can do that.
              thanks anyway!

  • Response message size in weblogic 7.0 and 8.1.2

    How can I find the response message size of a native service in Weblogic 7.0 or 8.1.2 using java ?

    The size is 0, because the response is chunked, or nothing has been written to it yet :-)
    If you are just interested in the size of the SOAP response message (including any attachments), then you can create a server-side JAX-RPC handler that does something like this, in the handleResponse(MessageContext mc) method:
    public boolean handleResponse(MessageContext mc)
    try
    java.io.ByteArrayOutputStream baos = new ByteArrayOutputStream();
    SOAPMessage response = ((SOAPMessageContext)mc).getMessage();
    response.writeTo(baos);
    System.out.println("SOAP response message length=" + baos.toByteArray().length);
    catch (Exception e)
    e.printStackTrace();
    return true;
    Regards,
    Mike Wooten

  • Missing response message in Idoc - WS scenario

    Hello
    I 'm missing a response message in the follwing scenario:
    Idoc-> XI -> Web service (SOAP)
    A Matmas idoc is sent from R/3 to XI. In XI the Idoc is
    mapped to a SOAP message and sent to a web service.
    The Message Interface for the SOAP call is synchronous
    and has a PushMaterialSoapOut and a PushMaterialSoapIn
    messsage, which is defined in the WSDL from the
    web service and imported into XI Repository.
    Everything is working fine but I do not get the response
    message. The web service has sent the response message. I
    have traced the firewall logs and i have seen the
    response.
    What is wrong? Is it basically possible to have a
    scenario like this?
    The message must have arrived somewhere, since the web
    server does not throw an exception. But where is it?
    Thank you in advance
    Thomas

    Hello Stefan
    >Scenarios with IDOCs are always async. Therefore you
    >cannot have a response.
    Ok, so I have to use BPM.
    >How do you want to process the response? What should
    >happen in the sender system?
    I was thinking about an ALEAUD idoc which is sent back
    to R/3. Therefor I have created an synchronous message
    interface with the MATMAS idoc as outgoing message and an
    ALEAUD as incoming message. Accordingly I have a message
    mapping for the response message.
    An other reaction to the response message could be to set
    the message to status failed. But this is the next issue.
    >In some scenarios you might use a BAPI instead of an
    >IDOC for synchronous message processing, but this
    >depends of many circumstance depending ofyour business
    >requirement.
    The process in SAP R/3 is fixed. To move to BAPI is not
    an option.
    Regards
    Thomas

  • Soap Receiver Adapter - No Response Message

    Hi, I've got the following scenario: Idoc - XI - Webservice. I've imported the WSDL from the .NET webservice and used the input and output messages in a syncronous interface.  I've setup a SOAP Receiver adapter with the Webservice details.  Everything is working fine when I call the webservice and the data is received 100% at the target system, but I am not getting ANY response back on XI.
    RECEIVER SOAP ADAPTER Audit LOG:
    2008-01-24 16:41:57 Success SOAP: request message entering the adapter with user J2EE_GUEST
    2008-01-24 16:41:57 Success MP_LEAVE1
    2008-01-24 16:41:57 Success The message was successfully delivered to the application using connection SOAP_http://sap.com/xi/XI/System.
    2008-01-24 16:41:57 Success Acknowledgement creation triggered for type: AckNotSupported
    2008-01-24 16:41:57 Success SOAP: completed the processing
    2008-01-24 16:41:57 Success SOAP: continuing to response message 83638fb0-ca8a-11dc-b36c-00145eed9500
    2008-01-24 16:41:57 Success SOAP: sending a delivery ack ...
    2008-01-24 16:41:57 Success SOAP: sent a delivery ack
    2008-01-24 16:41:57 Success The message status set to DLVD.
    2008-01-24 16:41:57 Success Acknowledgement sent successfully for type: AckNotSupported
    Has it got anything to do with the "AckNotSupported" type?  Is "AckNotSupported" the default setting for the receiver SOAP adapter?  If so, where do I change this setting?
    When I call the webservice with the exact same input using a standalone tool, I get the response message back 100%.  Any help will be appreciated.
    Thanks
    Rudi

    Hey
    you are confusing between a response and an acknowledgement.
    response and acknowledgement and not one and the same thing.
    response is basically used when you send some query to the receiver system and expect a set of value(s) for your query.for e.g sending a query to a Database(JDBC) or SAP system(RFC)
    and acknowledgement is just a notification that the message was receiver by the receiver correctly,it does not returns you a set of value(s).
    now coming to your question,ALEAUDIT IDOC is generated when an IDOC is posted,since in your case you are not posting and IDOC,instead your are sending it ,i m not sure if ALEAUDIT will be generated or not,one thing that will come to your rescue is that every receiver SOAP adapter expects a HTTP response(irrespective of you explicitly asking it or not).
    a HTTP 200 means that messages were posted successfully,and HTTP 500 means application error,get this HTTP response and send it back to the SAP system,most probably you would need to use BPM for this.
    Thanx
    Aamir
    Edited by: Aamir Suhail on Jan 24, 2008 11:26 AM

Maybe you are looking for