prashant k. gupta

Ranch Hand
+ Follow
since May 15, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by prashant k. gupta

Hello Folks,

I have cleared OCEWSD6 with 81 % two weeks before ( sorry I am little late to share this ). Below were my steps for preparations:-

1- Following JavaRanch as and when get time.
2- Ivan Notes
3- MZ notes and mock
4- Java Web Services Up and Running
5- ePractize Labs


Though exam was little tough compare to my previous certifications (SCBCD5, SCWCD5) but some questions were straight and it was manageable.
I was preparing from quite some time but I was unable to complete studies due to work load but I believe regular preparation of 4-6 months should be sufficient to prepare this.

Thanks a lot guys...

Prashant
11 years ago

Hi All,

I am trying to access below EPractize Labs website for Java EE 6 Web Services OCE Training Lab to go through the mock exam. but somehow its not getting open at all. Even its home page itself not coming.
Any idea why its blocked in my system? any firewall/proxy setting I need to check?


EPractize Labs' Java EE 6 Web Services OCE Training Lab:-
http://www.epractizelabs.com
http://www.epractizelabs.com/certification/sun/oce-webservices-exam-6.html


Thanks in advance.

Prashant
Hi Ivan,

I looked some more and found that in CalculatorService.java, when I run static client then it’s trying to create URL as below:-



And it was not able to locate and throwing below error as earlier post:-

Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:./WEB-INF/wsdl/CalculatorService.wsdl. It failed with:

Then I changed code in CalculatorService.java as below:-




After that it started working and I was able to invoke Calculator WebService and getting proper response.

Same issue I found when I used JAVAEE clients by using JSP since there also Dependency Injection was not working so I had to create CalculatorService in code. So here is the quick summary how I was able to run different clients for this example:-

1- JAVAEE Client by using Servlet- Dependency Injection worked here and was able to invoke Calculator web service without any issue.

2- JAVAEE Client by using JSP and Static Client- Dependency Injection doesn’t work here for me and created CalculatorService in code as given example:-

CalculatorService mCalculatorService = new CalculatorService();

And the changed the url for WSDL Location as above, then it started working.

3- Dynamic Client – worked without any issue.


Thanks…
I am using RAD7 features to generate the webservice clients from CalculatorService.wsdl, and then simply I created static client as per example, but while looking up the wsdl I am getting this error, I changed the wsdl location in static client as below:-

@WebServiceRef(wsdlLocation ="http://localhost:9080/WebServiceTestWeb/CalculatorService.wsdl")

Also in generated CalculatorService class, I can see that below path is used:-

@WebServiceRef(wsdlLocation ="http://localhost:9080/WebServiceTestWeb/CalculatorService")

And WebServiceTestWeb is already deployed on server and running, but then also I am getting the error posted before…still need to look more for this.



Well champ, it looks like the CalculatorService.wsdl is not being found:



I checked already, CalculatorService.wsdl is in place and CalculatorService is deployed and running, i am able to get the response from Dynamic Client, as already posted in different post, but in Static Client I am stuck here. I couldn't think any other problem here, any thoughts?


Thanks,
Hi All,

I was trying the example of Ivan’s study notes for SCDJWS (4.9 JAX-WS Web Service Clients). While trying static Clients after generating the artifacts in RAD7, I am getting below error:-

Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:./WEB-INF/wsdl/CalculatorService.wsdl. It failed with:
.\WEB-INF\wsdl\CalculatorService.wsdl (The system cannot find the path specified.).
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:148)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:134)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:227)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:190)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:160)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:92)
at javax.xml.ws.Service.<init>(Service.java:67)
at com.ivan.calculator.CalculatorService.<init>(CalculatorService.java:38)
at com.ivan.client.CalculatorClient.callService(CalculatorClient.java:25)
at com.ivan.client.CalculatorClient.main(CalculatorClient.java:15)
Caused by: java.io.FileNotFoundException: .\WEB-INF\wsdl\CalculatorService.wsdl (The system cannot find the path specified.)
at java.io.FileInputStream.<init>(FileInputStream.java:112)

Seems to be problems with the dependency injection and also when I try to create the service in the code then I am getting this error, could you please let me know if I need to change anything in code?

Thanks
Hi All,

I was trying the example of Ivan’s study notes for SCDJWS (4.9 JAX-WS Web Service Clients). In this while trying dynamic Clients example I found that I have to import other classes which was not in example and also I had to import generated artifacts class, below is the import statements of my DynamicCalculatorClient:-

package com.ivan.dynamic;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.Future;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Response;
import javax.xml.ws.Service;


import com.ivan.calculator.AddNumbers;
import com.ivan.calculator.AddNumbersResponse;
import com.ivan.calculator.ObjectFactory;
import com.ivan.calculator.PrintNumber;

I used RAD7 for this example and my CalculatorService was already deployed on server and running and I generated the webservice client artifacts using WSDL and I had to import in my DynamicCalculatorClient class to suppress the compilations error. After that I was able to run the all examples using main methods:-

DynamicCalculatorClient theClient = new DynamicCalculatorClient();
theClient.callOnewayService();
theClient.callSyncReqRespService();
theClient.callAsyncReqRespService();
theClient.callAsyncHandlerReqRespService();


Is this the correct behavior since I saw in notes that’s its written generated artifacts does not required?


Thanks Asit for your response