I had generated the java code using
C:\jwsdp-1.4\jaxrpc\bin\wscompile.bat -gen:client config.xml -keep
Config.xml is as follows
The stack trace is as follows
Does any of you guys have seen such an exception before?
When i went into the file
This is a class file which was autogenerated, I have not coded anything in it.
What could be the reason of this exception? Any clues.
Could you post a listing of WSDL file? Is it against the 1.1 standard?
If you have eclipse, you may be interested in this:
wscompile.bat -gen:client config.xml -keep
wscompile.bat -gen:client config.xml -keep -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.MessageFactoryImpl
You may need to ensure that MessageFactoryImpl is on your classpath.
I found more info on your exception here
C:\dummy>C:\jwsdp-1.4\jaxrpc\bin\wscompile.bat -gen:client config.xml -keep -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.MessageFactoryImpl
error: -Djavax.xml.soap.MessageFactory is an invalid option or argument
Usage: wscompile [options] configuration_file
Usage: wscompile [options] configuration_file
where [options] include:
-classpath <path> specify where to find input class files
-cp <path> same as -classpath <path>
-d <directory> specify where to place generated output files
-define define a service
-f:<features> enable the given features (see below)
-features:<features> same as -f:<features>
-g generate debugging info
-gen same as -gen:client
-gen:client generate client artifacts (stubs, etc.)
-gen:server generate server artifacts (ties, etc.)
-help display help
-source <version> generate code for the specified JAXRPC SI version.
supported versions are: 1.0.1, 1.0.3, 1.1, 1.1.1 and
-httpproxy:<host>:<port> specify a HTTP proxy server (port defaults to 8080)
-import generate interfaces and value types only
-keep keep generated files
-model <file> write the internal model to the given file
-nd <directory> specify where to place non-class generated files
-O optimize generated code
-s <directory> specify where to place generated source files
-verbose output messages about what the compiler is doing
-version print version information
-mapping <file> write the 109 mapping file to the given file
[failed to localize] sec.usage.options
Exactly one of the -import, -define, -gen options must be specified.
The -f option requires a comma-separated list of features.
Supported features (-f):
datahandleronly always map attachments to the DataHandler type
documentliteral use document literal encoding
rpcliteral use rpc literal encoding
explicitcontext turn on explicit service context mapping
infix:<name> specify an infix to use for generated ties
infix=<name> same as infix:<name> (not on Windows)
jaxbenumtype map anonymous enumeration to its base type.
nodatabinding turn off data binding for literal encoding
noencodedtypes turn off encoding type information
nomultirefs turn off support for multiple references
norpcstructures do not generate RPC structures (-import only)
novalidation turn off full validation of imported WSDL documents
resolveidref resolve xsd:IDREF
searchschema search schema aggressively for subtypes
serializeinterfaces turn on direct serialization of interface types
strict generate code strictly compliant with the JAXRPC
useonewayoperations allow generation of one-way operations
wsi enable WSI-Basic Profile features (for
document/literal and rpc/literal)
unwrap enable unWrapping of document/literal
wrapper elements in wsi mode
donotoverride donot regenerate the classes
donotunwrap disable unWrapping of document/literal
wrapper elements in wsi mode (Default)
Internal options (unsupported):
-Xdebugmodel:<file> write a readable version of the model to a file
-Xprintstacktrace print exception stack traces
-Xserializable generate value types that implement Serializable int
wscompile -gen -classpath lib/foo.jar;lib/bar.jar -d generated config.xml
wscompile -gen -f:infix:Name -d generated config.xml
wscompile -define -f:nodatabinding -f:novalidation config.xml
wscompile -import -f:explicitcontext config.xml
And I wrote a client that invokes the method of that web service, it is able to invoke the method.
But, When I try to invoke the same web service method from JDeveloper, it is giving me the exception.
There are few differences in the environment.
1) The java version that is being used by Netbeans is 1.6
2) The classes that are generated by NetBeans for client are different than those which are generated by wscompile.
3) The classes generated by Netbeans has annotations, while the one generated by wscompile has not.
The code generated by Netbeans is of version:
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-hudson-752-
* Generated source version: 2.2
The code generated by wscompile is of version:
// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.2, build R23)
// Generated source version: 1.1.2
The restriction with me is that I have to stick to 1.4, as the production environment has jvm 1.4