aspose file tools*
The moose likes Web Services and the fly likes Please Help: Can't generate wsdl and mapping file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Please Help: Can Watch "Please Help: Can New topic
Author

Please Help: Can't generate wsdl and mapping file

chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
Hi folks,

I use wscompile in ant to generate wsdl and mapping file, but doesn't work.
form print trace, I can't see any problrm. Want can i do? Please help, thank you.

Chaohua
--------------
This my ant file:

<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
<classpath>
<fileset dir="${lib}">
<include name="**/jaxrpc-impl.jar"/>
</fileset>
</classpath>
</taskdef>

<wscompile
fork="true"
keep="ture"
server="true"
base="${build}"
classpath="${build}"
cp="${build}"
features="documentliteral"
mapping="jaxrpc-mapping.xml"
sourceBase="${wsdl}"
nonClassDir="${wsdl}"
debug="true"
verbose="true"
xPrintStackTrace="true"
version="true"
config="${src.conf}/webservice/config.xml">
<classpath>
<fileset dir="${lib}">
<include name="**/jaxrpc-impl.jar"/>
<include name="**/jaxrpc-spi.jar"/>
<include name="**/saaj-api.jar"/>
<include name="**/jaxrpc-api.jar"/>
</fileset>

</classpath>

</wscompile>


--------------

this is print trace:

wscompile] command line: wscompile "C:\Program Files\Java\jre1.5.0_01\bin\java.exe" -classpath D:\PDSStudio\build\include\lib\jaxrpc-api.jar;D:\PDSStudio\build\include\lib\jaxrpc-impl.jar;D:\PDSStudio\build\include\lib\jaxrpc-spi.jar;D:\PDSStudio\build\include\lib\saaj-api.jar;D:\PDSStudio\build\war\target\build com.sun.xml.rpc.tools.wscompile.Main -d D:\PDSStudio\build\war\target\build -features ocumentliteral -g -gen:server -keep -mapping D:\PDSStudio\build\war\jaxrpc-map
ping.xml -nd D:\PDSStudio\build\war\main\conf\webservice\wsdl -s D:\PDSStudio\build\war\main\conf\webservice\wsdl -verbo
se -version -Xprintstacktrace D:\PDSStudio\build\war\main\conf\webservice\config22.xml
[wscompile] JAX-RPC Standard Implementation (1.1.3, build R1)

dist:

BUILD SUCCESSFUL
Total time: 2 seconds
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41838
    
  63
Please be more specific than saying "it doesn't work". Are there error messages or a stack trace? If so, post them here so we can take a look.


Ping & DNS - my free Android networking tools app
chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
Hello Ulf,

Thank you.

There is no error message. it can not generate jaxrpc-mapping.xml file, and wsdl files, and hava class codes.

my web services interfce and impl is like this

package project1.outputprocess.webservice.server;

import java.rmi.Remote;
import java.rmi.RemoteException;


public interface DataObjectIF extends Remote
{
public void setCommandKey(Integer aKey)throws RemoteException;
public Integer getCommandKey() throws RemoteException;


}

package project1.outputprocess.webservice.server;

public class DataObject implements java.io.Serializable, DataObjectIF
{
private Integer commandKey;

public DataObject(){}
public void setCommandKey( Integer aKey) )throws RemoteException;
{
commandKey = aKey;
}

public Integer getCommandKey())throws RemoteException;
{
return commandKey;
}

}

I went to build, there is DataObject and DataObjectIF class file.

I used wscompile.sh, it could generate jaxrpc-mapping.xml file, and wsdl files, and somce class codes.
this is uisng wscompile.sh
-----
wscompile -d D:\PDSStudio\build\war\ -features:rpcliteral -g -gen:server -mapping D:\PDSStudio\build\war\main\conf\webservice\jaxrpc-mapping.xml -nd D:\PDSStudio\build\war\main\conf\webservice\wsdl D:\PDSStudio\build\war\main\conf\webservice\config.xml -classpath D:\PDSStudio\build\war\target\build

-------------

But I used com.sun.xml.rpc.tools.ant.Wscompile and put in ANT, it can not.
There is no error in formation.

I print debug info. looks like there is nothing worng.

[wscompile] command line: wscompile "C:\Program Files\Java\jre1.5.0_01\bin\java.exe" -classpath D:\PDSStudio\build\inclu
de\lib\jaxrpc-api.jar;D:\PDSStudio\build\include\lib\jaxrpc-impl.jar;D:\PDSStudio\build\include\lib\jaxrpc-spi.jar;D:\PDSStudio\build\include\lib\saaj-api.jar;D:\PDSStudio\build\war\target\build com.sun.xml.rpc.tools.wscompile.Main -d D:\PDSStudio\build\war\target\build -features ocumentliteral -g -gen:server -keep -mapping D:\PDSStudio\build\war\jaxrpc-map
ping.xml -nd D:\PDSStudio\build\war\main\conf\webservice\wsdl -s D:\PDSStudio\build\war\main\conf\webservice\wsdl -verbo
se -version -Xprintstacktrace D:\PDSStudio\build\war\main\conf\webservice\config.xml
[wscompile] JAX-RPC Standard Implementation (1.1.3, build R1)

Please let me know if you need addtional info. Thank you.

Chaohua
chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
This ant build result, build successfully. but no files (wsdl and mapping) are generated.

----------------------
D:\PDSStudio\build\war>ant
Buildfile: build.xml

compile:

dist-war:
[wscompile] command line: wscompile "C:\Program Files\Java\jre1.5.0_01\bin\java.exe" -classpath D:\PDSStudio\build\include\lib\jaxrpc-api.jar;D:\PDSStudio\build\include\lib\jaxrpc-impl.jar;D:\PDSStudio\build\include\lib\jaxrpc-spi.jar;D:\PD
SStudio\build\include\lib\saaj-api.jar;D:\PDSStudio\build\war\target\build com.sun.xml.rpc.tools.wscompile.Main -d D:\PDSStudio\build\war\target\build -features ocumentliteral -g -gen:server -keep -mapping D:\PDSStudio\build\war\jaxrpc-mapping.xml -nd D:\PDSStudio\build\war\main\conf\webservice\wsdl -s D:\PDSStudio\build\war\main\conf\webservice\wsdl -verbo
se -version -Xprintstacktrace D:\PDSStudio\build\war\main\conf\webservice\config.xml
[wscompile] JAX-RPC Standard Implementation (1.1.3, build R1)

dist:

BUILD SUCCESSFUL
Total time: 2 seconds
D:\PDSStudio\build\war>ant
---------------------------------
This is config.xml file.


<?xml version="1.0" encoding="UTF-8"?>

<!--
wscompile -cp ../../../../../output/classes -gen:server -f:rpcliteral -mapping jaxrpc-mapping.xml config.xml
-->

<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">

<service name="DataObjectProcessService"
targetNamespace="http://project1.outputprocess.webservice/server"
typeNamespace="http://project1.outputprocess.webservice/server/types"
packageName="project1.outputprocess.webservice.server">
<interface name="project1.outputprocess.webservice.server.DataObjectIF"/>
</service>

</configuration>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please Help: Can't generate wsdl and mapping file