Hello All.

I am getting a
java.lang.reflect.InvocationTargetException exception
while trying to deploy a simple service using the
following command:
java org.apache.axis.client.AdminClient -d deploy.wsdd

This is what I did:
1. Created a WSDL (FirstService.wsdl attached).
2. Generated Java classes/stubs/skeletons from it
using the following command:

java org.apache.axis.wsdl.WSDL2Java \
    -o .                            \
    -s                              \
    -S true                         \
    -Nurn:test                      \
    generated                       \
    FirstService.wsdl

Classes are generated in a directory called
"generated"
List of generated classes:
    src/generated/FirstBindingImpl.java
    src/generated/FirstBindingSkeleton.java
    src/generated/FirstBindingStub.java
    src/generated/FirstPort.java
    src/generated/FirstService.java
    src/generated/FirstServiceLocator.java
    src/generated/Pair.java
    src/generated/deploy.wsdd
    src/generated/undeploy.wsdd


3. Compiled the classes using "javac *.java" command. 
Compilation was successful.

4. Changed to src/generated and tried the following
command:
java org.apache.axis.client.AdminClient -d deploy.wsdd

As a result of this command, I got a sinle line error:
Exception::
java.lang.reflect.InvocationTargetException

I modified the AdminClient.java to print the stack
trace and the attached file (stack-trace.txt) lists
the trace.  Also attached is the typescript for your
reference.

I tried removing the <complexType> from the WSDL and
using xsd:string instead in the message part instead
of gen:Pair.  That worked fine.  I think my classpath
settings are okay and only when I use a complexType
with a custom namespace, I am seeing this problem.  I
could not gather much details from the stack trace. 
May be one of you can!  Is there something wrong in my
WSDL or something wrong in the way I am using
wsdl2java?

TUIA,
Kartik

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:

java.lang.reflect.InvocationTargetException
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015
)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:1672)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:272)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:243)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:252)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:189)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:289)


java.lang.reflect.InvocationTargetException
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015
)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:1672)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:272)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:243)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:252)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:189)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:289)
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 	targetNamespace="urn:test" 
					xmlns="http://schemas.xmlsoap.org/wsdl/"; 
					xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
					xmlns:impl="urn:test" 
					xmlns:intf="urn:test" 
					xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
					xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
					xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
					xmlns:xsd="http://www.w3.org/2001/XMLSchema";
					xmlns:gen="generated"
>
	<types>
		<schema targetNamespace="generated" 
				xmlns="http://www.w3.org/2001/XMLSchema";
				xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
		>
			<complexType name="Pair">
				<all>
					<element name="key" type="xsd:int"/>
					<element name="value" type="xsd:string"/>
				</all>
			</complexType>
		</schema>
	</types>

	<wsdl:message name="getPairAsStringRequest" />

	<wsdl:message name="getPairRequest" />

	<wsdl:message name="getPairAsStringResponse">
		<wsdl:part name="getPairAsStringReturn" type="xsd:string"/>
	</wsdl:message>

	<wsdl:message name="getPairResponse">
		<wsdl:part name="getPairReturn" type="gen:Pair"/>
	</wsdl:message>

	<wsdl:portType name="FirstPort">
	
		<wsdl:operation name="getPairAsString">
			<wsdl:input message="impl:getPairAsStringRequest" name="getPairAsStringRequest"/>
			<wsdl:output message="impl:getPairAsStringResponse" name="getPairAsStringResponse"/>
		</wsdl:operation>

		<wsdl:operation name="getPair">
			<wsdl:input message="impl:getPairRequest" name="getPairRequest"/>
			<wsdl:output message="impl:getPairResponse" name="getPairResponse"/>
		</wsdl:operation>

	</wsdl:portType>

	<wsdl:binding name="FirstBinding" type="impl:FirstPort">
	
		<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		
		<wsdl:operation name="getPairAsString">
			<wsdlsoap:operation soapAction=""/>
			
			<wsdl:input name="getPairAsStringRequest">
				<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" use="encoded"/>
			</wsdl:input>
			
			<wsdl:output name="getPairAsStringResponse">
				<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" use="encoded"/>
			</wsdl:output>
		</wsdl:operation>

		<wsdl:operation name="getPair">
			<wsdlsoap:operation soapAction=""/>
			
			<wsdl:input name="getPairRequest">
				<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" use="encoded"/>
			</wsdl:input>
			
			<wsdl:output name="getPairResponse">
				<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:test" use="encoded"/>
			</wsdl:output>
		</wsdl:operation>

	</wsdl:binding>

	<wsdl:service name="FirstService">
		<wsdl:port binding="impl:FirstBinding" name="FirstPort">
			<wsdlsoap:address location="http://localhost:8080/axis/services/FirstService"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>
< O:\axis11\projects\src >  dir *.wsdl
 Volume in drive O is JPlusPlus
 Volume Serial Number is 90C2-0B28

 Directory of O:\axis11\projects\src

08-04-2003  11:58a               3,031 FirstService.wsdl
               1 File(s)          3,031 bytes
               0 Dir(s)  28,895,240,192 bytes free

< O:\axis11\projects\src >  java org.apache.axis.wsdl.WSDL2Java -o . -s -S true  
-Nurn:test generated FirstService.wsdl

< O:\axis11\projects\src >  cd generated

< O:\axis11\projects\src\generated >  dir
 Volume in drive O is JPlusPlus
 Volume Serial Number is 90C2-0B28

 Directory of O:\axis11\projects\src\generated

08-04-2003  12:12p      <DIR>          .
08-04-2003  12:12p      <DIR>          ..
08-04-2003  12:12p               1,517 deploy.wsdd
08-04-2003  12:12p                 429 FirstBindingImpl.java
08-04-2003  12:12p               2,979 FirstBindingSkeleton.java
08-04-2003  12:12p               8,562 FirstBindingStub.java
08-04-2003  12:12p                 349 FirstPort.java
08-04-2003  12:12p                 463 FirstService.java
08-04-2003  12:12p               3,849 FirstServiceLocator.java
08-04-2003  12:12p               3,591 Pair.java
08-04-2003  12:12p                 679 undeploy.wsdd
               9 File(s)         22,418 bytes
               2 Dir(s)  28,895,203,328 bytes free

< O:\axis11\projects\src\generated >  javac *.java

< O:\axis11\projects\src\generated >  java org.apache.axis.client.AdminClient -d 
deploy.wsdd
Processing file deploy.wsdd
Exception:: java.lang.reflect.InvocationTargetException
stack trace:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:

java.lang.reflect.InvocationTargetException
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:1672)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:272)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:243)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:252)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:189)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:289)


java.lang.reflect.InvocationTargetException
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:1672)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:272)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:243)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:252)
        at org.apache.axis.client.AdminClient.process(AdminClient.java:189)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:289)

Reply via email to