How to pass xml in Web Services

Hi,
Can some one suggest which is the best way to send xml in web services.
It can be sent as string (CDATA) or attachements.
Is there any other way, may be as some object??
I would appreciate if someone can help me on this.
Thanks & Regards,
Rana Biswas

Hi, Eric,
Thank you for your quick reply.
The web service I am trying to develop is basically a generic Data Access Component to bridge between SQL server and a desktop .Net application. The application will have about 3000 users from WAN, therefore we want to have a server side component to handle connection pooling etc. Because of limitation of current servers, we are asked to develop a Java Web Service, instead of MS WS.
To make the component more reusable, I am thinking to have methods like this in the service:
RunQueryReturnRS(String Sql, WebRowSet, rs)
RunQueryReturnInt(String Sql, int NumRecdImpacted)
RunStoredProcedureReturnRS(….)
RunStoredProcedureReturnInt(….)
……
You see, I would like to get whole resultset back to client, including both metadata and data in a format of generic resultset. When I paged through the Sun’s document, finding WebRowSet is claimed to be seariable, and ready for Web Service. I thought if I can use WebRowSet that will save me time to write new classes to hold resultset info and pass back to client.
Could you please tell me if it is a feasible approach?
Thank you.
-Qing

Similar Messages

  • How to overload method in web services ?

    hi all !
    how can i overload a web services method ? , i hear about using javax.xml.ws.RequestWrapper , but when i try to use wsimport , it say : error dupplicate method.
    this is the sample from forum :
    package my.ws;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.xml.ws.RequestWrapper;
    import javax.xml.ws.ResponseWrapper;
    @WebService
    //(name="HelloWS", serviceName="HelloWSService")
    public class Hello {
          * Web service operation
         @WebMethod
         @RequestWrapper(className = "com.veera.Clac.CalculatorRequest", targetNamespace = "http://Calc.veera.com/")
         @ResponseWrapper(className = "com.veera.Clac.CalculatorResponse", targetNamespace = "http://Calc.veera.com/")
         public int add(@WebParam(name = "a")
         int a, @WebParam(name = "b")
         int b) {
              // TODO implement operation
              return 0;
          * Web service operation
         @WebMethod
         @RequestWrapper(className = "com.veera.Clac.CalculatorOverloadRequest", targetNamespace = "http://CalcOverLoad.veera.com/")
         @ResponseWrapper(className = "com.veera.Clac.CalculatorOverloadResponse", targetNamespace = "http://CalcOverLoad.veera.com/")
         public String add(@WebParam(name = "v")
         String v) {
              // TODO implement operation
              return "Veera";
    }thanks

    Hi, Eric,
    Thank you for your quick reply.
    The web service I am trying to develop is basically a generic Data Access Component to bridge between SQL server and a desktop .Net application. The application will have about 3000 users from WAN, therefore we want to have a server side component to handle connection pooling etc. Because of limitation of current servers, we are asked to develop a Java Web Service, instead of MS WS.
    To make the component more reusable, I am thinking to have methods like this in the service:
    RunQueryReturnRS(String Sql, WebRowSet, rs)
    RunQueryReturnInt(String Sql, int NumRecdImpacted)
    RunStoredProcedureReturnRS(….)
    RunStoredProcedureReturnInt(….)
    ……
    You see, I would like to get whole resultset back to client, including both metadata and data in a format of generic resultset. When I paged through the Sun’s document, finding WebRowSet is claimed to be seariable, and ready for Web Service. I thought if I can use WebRowSet that will save me time to write new classes to hold resultset info and pass back to client.
    Could you please tell me if it is a feasible approach?
    Thank you.
    -Qing

  • How to expose a SOAP web service from HCP

    Hello All,
    Currently I am trying to create a SOAP web service within a HCP Java application to allow backend systems to consume data stored in HCP.
    This is the planned scenario:
    1. Create data in HCP - therefor I am using JPA and a oData Model.
    2. Backend uses web service to consume data from HCP - with this point I do have some problems.. I do want to create a SOAP web service in order to achieve this.
    Is there an easy way to create a SOAP web service in HCP? There are many tutorials in the internet of how to create a SOAP web service in 20 sec´s, but non of these helped me. I do was able to consume a SOAP web service in HCP coming from the ByD, but the other way around seems pretty complicated...
    Can I make use of the Eclipse functions to create a web service? (New --> Other... --> Web Services --> Web Service and than choose the Button up Java bean Web Service type)
    Have any of you some coding snippets that would probably help me out?
    I have unsuccessfully tried to use the @WebService, @SOAPBinding, @WebMethod notation in my java classes...
    Thank you,
    Swen

    Hello Nedelcho,
    Yes. All the required jar files are in the lib directory.
    Currently I am able to create a web service locally.
    But when I deploy that to the cloud server my JPA service is not working any more.
    Receiving the following error message:
    <?xml version='1.0' encoding='UTF-8'?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en">javax.naming.NamingException: Error while attempting to resolve reference [Root exception is javax.naming.NamingException: Cannot create resource  object instance due to exception in the object factory [Root exception is javax.naming.NamingException: Data source 'jdbc/DefaultDB' not available.]]</message></error>
    The web.xml contains the following:
    Any advice?
    Best regards,
    Swen

  • How do I invoke a web service?

    I'm new to web services... and I have to find a way to connect to the microsoft reporting services web service....
    But well I don't know how to connect to a web services...
    Can someone direct me to a java tutorial about invoking web services?
    Please? =)
    Thanks,
    Renato Fontes

    Enter the string without the quote, then try to switch to the XML view and add the quotes. This should be a workaround for simple values.
    You should also be able to generate a java client from JDeveloper in a few clicks, using the Wizard. As you can generate the JUnit template for the proxy (or stub), it's usually faster to re-run your test.
    If this does not work for you, can you post the WSDL so we can see if there is any reason it does not work for you.
    All the best,
    -Eric

  • How to use WS-RM web Service from Session Bean?

    Hi all.
    Could you tell me the way how to call WS-RM web service(Staring BPM Process) from SessionBean?
    Our environment: SAP NetWeaver CE 7.2 SP3
    I do the following.
    I have created a BPM Process starting with Message Start Event.
    This Message Start Event was created by Service Interface(stateless and asynchronous) which was imported from ESR.
    I deployed this into my server and it worked fine in webservice navigator as a WS-RM WebService.
    But I can't call this webservice from SessionBean in EJBExplorer.
    I get the following error message:
    Caused by: This exception is wrapper of javax.xml.ws.soap.SOAPFaultException. com.sap.engine.services.webservices.espba
    se.client.bindings.exceptions.SOAPFaultException: Invalid WS-RM message. There are no WS-RM headers within SOAP message.
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:412)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1366)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:960)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:915)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
    at $Proxy2753.zwsvCheckOrderdataMainprocessStart(Unknown Source)
    at jp.co.ogis_ri.WSTestSessionBean.exeWS(WSTestSessionBean.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    I created this SessionBean as follows:
    I created DCs for EJB and created SessionBean in EJB DC.
    I imported a WSDL file(WS-RM web service) from Service Registory and
    I created service clients and Service References.
    After that I implemented SessionBean to call web service checking with this help.
    http://help.sap.com/saphelp_nwce72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/frameset.htm
    After deploying this EJB,I configured properties in nwa.
    Thanks
    Yuichi

    Yuichi
    Did you manage to solve this?  I'm doing something similar and seeing the same problem, although they're up to 7.3 SP7.
    Any help greatly appreciated.
    Lewis

  • Sending document to oracle xml gateway web service and body is url encoded

    Hello,
    a question from a complete newbie to web services. I have some code that is sending a soap message to an oracle xml gateway web service. In the soap message the values in the soap body look like &lt ;CNTROLAREA&gt ;
    when I would be expecting <CNTROLAREA>. What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the &lt and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. I have a lot of reading to do but was wondering if someone might be able to point me in the right direction on how to correct the problem. I captured the soap message being sent using tcpmon. Why does the body have the &lt instead of the < as I was expecting and is there an xmldocument type? The header part of the soap message looks as I expect. "><soapenv:Header><ns1:XMLGateway_Header xmlns:ns1="http://xmlns.oracle.com/apps/fnd/XMLGateway"><ns1:MESSAGE_TYPE>XML</ns1:MESSAGE_TYPE>. It is being sent as a com.oracle.xmlns.apps.fnd.XMLGateway.XMLGateway_Header type.
    thanks
    Thanks
    Edited by: twf123 on May 5, 2010 11:59 AM
    Edited by: twf123 on May 5, 2010 12:00 PM

    twf123 wrote:
    What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the &lt and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. Where do you change the parameter type?
    The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. How do you get the data from .net guy? Which interface do you use? What processing do you do after receiving the data?

  • Native Oracle XML DB Web Services  in 11g

    in 11g the Native Oracle XML DB Web Services features is added .what is the advantage.how its owrks.

    in 11g the Native Oracle XML DB Web Services features is added .what is the advantage.how its owrks.

  • How to activate trace for web services

    Hi Experts,
    How to activate trace for web services in SOAMANAGER.
    We are not able to view the Payload trace of the error logs.
    Can anyone please let me know how to go about this???
    Regards,
    Ashwini

    Hi Ashwini,
    The thread below might be useful to you:
    [SOAMANAGER - Get the XML generated;
    Regards, Trevor

  • How to pass XML data between applications

    Hi,
    can any one tell me how to pass XML data between applications
    Thanks in advance
    Sudheer

    Steve,
    I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
    Thanks,
    Sunder
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
    Hope this helps.<HR></BLOCKQUOTE>
    null

  • JSON+XML RPC Web service

    Hi,
    i want to consume JSON/XML  RPC webservice from Strobe media playback.
    How i would achieve this.

    A google search of XML-RPC turned up this:
    http://mxblogspace.journurl.com/users/admin/?mode=article&entry=763
    and this:
    http://www.activsoftware.com/resources/support/messages.cfm/id/5484
    I don't think you will be able to invoke an XML-RPC web
    service using the standard <cfinvoke webservice="..."> due to
    the fact that the URL for an XML-RPC webservice is not a WSDL file,
    which is what coldfusion is expecting.

  • How to generate JAX-RPC web services instead of JAX-WS webservices withOEPE

    How to generate JAX-RPC web services instead of JAX-WS webservices withOEPE? I am asking this because I need to pass xmlbeans generated objects as arguments in the web method. For JAX-WS there has to be a no argument constructor for it to be able to pass in theweb method. The workshop 10.3 was able to pass the xmlbeans generated object as the web service was implemented as a JAX-RPC web service....

    Ok just as I expected. So I guess I am left with the following two options
    1) either I switched to using JAXB in my apps instaed of xmlbeans....
    2) or if I still wanna use the old JAX-RPC web services to deploy on the Weblogic 10gR3 server i will have to create my own ant task jwsc directly......as shown below in your docs
    Programming Web Services for WebLogic Server (ant tasks)
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/webserv/anttasks.html
    Getting Started With WebLogic Web Services Using JAX-RPC
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_rpc/index.html
    Will OEPE be supporting the old JAX-RPC anytime in the near future release? or have to create own build ant task to call jwsc ant task directly to compile JAX-RPC web services??

  • OWSM 10.1.3.4 and Non-SOAP XML-based web service

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can I call external web service from BPEL

    1. I have "EmpService" webservice (simple webservice to get emp salary, not in BPEL domain) running in Oracle AS host1. If I want to call this web service from BPEL in another host2. How can I do this?
    2. Is it a must to deploy this EmpService to Oracle BPEL domain in order to call it? If so, how can I deploy it. As many BPEL example tutorial demonstrate the "obant" command to deploy the BPEL process, but not show how to deploy a external web service not in BPEL project. Please help. ...

    Create a partner link in BPEL and point it to the WSDL deployed on external server.
    this thread will also help
    Axis generated WS to Bpel WS

  • How can I create a web Service from my Web Dynpro Application ?

    Hi,
    Kindly let me know How I could create a "Web Service" with my Web Dynpro DC project.
    Awaiting your responses.
    Regards,
    Mahesh

    Hi Mahesh,
          You can use the web services by creating the Model in web Dynpro
    And if you want to publish your own web service then you have to create a EJB module and publish as a web service.
    Thanks
    Ninad

  • How to call an external web service from OIM?

    Hi,
    I have a question on how to call an external web service from OIM within e.g. creating user process? How should it be done; through adapter and task in the process?
    Any recomendations?
    Thanks in advance!

    it is not clear to me if you are having problems with calling java code from OIM or if the problem is the web service API.
    Lets do some divide and conquer:
    Can you create a simple java class that just writes a couple of lines to the log? Please attach this code to the OIM task and make sure it runs.
    Once this works we can start looking at the web service call.
    Best regards
    /Martin

Maybe you are looking for