How to use JAXB with web services

Hi All,
I am new to JAVA WS and read the sun jee tutorial on JAX-WS and SAXB. Now I can create simple JAX-WS passing simple parameters. Now I want to create a service which take java bean as a parameter or returns a java bean (complex type). I think this is where JAXB should come. However I can understand JAXB seperately, but still could not find how JAXB is work together with my web service. Could someone help me or point to a simple tutorial/example on using JAXB with JAX-WS. Or simply a tutorial that use Complex data type in JAX-WS.
Thanks
Nalaka
Edited by: nalakayoyo on Mar 27, 2008 11:39 PM

Hi,
When you are using JAX-WS, there is a tool wsimport, with which you are going to generate the artifacts required to implement the web service.
When you pass the WSDL as a parameter to the wsimport tool, it will be create the required beans also(JAXB Objects).
So need of any other external implementation of JAXB when you are working with JAXWS
Thanks,

Similar Messages

  • 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

  • How to use ComplexType in Web Services with Jdeveloper

    I've look an article which says:
    If the parameter is created as a JavaBean that implements the java.io.Serializable interface and exposes all of its properties using the accessor style of getX and setX, Oracle Application Server will handle the XML serialization and deserialization automatically.
    but when I use jdeveloper to create a web Service it only comes up with the warning:
    Method addCourse:the following parameter types do not have an XML Schema mapping and/or serializer specified:
    mypackage.CourseJavaBean
    my code is:
    package whut.mypackage;
    import java.io.Serializable;
    public class CourseJavaBean implements Serializable

    Hi Dugu,
    Can you give the link to the specific article and the version of JDeveloper you are using to help you further?
    One thing to keep in mind is that the accessors must be public - using package access (no modifier) is not going to work.
    Hope this helps,
    Eric

  • How to use IGS via Web Services (or HTTP)?

    IGS is well integrated in Web Dynpro, BSP, BEx and so on...
    Via ABAP it's easy to call it but I do not find how to use it via HTTP (or better Web Services).
    Any idea?
    Sergio

    Dear Sergio,
    a scenario that makes use of the HTTP interface of the IGS is Web Dynpro Java. This may also be an alternative for you. But with a lot of technical background it is also possible to generate charts using the IGS via HTTP directly (Web Services are not supported).
    Prerequisite is an IGS somewhere in the network that has at least one HTTP listener defined and the XMLCHART interpreter is installed.
    You must send an HTTP request to the adress http://<igs-host>:<igs-port>/XMLCHART. The request must at least contain the parameter with name data as first parameter. This parameter contains the chart data as XML, see below. In addition all further parameters (the name doesn't matter but I would recommend something like custom1, custom2, ...) must contain the chart customizing as XML.
    If you already used the XMLCHART interpreter in an ABAP application or BSP you may know the data and customizing xml format. If not you can download the SAP ChartDesigner from the Downloads --> Web AS section of the SDN. This download contains a pdf describing the data xml format and the tool itself which can be used to create the customizing xml in an interactive manner.
    All HTTP related coding must be done by you.
    Best regards
    Matthias

  • How to use and configure web services in sap

    Hi,
    Experts,
    could you please tell me, how to configure web services in sap.
    As one of my client using handheld  software for inventory, where in whatever tansaction happens in the depot  it has to update in sap.through non sap software please help me out with necessary configuration.
    Thanks
    Edited by: Ahmed quadry on Jun 9, 2009 2:25 PM

    Hi Ahmed,
    Kindly find the below link will helps you to create web  service in SAP
    http://wiki.open-esb.java.net/Wiki.jsp?page=BAPIWEBSERVICE
    Also find the below documents will helps you to create web services in SAP
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3004a2d2-0653-2a10-779c-f5562b3fac39
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/bb0764f2-0b01-0010-bd85-c7849b40561e
    Regards
    Venkata Rao .G

  • How to use ZendAMF with multiple services?

    I followed Mihai Corlan's tutorial (http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/) to create a remote service with Zend AMF, and it works great.
    But, I can't figure out how to use multiple RemoteObjects. I keep getting the infamous:
               faultCode:Client.Error.DeliveryInDoubt faultString:'Channel disconnected' faultDetail:'Channel disconnected
               before an acknowledgement was received'
    I set up my second RemoteObject the same way that I set up my first one.  But, I can't get it to work.
    Any suggestions? Has anyone seen examples of multiple services being used?
    Thank you!
    -Laxmidi

    I made a stupid php error.
    If you can do a single remote, you can do multiple ones. It's straightforward.
    -Laxmidi

  • How to use array in web services?

    I have a function which returns an array of byte? How do I convert it into a web service function?

    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 use WebRowSet in Web Services

    Hi,
    I'm new on both Java and Web Services. Currently I am trying to use JDevelper 10g's Web Services Wizard to create a Web Service, which will be consumed by .Net clients.
    I would like to know how to pass WebRowSet back to client. Since WebRowSet is not default data type the Wizard can handle, I wish anybody can tell me if this is feasible, if so, what steps I should do to accomplish this task.
    Many thanks in advance.

    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 use JDI with Web Dynpro

    Can any one help me with detailed steps on how to put my Webdynpro development components into JDI?
    We are already done with the development work. Now we have JDI installed and want to source safe the project in JDI.
    So, my requirement is only to put them in JDI, to be able to check-in and check-out any future changes and use the JDI to deploy the applications into QA and production systems . No team development or anything.
    For this case, which of the 3 tutorials ( Team oriented development, Development with track, Development with layers) given in help.sap.com will be ideal?
    Please help.

    Hi Aditya,
    Step for creating Webdynpro:
    1. Open Development Configuration Perspective in NWDS. In the “Local DCs” view, right-click on “Local Development” and choose “Import
    Configuration…”
    2. Login remote with your username and password. It will create development infrastructure in Inactive DCs. There you can create the component like webdynpro, Java, J2EE, Enterprise Portal, etc.
    3. Creating Webdynpro in the DTR perspective.
    Step 1: Right click on Inactive DCs -> Create new DC.
    1. By default vendor name is SAP. You can change vendor name according to your requirements.
    2. create a new Web Dynpro DC with desired name.
    Name should not exceed eight characters (Recommended)
    create a new Web Dynpro DC with desired name.
    3. Select the language
    4. Select the domain
    5. Select the component type
    3. Copy the file structure from your existing local project to DC.. These will be under an activity..
    Step 2:
      1. Build and Deploy and test your new DC.If it works fine then in DC perspective..Right click on src folder->add subtree ->create activity.
    See this thread discussing about how to migrate local project to JDI..
    How to migrate local Web DynPro projects into the DTR?
    Regards
    Suresh KB

  • Details on how to use the RESTful Web Services SDK

    Hello,
    this sounds really interesting for an important use case we're currently developing. Unfortunately, I am not a skilled developer and would therefore need to know two more things:
    1) in the beginning, it says ''assumes that there are no parameter values that need to be set'. Is this a core restriction or just to keep things simpel for this example? For our specific use case, we would need to at least transmit a report name and an execution date (which is not necessarily always equal to 'today')
    2) can we have the PDF sent to a Netweaver App Server?  Can the target location there be parameterized somehow?
    3) I understzand that there's also the Open Doc interface that could achieve similar features. Could you please elaborate which are the differences in the two approaches, maybe even pros and cons?
    Thanks
    Philipp

    Hi Philipp,
    1) This is just to keep things simple for the example
    2) You would need to first send the PDF to a file system, and then have a separate process to send it to the Netweaver App Server.  There isn't built-in integration to the Netweaver App Server.
    3) Stated simply:
    OpenDocument allows you to reference content via a single URL, best used for embedding content in your web page or application.   Pro:  Simplest Option  Con: Less power than REST API
    The REST API allows you to manipulate report objects in Web Intelligence and do things like set datasource and create report scheduling jobs.  Pro: More Power and Flexibility  Con: Requires knowledge of programming with REST APIs.
    Best Regards,
    Terry

  • How to integrate forms with web services in EBS

    Hi All,
    I have tried to integrate Oracle forms with webservices.
    I have added the location of jar file to classpath in default.env file in EBS.
    While running form from E Business Suite i am getting following exception
    Exception: java.lang.Exception: java.lang.NoClassDefFoundError:
    Please help me in overcoming this problem.
    Thank you,
    KS

    Hello,
    This is not the EBS forum but the Forms forum.
    <p>Anyway, did you read this article ?<br>It contains all the necessary details/steps</p>
    Francois

  • Sun Java Application Server Performance with Web Services

    We are running a web service on SJAS (Standard Edition). Load testing under 1 or 2 users works alright, but with 5 users making concurrent web service calls it immediately crashes the domain. Has anyone else run into performance issues when using SJAS with Web Services? Are there any configuration parameters we need to setup to handle more than 1 connection?
    I'm sure that the application server can handle many concurrent connections, just not sure how to configure and where to look for more information. If anyone is aware of actual numbers for load testing, that would be great information.
    Thanks,
    Dawson

    Hi Dawson,
    SJSAS can definetly handle more users. Can you please tell us, what version of SJSAS and web services (jax-rpc 1.1 or jax-ws 2.0?) implementation you are using? When you say it crashes the domain, do you see any error messages in the server.log?

  • How can I create a query with web service data control?

    I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.

    Hi,
    This might help
    *054.     Search form using ADF WS Data Control and Complex input types*
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • How to do a InsertOrUpdate with web services 2.0

    I understand that InsertOrUpdate method is just valid for Web Services 1.0.
    a) Is there a way to do it with web services 2.0 ? I imagine using a query and then Update or Insert.
    b) if we decide to use web services 1.0 would there be any cons ? (besides a possible performance issue as in the documentation)
    c) InsertOrUpdate uses the record "user key" for identification. If need to identify using another field, I suppose that the only way is thru query, etc. Any other ideas ?
    Txs. for any help.
    Antonio

    Hello Antonio,
    I understand that InsertOrUpdate method is just valid for Web Services 1.0.Correct, the InsertOrUpdate method is not available in WS v2.0.
    a) Is there a way to do it with web services 2.0 ? I imagine using a query and then Update or Insert.That is one possibility, however it means that every insert or update would consist of two operations. I would suggest reviewing your requirements and expected use cases for a way to determine whether a record is being inserted or updated within CRMOD. The specific approach would depend on whether how the records to be entered into CRMOD are compiled (i.e. user interaction vs. batch sync component)
    b) if we decide to use web services 1.0 would there be any cons ? (besides a possible performance issue as in the documentation)There are some objects that are not supported for WS v1.0 as well as the fact that field coverage is not as complete as the WS v2.0 interface.
    c) InsertOrUpdate uses the record "user key" for identification. If need to identify using another field, I suppose that the only way is thru query, etc. Any other ideas ?Only certain fields or sets of fields can be used as a user key. These are described in the WS user guide. You can query on other fields to find a record in CRMOD but a unique value must be provided to identify a record for an update operation.
    Thanks,
    Sean

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Prevention of posting invoices twice

    Hi All I need suggestions and solutions on the below scenario, where client wants to have the check for Duplicate Vendor invoice posting with below conditions 1.If only reference number and amt are matching. 2.Also a warning must appear when same ven

  • Japanese character in WLS7.0

    Hello,everyone: I got such a problem,It's about japanese character in WLS7.0. Let me describe my envirment first, OS:windows 2000 pro (japanese) WLS:Weblogic Sever 7.0 (english) When i write in a japanese character in a form contained by a jsp webpag

  • Index not usable in my simple query

    Hi, I have created index for INC_ID coloumn but when I use it in queries, it is not working. Verified the index it is on valid stat only, eventhough its not using in queries. can you please suggest why it is not using. what I have to do for this. I a

  • Top image on blog is not centered but is in Chrome and IE

    I just redid my blog and most of my top images on my posts are way to the right. I've cleared my cache and reloaded but they are still way over. The images are fine in IE and Chrome. Is there a reason my top images are not centered?

  • Problem in CRM - CO Integration...

    Hi Experts, Currently in ECC we did not activated Operating Concern. Our Organization don't required that. But when we are doing CO integration with CRM It is asking to assign controlling area to Operation Concern(COPA). Even though Operating concern