Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Sarvotham Pai

Greenhorn
+ Follow
since Apr 25, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sarvotham Pai

Hi

I am new to webservice and trying sample webservice using JAX-WS.
Following is my pom.xml, which is calling wsgen.

<build>
<finalName>MPS-AXIS</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsgen</goal>
</goals>
<configuration>
<sei>com.web.webservice.Hello</sei>
<genWsdl>true</genWsdl>
<keep>true</keep>
<verbose>true</verbose>

</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

My impl class is

import javax.jws.WebMethod;
import javax.jws.WebService;


@WebService()
public class Hello
{
private String message = new String("Hello, ");


@WebMethod()
public String sayHello(String name) {
return message + name + ".";
}

}

following is the wsdl generated

<definitions targetNamespace="http://webservice.web.main.ieso.ips.hp.com/" name="HelloService" xmlns:tns="http://webservice.web.main.ieso.ips.hp.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.web.main.ieso.ips.hp.com/" schemaLocation="HelloService_schema1.xsd"/>
</xsd:schema>
</types>
<message name="sayHello">
<part name="parameters" element="tns:sayHello"/>
</message>
<message name="sayHelloResponse">
<part name="parameters" element="tns:sayHelloResponse"/>
</message>
<portType name="Hello">
<operation name="sayHello">
<input message="tns:sayHello"/>
<output message="tns:sayHelloResponse"/>
</operation>
</portType>
<binding name="HelloPortBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="sayHello">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>

wsdl is generated in a different directory and is not got included in the .war file.

I deployed the .war file in weblogic and tried to access the wsdl and i am not able to access the same(http://localhost:8001/MPS-AXIS/HelloService?wsdl).and also i am not able to run the wsimport for the same reason.

What changes i need to do inorder to access the wsdl using web browser after deploying the .war file, so that i will be able to call wsimport.
11 years ago