aspose file tools*
The moose likes Web Services and the fly likes Compiling stubs fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Compiling stubs fails" Watch "Compiling stubs fails" New topic
Author

Compiling stubs fails

Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 270
Hi.

I really hope you can help me as I am struggling to make a new SOAP client in Java.

1) First I created stubs and proxy classes from the WSDL:
http://vans.sdn.dk/einvoice/ws/ver1/CSCVANSTransferWStest/TransferService.wsdl

I seems to go well. It created a package called "/org/.." which includes the files:

***

org\datacontract\schemas\_2004\_07\Csc_WebEdi_Vans_Transfer_WebService\DocInfoType.java
org\datacontract\schemas\_2004\_07\Csc_WebEdi_Vans_Transfer_WebService\DocumentsType.java

****

org\tempuri\BasicHttpBinding_ITransferService1Stub.java
org\tempuri\BasicHttpBinding_ITransferServiceStub.java
org\tempuri\ITransferService.java
org\tempuri\TransferService.java
org\tempuri\TransferServiceLocator.java

***

When compiling the above Java classes in "org\tempuri\" I get some errors. It says that files in the package "org.datacontract.schem
s._2004._07.Csc_WebEdi_Vans_Transfer_WebService" does not exist???

How is that?

***

Here is how I did compile the files:

2) I compile the classes in:
"org\datacontract\schemas\_2004\_07\Csc_WebEdi_Vans_Transfer_WebService\".

- It seems to work fine with the command:

C:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\W
EB-INF\classes\org\datacontract\schemas\_2004\_07\Csc_WebEdi_Vans_Transfer_WebSe
rvice>javac -classpath C:\Users\cp\Dokumenter\programmer\resin-3.1.1
0\webapps\myApp\WEB-INF\lib\axis.jar;C:\Users\cp\Dokumenter\pr
ogrammer\resin-3.1.10\webapps\myApp\WEB-INF\lib\commons-logging-1.1.1.jar;
C:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\W
EB-INF\lib\commons-discovery-0.4.jar;C:\Users\cp\Dokumenter\programm
er\resin-3.1.10\webapps\myApp\WEB-INF\lib\jaxrpc.jar;C:\Users\Cateringport
al\Dokumenter\programmer\resin-3.1.10\webapps\myApp\WEB-INF\lib\saaj.jar;C
:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\WE
B-INF\lib\wsdl4j-1.5.1.jar;C:\Users\cp\Dokumenter\programmer\resin-3
.1.10\webapps\myApp\WEB-INF\lib\activation.jar;C:\Users\cp\Dok
umenter\programmer\resin-3.1.10\webapps\myApp\WEB-INF\lib\mail.jar. *.java

C:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\W
EB-INF\classes\org\datacontract\schemas\_2004\_07\Csc_WebEdi_Vans_Transfer_WebSe
rvice>

****

Secondly I tred to compile the stub classes in "org\tempuri\" with the command:

C:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\
EB-INF\classes\org\tempuri>javac -classpath C:\Users\cp\Dokumenter\
rogrammer\resin-3.1.10\webapps\myApp\WEB-INF\lib\axis.jar;C:\Users\Cateri
gportal\Dokumenter\programmer\resin-3.1.10\webapps\myApp\WEB-INF\lib\comm
ns-logging-1.1.1.jar;C:\Users\cp\Dokumenter\programmer\resin-3.1.10
webapps\myApp\WEB-INF\lib\commons-discovery-0.4.jar;C:\Users\Cateringport
l\Dokumenter\programmer\resin-3.1.10\webapps\myApp\WEB-INF\lib\jaxrpc.jar
C:\Users\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\
EB-INF\lib\saaj.jar;C:\Users\cp\Dokumenter\programmer\resin-3.1.10\
ebapps\myApp\WEB-INF\lib\wsdl4j-1.5.1.jar;C:\Users\cp\Dokumen
er\programmer\resin-3.1.10\webapps\myApp\WEB-INF\lib\activation.jar;C:\Us
rs\cp\Dokumenter\programmer\resin-3.1.10\webapps\myApp\WEB-IN
\lib\mail.jar. *.java

ERRORS:

This is the error I get:

BasicHttpBinding_ITransferService1Stub.java:456: package org.datacontract.schem
s._2004._07.Csc_WebEdi_Vans_Transfer_WebService does not exist
public org.datacontract.schemas._2004._07.Csc_WebEdi_Vans_Transfer_WebServi
e.DocumentsType findDocuments(java.lang.String authType, java.lang.String authI
, java.lang.String clientVersion, java.lang.String messageType, java.lang.Strin
format, java.lang.String formatType, java.lang.String version, java.lang.Strin
extension) throws java.rmi.RemoteException {

^
ITransferService.java:14: package org.datacontract.schemas._2004._07.Csc_WebEdi
Vans_Transfer_WebService does not exist
public org.datacontract.schemas._2004._07.Csc_WebEdi_Vans_Transfer_WebServi
e.DocumentsType findDocuments(java.lang.String authType, java.lang.String authI
, java.lang.String clientVersion, java.lang.String messageType, java.lang.Strin
format, java.lang.String formatType, java.lang.String version, java.lang.Strin
extension) throws java.rmi.RemoteException;

^
BasicHttpBinding_ITransferServiceStub.java:456: package org.datacontract.schema
._2004._07.Csc_WebEdi_Vans_Transfer_WebService does not exist
public org.datacontract.schemas._2004._07.Csc_WebEdi_Vans_Transfer_WebServi
e.DocumentsType findDocuments(java.lang.String authType, java.lang.String authI
, java.lang.String clientVersion, java.lang.String messageType, java.lang.Strin
format, java.lang.String formatType, java.lang.String version, java.lang.Strin
extension) throws java.rmi.RemoteException {

^
BasicHttpBinding_ITransferService1Stub.java:179: package org.datacontract.schem
s._2004._07.Csc_WebEdi_Vans_Transfer_WebService does not exist
oper.setReturnClass(org.datacontract.schemas._2004._07.Csc_WebEdi_Vans_
ransfer_WebService.DocumentsType.class);

Totally 17 errors...
....
....


Any idea what could be wrong?
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

...
BasicHttpBinding_ITransferService1Stub.java:456: package org.datacontract.schem
s._2004._07.Csc_WebEdi_Vans_Transfer_WebService does not exist ...


Where are these classes are located. Perhaps your previous compile? Then add another entry to the classpath switch to point to that top level directory which contains them.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you seen this tutorial on how to create a JAX-WS client to a web service?
http://netbeans.org/kb/docs/websvc/client.html
All you need is in the Java SE JDK, provided that you are using version 6 or later.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
wood burning stoves
 
subject: Compiling stubs fails