How to create web services with complex objects as parameters

Hi,
Not sure if this is the right place, but...
I'm using Netbeans 5.5 and trying to learn web services.
Creating a simple web service with simple parameters like strings and integers is nice and easy. I'm now trying to take the next step, and create a web service with a more complex schema as a parameter.
I've tried two approaches, and hit dead ends on both:
(1) Define my complex schema as an xsd file, and then create a WSDL file. Creating the schema and saving it in my EFB project works fine; when I try to create a new WSDL file, the IDE gives me a button to import external schemas - which is where the problem is: the Browse simply won't find my newly created schema file.
(2) Define a Java class (in this case, it's a fairly simple example containing a single ArrayList), and then use the IDE to generate a web service from Java. The IDE does this fine, but I now have no idea how to consume or test the web service - I don't know where to look for the WSDL that has presumably been generated, and I'm also a bit iffy over what answers to give the WSDL creator about port names etc.
Ideally, I'd prefer to get approach 1 to work - can someone point me in the direction of a sensible tutorial for these things?
(Happy to carry on using Netbeans 5.5 or to revert to Sun Studio Enterprise, which I was playing with before.)
All help appreciated, Thanks

- For NetBeans related questions, nbusers mailing list is more suited. It is often visited by NetBeans experts.
http://www.netbeans.org/community/lists/top.html
...[email protected]
The NetBeans users mailing list. General discussion of NetBeans use, this is the place to ask for help and to help others.... (There is a 'Subscribe' button next to the above that you can use to subscribe to the list).
Can you try posting this question on nbusers list?
- SJSE 8.1 is based on an older version of NB (NB5.0).
You should definitely continue with NetBeans, since all development is now being done in NetBeans; all the major JSE modules have been moved to opensource at netbeans.org and are all being developed there. There are as yet no future plans to work on further releases for JSE.
Please check out http://www.netbeans.org for more details.

Similar Messages

  • EJB3 Creating Web Services with Complex Return Types

    Hi
    Not sure if this is the right place, but hoping someone can help!
    I have an entity bean that has a collection (list<Address>) of sub-entities. I have then created a session bean to retrieve the Business and populate it's children.
    I then expose this as a web service and although it works and I get appropriate XML out, the WSDL of the deployed service is not as I would like.
    For example:
    The return type is
    <complextype name="Business">
    <sequence>
    <element name="id" type="int"/>
    <element name="addresses" type="ns1:list"/>
    </sequence>
    </complextype>
    <complextype name="Address">
    <sequence>
    <element name="id" type="int"/>
    <element name="addresses1" type="string"/>
    <element name="addresses2" type="string"/>
    <element name="addresses3" type="string"/>
    </sequence>
    </complextype>
    ns1:list is included as a separate schema as a complex extension of the base "collection"
    So, even though the Address type is there it is not referenced from Business.
    So, when I'm calling the Web Service from BPEL or ESB, I have not got the ability to map adequately back from the response.
    I have tried a whole bunch of ways of getting this to work, but so far to no avail...
    Has anyone seen this before, or can I somehow override the mapping from the Entity to the WSDL?
    Any help would be most appreciated.
    Thanks
    Chris

    Thanks. We are using a Java Proxy to consume the web service as we need to use JAX-WS handlers. We created data control from the service stub that was created by the proxy. Our issue is with the response XML which comes as a complex type. Also, the data control is understanding the complex type and is creating the structure right. The problem is when we drag that control on a JSF page. No data is displayed. We think that we are not traversing the complex object properly which is creating the issue.
    I understand that you answer related to the input is applicable to output as well. We can change the structure by flattening it but we thought that in 11G there is some new features where we can use the complex types out of the box without any change. Is that true? Also, any luck in finding the documents (broken links) on your blog page?

  • Web Services with Complex Objects (Urgent !!)

    Hi,
    My last post was on a problem using IBM-RAD (Service) and AXIS2 (Client) in "New to Java" Forum. That is one of the trial scenarios I'm working on nowadays. Hope, I'll get some useful reply soon.
    Now, I need a suggestion about the application I'm working upon. It is as follows:
    (i) The application (i.e. Service Class) takes some primitive,String and/or some bean object as input
    (ii) It returns a bean object [or an array (can use collection class also if possible) of bean objects].
    (iii) The bean properties are primitive,String , other bean objects, and/or some collection object(Vector / ArrayList etc.) i.e. it should handle complex objects.
    (iv) The Service should run on Websphere and Client on Tomcat.
    A pictorial representation is given below:
    [primitive/String/bean object (Input arg)]
    [(Contains  primitive/String/other bean objects/collection class)] Bean <---------> Service <----------------------- Client
    [Calls bean] |===============> Client
    [Returns bean (or array of beans / collection object)]
    I'm now trying (by building test applications) a combination of IBM-RAD (Service) and AXIS2 (Client), but facing problems in handling array of beans and/or collection classes either on Service or on the Client side.
    So, I need some suggestions on whether I'm going the right way, or need to change my approach (or technology). Any suggestion would be appreciated.
    Please reply ASAP, it is urgent.
    Thanks in advance,
    Suman

    no problem for me, so it's not urgent.
    Request for help denied.

  • How to create Web Service Proxy with help of WSDL.

    Hi ,
    How to create Web Service Proxy with help of WSDL .
    Please help me .
    Thanks in advacne for reply .

    check out this article. It has all the details
    http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html

  • Create Web Service with Function Group

    Hi experts,
    I have 2 question for web service
    1- i want to create web service with function group. My function group is have 2 function modules. I selected function group for web service end point type. And next action i want to select my function group but this is impossible. Because this field is inaktive for value entry. (Img1) How can i make to active this field?
    2- I'm created one bussinness object in SWO1. And assigned ZBAPI... this object. (API METHOD ->ADD METHOD menu). I'm changed oject type's statu for released and created this object. Everything is ok so i can test this object and run ZBAPI method. But i can not see this object type in BAPI transaction. Why i can not see in BAPI transaction my object type ?
    Thank you for your help.

    /bump

  • How to create Web services to communicate InfoPath forms to Share Point lists ?

    How to create Web services to communicate InfoPath forms to Share Point lists ?

    Hi,  
     As per your posting and my understanding, you wanted to communicate your infopath with SharePoint list/library. Please refer the below link(s) which may help you to solve your issue.
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    http://jaliyaudagedara.blogspot.in/2011/03/submitting-data-to-sharepoint-2010-list.html
    or 
    http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx
    If you need more help please let usknow
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you
    see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to create Web Service in CRM 7.0

    Hello all,
    Can anyone help me with the steps/procedure involved in the creation of Web Service call in CRM 7.0.
    Any help is greatly appreciated.
    Regards,
    Ganesh

    You can very simply create web service with new web service tool in 4 steps. in first step you define the object and type of operation (read/create/change). Then in secend step you select atributes which you want to be available in ws. In third step you can define default values for atributes. And in last step you activate ws and set it to productive state to be able to use it.
    You can find web service tool if you loog in SALESPRO role under Sales operations workcenter.
    regards.

  • Web service with complex java type

    Hi,
    I create a web service method with String o with Array of Strings without problem. Now I nedd to create a ws that return a table, so I create a class like this:
    public class User {
         private String Name;
         private String.Surname;
         public void setName(String setName){
              Name= setName;
         public void setSurname(String setSurname){
              Surname=setSurname;
    In my ws class I use this object:
    public User[] getUser(String a){
              User[] user = new User[10];
              for (int i=0;i<10;i++){
                   User<i>.setName("aaa");
                   User<i>.setSurname("bbb");
              return user;
    When in WebService Perspective I try to create my ws in wizard mode I see method getUser but I can't check it
    Where is error?
    Thanks
    Andrea

    HI Andrea,
        I think with present netweaver developer studio , we can create Web services with end points as simple data types in java and the array of that simple data types.
        not sure whether it support our own custom developed classes as end points.
         just go through these links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
    from this we will get Restrictions for WS Endpoints.
                             Regards
                              Kishor Gopinathan

  • How to create web services in java?

    Hi,
    I am a newbie to java webservices. Can anybody tell me how to create web services in java?
    Any tutorial link or step by step doc would be useful.
    Appreciate your help in this regard.
    Thanks in advance.
    naymo01.

    Creating web services in Java appears to depend highly upon the server you intend to use.
    Here's a tutorial: http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

  • How to create web service client

    Hi All,
    I am new to web services .Can any body explain how to create web service client ....
    Please give the give the discription step wise.
    Thanx
    Arun

    Hi Krishna,
    Yes it is possible.
    Check this Link
    [JDeveloper Web Service|http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_wstopdown/wstopdown.htm#t2]
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_wstopdown/wstopdown.htm#t2
    I strongly suggest you to go for Eclipse, instead of Netbeans or Jdeveloper incase of WebService. If you want to run your code in all the Server without making any changes go for Eclipse based development for Web Service.
    Kindly let me know if you need some more inputs.
    Regards,
    Zack

  • How to create Web Service & Web Service Client on OCMS

    Hi all,
    Is anybody can show me how to create Web Service on OCMS?
    I only know how to do it on WebLogic Server.
    It has many differences between OCMS and WLS.
    Thanks & Regards,
    Jack.

    Jack,
    This tutorial can help:
    http://www.oracle.com/technology/products/ocms/pdf/parlayxjdeveloper.pdf
    Regards,
    Adam

  • How to create Web Service as a source system in BI and configure a DS

    Hello,
    I was wondering if you can give me the links to information where it is explained how to create Web Service as a source system in BI 7 NW 2004s and also how to create a data source that would read data from that Web Service?
    Thanks,
    AG

    Hi AG.
    Please check the following documentation which talk about this questions.
    [Creating Web Service Source System|http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a618ae07211d2acb80000e829fbfe/frameset.htm]
    [Creating DataSources for WebServices|http://help.sap.com/saphelp_nw70/helpdata/EN/43/ec90a315434c5de10000000a155369/frameset.htm]
    [Transfering Data Using WebServices|http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a618ae07211d2acb80000e829fbfe/frameset.htm]
    I hope that I can be helpful.
    Thanks,
    Walter Oliveira.

  • Web Service with Complex Results and Flex

    I have created a Enterprise Java Bean that has one "test" method that returns a String[]. I have compiled, deployed and registered this bean in Sun's Application Server 8.1. I am using NetBeans 5.0 to develop this project.
    I try to load this web service into Flex and I get a fault thrown: TypeError: Error #1034: Type Coercion failed: cannot convert []@29e5d06 to XMLList. I have set the returnType in Flex as "e4X.". Do I need to do this in my webservice.
    Any help would be appreciated.

    HI Andrea,
        I think with present netweaver developer studio , we can create Web services with end points as simple data types in java and the array of that simple data types.
        not sure whether it support our own custom developed classes as end points.
         just go through these links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/f7/af60f2e04d0848888675a800623a81/frameset.htm
    from this we will get Restrictions for WS Endpoints.
                             Regards
                              Kishor Gopinathan

  • How to create Web Service Client from wsdl with digital signature?

    Please, help me to create Web Service Client from wsdl with digital signature. I know create Web Service client from wsdl file and I know how to add digital signature to XML with jwsdp, but I don't know how to do it together.
    Thanks.

    I'm handling security wit JAX-WS handler. So I insert "manually" ws-security tag and I encrypt (and sign) message parts.
    On client side, all works fine, but on server side I obtain:
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Starting decrypt|#]
    . dectypted.!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soapenv:Body><ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona></soapenv:Body></soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]If you have any idea for solving my problem, then I can post my simple example :(
    Bye!

  • How to create Webi Reports with SAP BW Objects

    Hi,
    I have no knowledge on creating webi reports with SAP BW Objects like (InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject).
    As per my understanding Webi reports can be developed with universe which is created on BEx Queries or OLAP BAPI interface, unfortunately i don't have BEx App installed. So, i have to create OLAP universe in this case.
    Here my question is can we create universe with all the available BW objects like InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject.
    Please, Can anyone suggest a solution
    Thanks,
    Siva
    Edited by: siva@chinni on Apr 25, 2010 4:45 PM

    Hi,
    Yes we can create WebI on the top of SAP Objects - InfoCube, DSO, Characteristics etc...
    But we have to keep in mind that for WebI we must create Universe.
    When we create universe we make direct connection with SAP Objects but we get less functionality - such Calculated Key Figures, Restricted Key Figures, formulas etc. Now you have to achieve all these missing components at Universe Level and at WebI level.
    If you are creating your universe on the top of DSO and InfoObject then make sure they set for reporting.
    There are some online documentation which tells that what functionality you can achieve.
    Check the following document to have a bird's eye view.
    [http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/100369a7-033e-2c10-94a4-f254f8578153?quicklink=index&overridelayout=true]
    There is another document in PPT which I could  not find online. It is very helpful document. It is:
    II. SAP BusinessObjects BI Solutions XI 3.1 and SAP NetWeaver BW 7 Current risks, approach, and mitigating strategies for Client Partners, License Sales, and Consulting Delivery Managers
    Partner Enablement Seminar
    Regards,
    Bashir Awan

Maybe you are looking for