Ankita Agarwal

Greenhorn
+ Follow
since Nov 10, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ankita Agarwal

Hi,

Thanks alot for your advices.

Nothing was working for me ,so I changed my configurations. I used Eclipse 3.5 and GlassfishServer v3 .

Now it's working fine .I am able to see my wsdl's .

Thanks ,
Ankita.
Hi Ivan,

Thanks for your reply.

I tried it by creating a directory named wsdl inside WEB-INF and redeployed the application ,but still it gives me the same error.
Is it possible that there is some problem with the server.


Thanks ,
Ankita.
Hi,

I have created a small WebService using Eclipse 3.4 and Glassfish v3 prelude.
After deploying the WebService I am unable to see the wsdl through Web Browser.I am not getting the reason for it.
Is it the problem with Glassfish or I have missed out something.I have included the code below:
Using wsgen tool i have created 'MyHelloService_schema1.xsd' and 'MyHelloService.wsdl' and placed it inside 'WEB-INF' folder.
I was trying to access wsdl through this URL: http://localhost:8080/HelloWebService/MyHelloService?wsdl which gave me 404 error.
Please help me out in this.

//Service Class:
package com.hello.ws;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

@WebService(name="Hello",serviceName="MyHelloService",targetNamespace="http://myws.com/hello" )
public class Hello
{
@WebMethod(operationName="getName",action="urn:get")
@RequestWrapper(className="com.hello.ws.GetNameRequest",localName="getNameRequest",targetNamespace="http://myws.com/hello")
@ResponseWrapper(className="com.hello.ws.GetNameResponse",localName="getNameResponse",targetNamespace="http://myws.com/hello")
public String getHello(String name)
{
System.out.println("The name is :"+name);
return "Hello " + name + "!";
}
}

//WSDL:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions targetNamespace="http://myws.com/hello" name="MyHelloService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://myws.com/hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://myws.com/hello" schemaLocation="MyHelloService_schema1.xsd"/>
</xsd:schema>
</types>
<message name="getName">
<part name="parameters" element="tns:getNameRequest"/>
</message>
<message name="getNameResponse">
<part name="parameters" element="tns:getNameResponse"/>
</message>
<portType name="Hello">
<operation name="getName">
<input message="tns:getName"/>
<output message="tns:getNameResponse"/>
</operation>
</portType>
<binding name="HelloPortBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getName">
<soap:operation soapAction="urn:get"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyHelloService">
<port name="HelloPort" binding="tns:HelloPortBinding">
<soap:address location="http://localhost:8080/HelloWebService/MyHelloService"/>
</port>
</service>
</definitions>

Thanks ,
Ankita.
Hi Ivan,

Thanks for your reply.

Im able to access WSDL through browser.Also I have redeployed the application .Still it is not working.

It seems I have missed out something .
Sysout statements in my Calculator class are also not getting printed .
My Calculator class resides in the pkg: com.myws.Calculator(Does that mean that service is not getting invoked.)
Do I have to give this somewhere in the WSDL.

Thanks ,
Ankita.

Hi,

I am running examples from Ivan's guide : Calculator service and String Processor.
For both of the services i did testing by right clicking the WSDL file and selecting Web Services → Test with Web Services Explorer. I am getting the Web Service Explorer page but after giving inputs i m not getting any output. Instead i m getting this status:

"IWAB0135E An unexpected error has occurred.
404
Not Found"

I am unable to see any request or response message and output in console.
I am using Eclipse3.1 and Glassfishv3 prelude.
Please anyone explain me.

Thanks ,
Ankita
Hi,

I have solved it . I didn't create wsgen-output folder .
I thought wsgen tool will create it.

All the classes are getting generated now.


Thanks ,
Ankita.
Hi

Im new to Web Services.
I was trying to run first example given in Ivan Krizsan(sec 4.7) study guide .
I have installed Eclipse3.1 and using Glassfish v3 prelude and jdk1.6

While running the Ant script I am unable to generate output folders "wsgen-output" and also create WSDL file in (WEB-INF/wsdl) folder.

Please let me know if I have to make any changes in the Ant script file or any other settings to be done.

Thanks,
Ankita.