Monday February 12, 2007
Screencast #WS2: Invoking a Web service using NetBeans IDE
In the second part of the screen cast series (part 1), I show the various ways by which NetBeans IDE can invoke a Web service endpoint. The first part showed only the default way to invoke the endpoint, but this screen cast shows two additional ways.
Enjoy it here.
Feel free to post suggestions on what would you like to see in terms of Web services development using NetBeans.
Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast
Posted by Arun Gupta in webservices | Comments[41]
|
|
|
|
|
Today's Page Hits: 924
Total # blog entries: 994
| « November 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
1 | 2 | 4 | 6 | 7 | ||
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | |||||
| Today | ||||||
Posted by Arun Gupta's Blog on February 13, 2007 at 07:39 AM PST #
Posted by Andy Webb on February 20, 2007 at 03:48 AM PST #
Posted by Nader on February 20, 2007 at 07:58 AM PST #
I'll post a list of screen casts that are planned for the next few weeks. I'll add the tutorial to use bundled derby database to the bottom of that list. It might get done sooner :)
Nader,
Glad that you liked the screencast. Feel free to leave comments if you would like to see any other screen casts.
-Arun
Posted by Arun on February 20, 2007 at 09:52 AM PST #
Posted by Andy on February 21, 2007 at 01:46 PM PST #
Posted by 62.31.19.152 on February 21, 2007 at 02:03 PM PST #
Posted by Arun on February 22, 2007 at 09:43 AM PST #
Posted by Arun on February 23, 2007 at 03:51 PM PST #
Posted by Marc on February 27, 2007 at 08:58 AM PST #
Posted by Arun on March 01, 2007 at 08:52 AM PST #
Posted by Arun Gupta's Blog on March 03, 2007 at 07:48 AM PST #
Posted by Arun Gupta's Blog on May 23, 2007 at 03:51 PM PDT #
Posted by Arun Gupta's Blog on June 14, 2007 at 06:17 AM PDT #
Posted by arif mahmood on June 14, 2007 at 10:15 PM PDT #
Posted by Arun Gupta's Blog on June 18, 2007 at 05:29 PM PDT #
Posted by arif mahmood on June 18, 2007 at 06:45 PM PDT #
Posted by Arun on June 21, 2007 at 05:43 PM PDT #
Posted by Arun Gupta's Blog on July 10, 2007 at 12:20 PM PDT #
Posted by Arun Gupta's Blog on July 16, 2007 at 03:07 PM PDT #
Screencast #WS2: Invoking a Web service using NetBeans IDE - not running throws error
Posted by Prashant on September 05, 2007 at 09:59 PM PDT #
Prashant, What error do you see ?
Posted by Arun Gupta on September 05, 2007 at 10:03 PM PDT #
Your screen cast are simple easy to understand, wonderful.
Will you please consider explaining in more detail how to return complex type dataset from webservice in netbeans invironment. it would be of great help for many netbeans user. I have not found solution to this problem in any blog.
thanking you
raj
Posted by Raj Gautam on December 29, 2007 at 03:06 PM PST #
Raj, By a complex data set you mean a JavaBean with multiple getter/setter where each could be a Bean ? The Tester app that comes with GlassFish support only primitive data types. You'll need to create a JSP/Servlet/JavaSE client as described at:
http://www.netbeans.org/kb/60/websvc/jax-ws.html
Posted by Arun Gupta on January 02, 2008 at 05:31 PM PST #
You cast gave me a clear picture and concept on how web service work and apply in Netbeans in a minute.
I am now exploring how to return complex types, e.g. Vector, ArrayList from Web Services which could be understand by ASP .NET. Noted you mentioned do it using Java Bean, would you elaborate the details or giving URLs about that.
Thank you for your great help.
Brian
Posted by Brian Kwan on July 09, 2008 at 04:27 AM PDT #
I use java for xml.Can i do something with apx?
Posted by gazduire web on September 10, 2008 at 10:05 AM PDT #
Hello Arun,
Thank you for the wonderful tutorial. To consume a web service we create a web client from WSDL and consume it. Let's say I have two web services ws1 and ws2 and if I want to invoke ws2 in ws1 do I need to create a web service client in ws1 using ws2 WSDL?
Thanks,
nimdhar
Posted by 144.226.173.68 on October 21, 2008 at 11:53 AM PDT #
Yep, generate clients for WS2 and make them available in WS1 classpath.
Posted by Arun Gupta on October 21, 2008 at 12:03 PM PDT #
Hi Arun
Currently I'm working with an application where I'm trying to access WCF services(.net plateform) by java. I've configure with Eclipse IDE and with web services explorer when I'm passing WSDL URL it is fatching all running services and built in methods. The issue is I'm able to access and get return by those methods which are using primitive data types like String, Integer etc. But not able to access arraylist Dictionary and Hashtable. Can you suggest me, is java support .net compatibility with these collection types? If yes how I can achive this. Please suggest I'll be great thankful to you.
Posted by chandra prakash on November 20, 2008 at 01:25 AM PST #
chandra prakash, there is no standard schema for these collection types and that's what makes them less compatible. I'd recommend to ask your question to users@metro.dev.java.net for a better response.
Posted by Arun Gupta on November 20, 2008 at 05:14 PM PST #
I'll post a list of screen casts that are planned for the next few weeks. I'll add the tutorial to use bundled derby database to the bottom of that list. It might get done sooner :)
Posted by laptop batteries on November 26, 2008 at 08:36 PM PST #
Just the information I needed. However, when I apply the command line client example to my situation which has a BEA webLogic server that requires authentication, NetBeans is unable to retrieve the WSDL. NetBeans does prompt me for a username and password, but it never resolves. If I go to a browser on the same machine as NetBeans those user/pass credentials work great. What might be the problem?
Posted by Troy on April 01, 2009 at 04:22 PM PDT #
Troy, can you post your question to nbusers@netbeans.org or (http://www.netbeans.org/community/lists/top.html#top).
Posted by Arun Gupta on April 06, 2009 at 10:54 AM PDT #
Could you tell me where I can download songs/file for my old GEM WS2 keyboard, please? I know its too old but I love it so much, and how can I connect it to the compuer? what is the software that can do this connection, many thanks to you.
Posted by Ibrahim Harfoush on May 11, 2009 at 10:37 AM PDT #
Hi Arun,
I actually do development in C# .net. Lately I had a need to test if I can call a .Net webservice from Java app or JSP page. Your screencast ws2 has been very useful for me and I was able to create reference of my .Net webservice in a simple Java app in Netbeen 5.5.1 where I can see all the methods that exposed by the .net webservice. However I run the Java app the result was not what I expected and I appreciate if you can help.
Basically, the .net webservice exposes a method GetDeviveDataString(string, string, string) that access sql server and returns a string representation of the dataset (each record is formatted as CSV string and ended with a new line '\n') and this has been tested with a ASP.net page okay.
The java app (which I followed your webcast) when examined has the following line
Client.TestX0020ServiceResponse result = port.getDeviceDataStringTest(parameters);
I tried to replace the 'parameters' with appropriate string values then the app would compile with error!
Now I then have another method exposed by the same webservice which does not require any parameter and return a string "Hello world". With this simple method, when called from the java app only return the actual name of the method itself :
Result = Client.TestX0020ServiceResponse@1d0fafc
I have 2 questions
1) How do I pass parameters to a parameterised .net webservice method in Netbeans 5.5.1
2) How do I retrieve the correct output of .net service method instead of its name in java app created in Netbean 5.5.1
As I am new and not quite familiar with Java world, your help is greatly appreciated.
Thanks in advance
Posted by victor lu on June 14, 2009 at 11:27 PM PDT #
Victor, please post your question to users@metro.dev.java.net for a quicker response.
Posted by Arun Gupta on June 15, 2009 at 09:52 AM PDT #
Arun,
By the way I had these issues resolved.
It turned out that it was the way Netbeans generated the code from WSDL file which I assumed to give me the expected results but clearly it did not! Nonetheless I start to like using netbeans. Very nice IDE indeed. ;-).
Adding required parameters to the WS method, one needs to do the following:
//This was generated by netbeans
testwsfromdotnet.GetX0020DeviceX0020DataX0020AsX0020ByteX0020ArrayResponse rawResult = port.getDeviceDataByteArray(params);
//This need to be added as required
parameters.setDeviceDsn("3811080007");
parameters.setStartDate("2009-05-04 07:02:16");
parameters.setEndDate("2009-05-04 12:17:33");
After that, the result that was generated by Netbean needed to processed further :
//This was generated by netbeans
testwsfromdotnet.GetX0020CompressedX0020DeviceX0020DataX0020AsX0020AX0020ByteX0020ArrayX0020Response compressResult = port.getCompressedDeviceDataByteArray(parameters);
//This MUST be added to get the expected result
byte[] compressedData = compressResult.getGetX0020CompressedX0020DeviceX0020DataX0020AsX0020AX0020ByteX0020ArrayX0020Result();
So at the end, I have learned a great deal of interoperate between Java app/JSP and .Net Webservice.
Thanks for the webcasts. Cheers
Posted by victor lu on June 17, 2009 at 12:44 AM PDT #
Hi Arun,
I am new to web services.
As a beginner your screencasts helped me a lot to create a simple web service and a web service client using NetBeans.
Do you have any screencasts which show how to connect to database and use simple SQL statments in a web service?
Appreciate your help.
Thanks!
Sai.
Posted by sai on June 24, 2009 at 02:18 AM PDT #
Sai,
A JPA Persistence Unit can be easily created as described at:
http://blogs.sun.com/arungupta/entry/restful_representation_of_sakila_using
Then you can use the generated POJO classes and JPQL to query the database from your Web service class.
Feel free to follow up on users@metro.dev.java.net.
Posted by Arun Gupta on July 02, 2009 at 10:25 AM PDT #
Sir,
I m a beginner in the J2EE I need your guidance.
I have seen few of your screencast which helped a lot.
but after #ws3 i was unable to get the concepts.
I ws in the search of something which could explain the webservices and it developement in deatails and in easy language.
I use netbeans tool, awaiting your response.
regards,
Dipakkumar
Posted by Dipakkumar Patil on September 01, 2009 at 10:51 PM PDT #
Dipak,
Following up with your comment at:
http://blog.arungupta.me/2009/09/gmail-down-502-server-error/comment-page-1/#comment-8758
Posted by Arun Gupta on September 02, 2009 at 05:28 AM PDT #
fgxbc aersdfcv xweascvx
Posted by 198.54.223.185 on October 29, 2009 at 02:46 AM PDT #