You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Xinjun Chen <xj...@gmail.com> on 2006/04/10 04:00:27 UTC
[Axis2 0.95] WSDL2Java problem
I have created a secure service named by SecureService2 by modifying
the sample.security.Service in the samples distributed with Axis2
0.95.
I have tested the SecureService2 and its client. It works fine. Then I
am trying to generate the WSDL for SecureService2 by appending ?WSDL
to the service URL. I use the generated WSDL to generate the service
and stub using WSDL2Java.
WSDL2Java runs with no exception and also a build.xml is generated.
Then, I run "ant" to build the generated service. Then I get the
following build errors.
It seems that WSDL2Java did not really generate the
SecureService2PortStub. In fact I cannot find any stub classes from
the generated code.
What should I do to solve this problem?
Regards,
Xinjun
########### Build errors ################
echo.classpath.problem:
jar.server:
[copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
ity\wsdl\build\classes\META-INF
[copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
ity\wsdl\build\classes\lib
[jar] Building jar: F:\download\axis2\axis2-std-0.95-bin\samples\security\
wsdl\build\lib\SecureService2.aar
compile.test:
[javac] Compiling 1 source file to F:\download\axis2\axis2-std-0.95-bin\samp
les\security\wsdl\build\classes
[javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
le2\security\SecureService2PortTest.java:57: cannot resolve symbol
[javac] symbol : class SecureService2PortCallbackHandler
[javac] location: package security
[javac] private class tempCallbackN1000B extends sample2.security.S
ecureService2PortCallbackHandler{
[javac] ^
[javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
le2\security\SecureService2PortTest.java:23: cannot resolve symbol
[javac] symbol : class SecureService2PortStub
[javac] location: package security
[javac] sample2.security.SecureService2PortStub stub =
[javac] ^
[javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
le2\security\SecureService2PortTest.java:24: cannot resolve symbol
[javac] symbol : class SecureService2PortStub
[javac] location: package security
[javac] new sample2.security.SecureService2PortStub();//
the default implementation should point to the right endpoint
[javac] ^
[javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
le2\security\SecureService2PortTest.java:42: cannot resolve symbol
[javac] symbol : class SecureService2PortStub
[javac] location: package security
[javac] sample2.security.SecureService2PortStub stub = new sampl
e2.security.SecureService2PortStub();
[javac] ^
[javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
le2\security\SecureService2PortTest.java:42: cannot resolve symbol
[javac] symbol : class SecureService2PortStub
[javac] location: package security
[javac] sample2.security.SecureService2PortStub stub = new sampl
e2.security.SecureService2PortStub();
[javac]
^
[javac] 5 errors
BUILD FAILED
F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\build.xml:56: Compile
failed; see the compiler error output for details.
Total time: 25 seconds
Re: [Axis2 0.95] WSDL2Java problem
Posted by Xinjun Chen <xj...@gmail.com>.
By the way, when I use WSDL2Java in Axis2, I cannot find a way to
specify the namespace to package mapping. -p seems can only specify
one package name for the target namespace. In Axis2, how can I specify
namespace to package mapping in a file?
Regards,
Xinjun
On 4/10/06, Xinjun Chen <xj...@gmail.com> wrote:
> I have created a secure service named by SecureService2 by modifying
> the sample.security.Service in the samples distributed with Axis2
> 0.95.
>
> I have tested the SecureService2 and its client. It works fine. Then I
> am trying to generate the WSDL for SecureService2 by appending ?WSDL
> to the service URL. I use the generated WSDL to generate the service
> and stub using WSDL2Java.
> WSDL2Java runs with no exception and also a build.xml is generated.
> Then, I run "ant" to build the generated service. Then I get the
> following build errors.
>
> It seems that WSDL2Java did not really generate the
> SecureService2PortStub. In fact I cannot find any stub classes from
> the generated code.
>
> What should I do to solve this problem?
>
>
> Regards,
> Xinjun
>
> ########### Build errors ################
>
> echo.classpath.problem:
>
> jar.server:
> [copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
> ity\wsdl\build\classes\META-INF
> [copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
> ity\wsdl\build\classes\lib
> [jar] Building jar: F:\download\axis2\axis2-std-0.95-bin\samples\security\
> wsdl\build\lib\SecureService2.aar
>
> compile.test:
> [javac] Compiling 1 source file to F:\download\axis2\axis2-std-0.95-bin\samp
> les\security\wsdl\build\classes
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:57: cannot resolve symbol
> [javac] symbol : class SecureService2PortCallbackHandler
> [javac] location: package security
> [javac] private class tempCallbackN1000B extends sample2.security.S
> ecureService2PortCallbackHandler{
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:23: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub =
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:24: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] new sample2.security.SecureService2PortStub();//
> the default implementation should point to the right endpoint
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:42: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub = new sampl
> e2.security.SecureService2PortStub();
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:42: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub = new sampl
> e2.security.SecureService2PortStub();
> [javac]
> ^
> [javac] 5 errors
>
> BUILD FAILED
> F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\build.xml:56: Compile
> failed; see the compiler error output for details.
>
> Total time: 25 seconds
>
Re: [Axis2 0.95] WSDL2Java problem
Posted by Xinjun Chen <xj...@gmail.com>.
I turns out that I didn't turn on -g option when using WSDL2Java command.
But I still don't know how to specify mutiple namespace to package mapping.
I tried both options "-p http\://org.apache.axis2/=sample2.security
http\://org.apache.axis2/xsd=sample2.security" and "-p
http\://org.apache.axis2/=sample2.security -p
http\://org.apache.axis2/xsd=sample2.security" but failed.
Regards,
Xinjun
On 4/10/06, Xinjun Chen <xj...@gmail.com> wrote:
> I have created a secure service named by SecureService2 by modifying
> the sample.security.Service in the samples distributed with Axis2
> 0.95.
>
> I have tested the SecureService2 and its client. It works fine. Then I
> am trying to generate the WSDL for SecureService2 by appending ?WSDL
> to the service URL. I use the generated WSDL to generate the service
> and stub using WSDL2Java.
> WSDL2Java runs with no exception and also a build.xml is generated.
> Then, I run "ant" to build the generated service. Then I get the
> following build errors.
>
> It seems that WSDL2Java did not really generate the
> SecureService2PortStub. In fact I cannot find any stub classes from
> the generated code.
>
> What should I do to solve this problem?
>
>
> Regards,
> Xinjun
>
> ########### Build errors ################
>
> echo.classpath.problem:
>
> jar.server:
> [copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
> ity\wsdl\build\classes\META-INF
> [copy] Copying 1 file to F:\download\axis2\axis2-std-0.95-bin\samples\secur
> ity\wsdl\build\classes\lib
> [jar] Building jar: F:\download\axis2\axis2-std-0.95-bin\samples\security\
> wsdl\build\lib\SecureService2.aar
>
> compile.test:
> [javac] Compiling 1 source file to F:\download\axis2\axis2-std-0.95-bin\samp
> les\security\wsdl\build\classes
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:57: cannot resolve symbol
> [javac] symbol : class SecureService2PortCallbackHandler
> [javac] location: package security
> [javac] private class tempCallbackN1000B extends sample2.security.S
> ecureService2PortCallbackHandler{
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:23: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub =
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:24: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] new sample2.security.SecureService2PortStub();//
> the default implementation should point to the right endpoint
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:42: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub = new sampl
> e2.security.SecureService2PortStub();
> [javac] ^
> [javac] F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\test\samp
> le2\security\SecureService2PortTest.java:42: cannot resolve symbol
> [javac] symbol : class SecureService2PortStub
> [javac] location: package security
> [javac] sample2.security.SecureService2PortStub stub = new sampl
> e2.security.SecureService2PortStub();
> [javac]
> ^
> [javac] 5 errors
>
> BUILD FAILED
> F:\download\axis2\axis2-std-0.95-bin\samples\security\wsdl\build.xml:56: Compile
> failed; see the compiler error output for details.
>
> Total time: 25 seconds
>