How to call Web Services with Sun Java Studio Creator?

Can someone from Sun please explain how to use the sample Web Services USWeather and GoogleSearch in Sun Java Studio Creator (no Portlet Application)?
I read the Web Service Tutorial Accessing Web Services (http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/webservices.html) and this blog entry: http://blogs.sun.com/roller/page/winston?entry=code_google_search_in_no .
But the proposed solutions do not work with the services USWeather and GoogleSearch.
Thank you.

Thank you for your answer, dongmei.
It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
      <s:element name="GetWeatherReport">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetWeatherReportResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="string" nillable="true" type="s:string" />
    </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
The question is how can I get the response GetWeatherReportResult from the service.

Similar Messages

  • How to call web-service using only java code

    Hello, how to call web-service using only java code. I can call it from BPM process or Web Dynpro Java Application, but if I need to call it from ejb component?

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • How to do internationalization with Sun Java Studio Creator?

    Hi everybody,
    the Sun Java Studio Creator seems to be a great peace of software ;-) Currently I'm trying to design some forms for a hello-world-test-project. My question now is: how can I realize internationalization with property-bundles? I already managed it to create my own bundles, I set up a few locales (de, en, fr) and put in some "SayHello" Variables. But how can I associate my locale-variables in the .propertie-files with the value- or text-attributes of the UI-Components using the form designer?

    well... it's not working!
    I created some locale-properties. Put a
    <f:loadBundle basename="mypackage.mainlocales" var="messages"/>directly under the "<f:view>"-Tag as it is descriped in the manual.
    But when I write something like
    <ui:label binding="#{sites$main$mainmenu.label1}" id="label1" style="position: absolute; left: 312px; top: 168px" text="#{messages.test}"/>The designer crashes with an error-message:
    javax.faces.el.PropertyNotFoundException: Error testing property 'test' in bean of type null
         at com.sun.faces.el.PropertyResolverImpl.getType(PropertyResolverImpl.java:342)
         at com.sun.rave.web.ui.faces.UIComponentPropertyResolver.getType(UIComponentPropertyResolver.java:298)
         at com.sun.rave.web.ui.faces.DataProviderPropertyResolver.getType(DataProviderPropertyResolver.java:264)
         at com.sun.jsfcl.data.ResultSetPropertyResolver.getType(ResultSetPropertyResolver.java:141)
         at com.sun.rave.jsfsupp.container.DesignTimePropertyResolver.getType(DesignTimePropertyResolver.java:169)
         at com.sun.faces.el.impl.ArraySuffix.getType(ArraySuffix.java:240)
         at com.sun.faces.el.impl.ComplexValue.getType(ComplexValue.java:208)
         at com.sun.faces.el.ValueBindingImpl.getType(ValueBindingImpl.java:350)
         at com.sun.rave.web.ui.renderer.ValueHolderDesignTimeRenderer.encodeBegin(ValueHolderDesignTimeRenderer.java:59)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)Nevertheless - when I deploy my application, the locales are processed correctly.
    What am I doing wrong?

  • JSF conflict with Sun Java Studio Creator

    I was trying to use JSF but when i was installing Sun Java Studio everything went ok but there was a step saying "Deploying Web Services" that tool a lot of time about 10 minutes. So i cancelled it and the Sun Java Studio Creator was working well then when i was running the small application it didnt do anything. I think something wrong with the application server. I uninstalled Sun Java Studio Creator and installed it again.
    This time no problems in installation. Then when i was creating a new JSF application when i press finish an error(1) appears and the finish button is dimmed so i have to press cancel and another error occurs(2), but the project gives an error message(3)
    I have been trying to solve this problem but i dont know what to do.

    Please check / post the Creator log file ( Tools -> Java Studio Creator Log File)
    Check / post the server log file as well, which will give more info.
    To view the Sun Java System Application Server log file:
    In the Servers window, right-click the Deployment Server node and choose View Server Log.
    In any text editor, open the log file in the following location: install-directory\SunAppServer8\domains\creator\logs\server.log

  • Developing applications with Sun Java Studio Creator

    I downloaded Sun Java Studio Creator yesterday. I'm developing a Java application, however when I went to create a new project there only appeared to be web-related projects that could be created so I haven't figured out how to create a new application project.
    Does this program allow you to create stand-alone java applications??
    thanks,
    Doug

    What JSR says is true. The advantage of using Netbeans is that it works much faster than Java Studio Creator. It also has some nifty wizards for helping create various kinds of java projects.
    However, Java Studio creator is in fact based on Netbeans and it is possible to use JSC to create a java application. Do do so, click on Create New Project, then under Categories, select General...Java Class Library. JSC will create a new project for you with the name you provide. If you then go over to the project browser and right click your mouse on Source Packages and select New...Java Class it will create a class file for you that you can then write your java code into.
    In the project browser you can then right click your mouse over the class you created to compile it and run it.
    Daren

  • Help needed with Sun Java Studio Creator and EJB in a Portlet Project

    Hi
    I have created an web-application with JSF in Sun Java Studio Creator 2. The web application uses a lot of EJB's which acts as the dataProviders. In a typical jsp page i have more that one data providers(the EJB's) getting used. When i run the project everything opens up properly in the browser and the application seems to be fine.
    But when i create a JSP 168 Portlet project and do exactly the same thing for some reason the Apache Pluto(comes as the default Portlet Container with Studio Creator) conks off.
    Then i started going ahead step by step:
    1. First i created a portletpage and added only one dataProvider(EJB) and ran the project...It gets deployed properly in Pluto and the browser comes up and everything shows up fine.
    2. Just to re-confirm i did the same thing with another dataProvider(EJB). So still we have just 1 EJB in the portlet page. As expected it also worked fiine.
    3. Then when I added more that one dataProviders(EJBs) in the porlet page the Apache Pluto conks off(saying that Pluto is not available)
    I tried doing a lot of things but nothing works...Surprisingly the same thing works when u create a JSF web Application project but the same thing does not work when u create a JSR 168 JSF Portlet Project...
    Did anybody face the same problem..Is it a bug in the Studio Creator...Any help would be highly appreciated.

    Hi,
    There are a few discussion threads in the feedbackprograms portal for Creator 2 EA 2. The URL is:
    https://feedbackprograms.sun.com/login.html
    In the EA discussion forum you will find threads which discuss the concerned topic. In specific look for threads titled:
    # Deploying Portlets
    # Taking a JSC Portlet to Tomcat creates a Faces Mapping Error
    # Problem with Pluto when trying to deploy a portlet
    # Request: JSR-168 Portlet Project without JSF
    We kindly request you to post your further queries related to EA in the above mentioned forum.
    Cheers
    Giri

  • How to call Web Services (with javascript) in a view load event ?

    Hello to the expert community,
    I'm looking for a piece of javascript code allowing to call Web Services in a view load event ?
    Any ideas will be really appreciated.
    Regards.
    Have a nice week.

    Thank you for your answer, dongmei.
    It seems that the MethodResultTableDataProvider does not return the response of the web service as a value field if the WSDL contains only one result element.
    E.g. from WSDL of the USWeather Web Service which returns theGetWeatherReportResult string:
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.webserviceX.NET" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://www.webserviceX.NET" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET">
          <s:element name="GetWeatherReport">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="ZipCode" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="GetWeatherReportResponse">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GetWeatherReportResult" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
          <s:element name="string" nillable="true" type="s:string" />
        </s:schema>If I drag the web service method on the page and I should be able to select the response value in the Bind to Data dialog box. But there is no value field. Value fields only occur if the web service returns more than one value.
    The question is how can I get the response GetWeatherReportResult from the service.

  • Web Service + Complex Type + Java Studio Creator

    Hy all!!
    I am using Ubuntu 7.04 + Java Studio Creator 2 and i'm trying to use a webservice.
    This webservice uses a Complex Type and was made in PHP.
    I guarantee that this webservice is working with complex type because i've tested using a PHP client.
    I have already worked with others webservices in Java Studio Creator using simple types!
    So I went to Add Web Service, put the wsdl link, Get Web Service Information and then Test Method that uses Complex Type.
    Then I gave a input value and when I submit i got this error:
    InvocationTargetException com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:459) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) null sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595) Runtime exception; nested exception is:
    [failed to localize] nestedDeserializationError([failed to localize] xmlreader.unexpectedState(END, START: nome))
    com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:318) com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:300) webservice.Grs_PortType_Stub.buscarCompleto(Grs_PortType_Stub.java:122) webservice.grs.grsClient.buscarCompleto(grsClient.java:36) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595)
    [failed to localize] nestedDeserializationError([failed to localize] xmlreader.unexpectedState(END, START: nome))
    com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:233) com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155) webservice.Grs_buscarCompleto_ResponseStruct2_SOAPSerializer.doDeserialize(Grs_buscarCompleto_ResponseStruct2_SOAPSerializer.java:43) com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:192) com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:155) webservice.Grs_PortType_Stub._deserialize_buscarCompleto(Grs_PortType_Stub.java:186) webservice.Grs_PortType_Stub._readFirstBodyElement(Grs_PortType_Stub.java:160) com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:215) webservice.Grs_PortType_Stub.buscarCompleto(Grs_PortType_Stub.java:122) webservice.grs.grsClient.buscarCompleto(grsClient.java:36) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) com.sun.rave.websvc.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:450) com.sun.rave.websvc.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1031) java.lang.Thread.run(Thread.java:595)
    Any help would be appreciated!
    Thanks a lot!
    Mario Mol

    Have you seen this?
    http://developers.sun.com/jscreator/reference/techart/2/create_consume_web_services.html
    Also have you tried the latest and coolest IDE Netbeans 6?
    It includes all the features of Creator plus lots more.
    Thanks
    K

  • How to call web service with parameters?

    Hi
    I'm testing a distributed architecture where parameters are queried from an ODBC database, and a web service called with resulting parameters as input, returning a computed result to the integrated Crystal report. I'm unable to successfully associate the database fields with the web service parameters - the web service is always called with empty parameters. When I call the web service manually from CR by entering parameters, it works as expected. I'm using a sub-report with fields linked to the main report.
    Has anyone done something like this / know how to correctly link database fields with web service parameters?
    Help much appreciated,
    Lance

    An update - I solved this problem as follows:
    In CR Design view, right-click on sub-report object, select 'Change Subreport Links'. In the links dialog, transfer database fields into 'Field(s) to link to' list. Select a field in 'Field(s) to link to' and in 'Subreport parameter field to use' below, map the field to the appropriate web service parameter field in the dropdown.
    Tested with version 11.5.8.826.
    - Lance

  • Can I make reporting  with Sun Java Studio Creator !

    Hi !
    I would like to know if it is possible to make reporting within a webpage build with JSC !
    Thank !

    sure you can make reports inside a jsf page.
    by report you mean PDF reports ? or something else ?
    can you specefy more ?
    following thread (if it open for you) contain a discussion about reportingin jsf pages.
    http://swforum.sun.com/jive/thread.jspa?threadID=58569&tstart=300
    also you can look at
    http://jasperreports.sourceforge.net
    there are some samples which you can start with them.

  • How to call web service using J2SE 1.3?

    Dear All,
    i have developed a web service by jdev 10.1.3 (JAX-RPC with web service security
    enabled).
    i generate the ws proxy (jdev 10.1.3) and run it with wsclient_extended.jar (required JDK 1.4.1 or above??).
    but one of my client say he has to use J2SE 1.3.x (as OS=AIX 4.3 that without J2SE
    1.4.x ), could anyone tell me how can generate ws proxy (with supporting
    library) for jdk 1.3.x?
    if oracle don't have such library / tools, any third party tools / library available?
    thank you.
    lsp

    I'm found answer:
    Java and SAP Portal blog: How to call web service from java code example

  • How to call web services in WEB DYNPRO ABAP

    Hi ABAPER'S,
    Please let me know how to call web services in web dynpro.
    Thanks,
    Sandy.

    Hi Sandy,
    Please check this blog..
    /people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    also cehck this...
    call the webservices in webdynpro ABAP.
    calling webservice in webdynpro component
    Re: Web Services in WDA.
    Cheers,
    Kris.
    Edited by: kissnas on May 24, 2011 11:37 AM

  • How to call WEB Service From SAP

    Hi Friends,
    How to call WEB Service From SAP.
    Thanks in advance,
    Murali Krishna K

    Hi,
    if you mean calling a web service in Web Dynpro ABAP, see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d7/951b42f828df2ce10000000a1550b0/frameset.htm">documentation</a>, if you mean calling a web service in general, this is not the correct forum. This here is the Web Dynpro ABAP forum, for general questions on ABAP, use the ABAP forum.
    Regards, Heidi

  • How to call web services from HTML

    Hi All,
    Does anybody have an idea on how to call web services from HTML using axis and i am using jboss-4.0.5 as the application server.

    What did your Google search return?

  • How to call web services from PL/SQL?

    Hi,
    Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
    Thanks in advance

    Here's some example skeleton code to get you started...
      PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
        soap_request  VARCHAR2(30000);
        soap_respond  CLOB;
        http_req      utl_http.req;
        http_resp     utl_http.resp;
        resp          XMLType;
        soap_err      exception;
        v_code        VARCHAR2(200);
        v_msg         VARCHAR2(1800);
        v_len number;
        v_txt Varchar2(32767);
      BEGIN
        UTL_HTTP.SET_PROXY(p_proxy);
        -- Define the SOAP request according the the definition of the web service being called
        soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
                       '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
                       '  <SOAP-ENV:Body>'||
                       '    <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
                       '      <m:UserName>'||p_username||'</m:UserName>'||
                       '      <m:Password>'||p_password||'</m:Password>'||
                       '    </m:DownloadRequest>'||
                       '  </SOAP-ENV:Body>'||
                       '</SOAP-ENV:Envelope>';
        http_req:= utl_http.begin_request
                  ( 'http://www.website.net/webservices/GetDetailsService.asmx'
                  , 'POST'
                  , 'HTTP/1.1'
        utl_http.set_header(http_req, 'Content-Type', 'text/xml');
        utl_http.set_header(http_req, 'Content-Length', length(soap_request));
        utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
        utl_http.write_text(http_req, soap_request);
        http_resp:= utl_http.get_response(http_req);
        utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        utl_http.end_response(http_resp);
        resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
      END;Using secure web services (https)...
    Web serivces call in Plsql
    As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't.

Maybe you are looking for

  • BI-IP - Planning Buffer issue

    Hi Experts, In our current BI-IP project, there is a requirement to jump from an input ready query, located in web template u201CAu201D, to another web template u201CBu201D, which contains one display only query and a couple of planning functions. To

  • HT204053 How to manage two iPhones under one Apple ID?

    Me and my mom need help. We are using the same Apple ID and our contacts have now been jumbled up because she has just now downloaded to iOS 7.3 Now i have still not updated to iOS 7.3. but i do have iOS 7.1 Could this be a problem and how do we fix

  • Budget Availability control and Assigned Value in Project

    Hi, Project is so structured that it is similar to the product structure. Assume a simple case with two level BOM where a sub assembly M1 includes another sub assembly M2. In project, these two sub assemblies are assigned under two different WBS elem

  • PP CS5 Video Exporting as choppy.  HELP!

    I am running PP on a MacBook Pro with the i7 processor.  I have edited and exported a ton of videos with no problems- most of them include projects from After Effects as well. Video's are shot using a 7d,5dmk2, and contour camera. I am mixing some 24

  • My 30 GB COLOR IPOD has blue lines going across it????

    For about a month now, my ipod screen switches in and out of an appropriate screen and another time it will light up and have only blue lines going across it... How do I fix this?