Reputation: 1902
I'm getting this error when testing my web service created by exlipse using Axis 1.4
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.reflect.InvocationTargetException</faultstring>
- <detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">ahernandez-PC</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The file in which the error is present (I believe so atleast) is this one:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://cancelaciones.vital" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://cancelaciones.vital" xmlns:intf="http://cancelaciones.vital" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://cancelaciones.vital" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="sellado">
<complexType>
<sequence>
<element name="llave" type="xsd:string"/>
<element name="certificado" type="xsd:string"/>
<element name="xmlString" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="selladoResponse">
<complexType>
<sequence>
<element name="selladoReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="selladoRequest">
<wsdl:part element="impl:sellado" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="selladoResponse">
<wsdl:part element="impl:selladoResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="Cancelacion">
<wsdl:operation name="sellado">
<wsdl:input message="impl:selladoRequest" name="selladoRequest">
</wsdl:input>
<wsdl:output message="impl:selladoResponse" name="selladoResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CancelacionSoapBinding" type="impl:Cancelacion">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sellado">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="selladoRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="selladoResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CancelacionService">
<wsdl:port binding="impl:CancelacionSoapBinding" name="Cancelacion">
<wsdlsoap:address location="http://localhost:8080/CancelacionesWS/services/Cancelacion"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
web.xml file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>CanelacionesWeb</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<display-name>Apache-Axis Servlet</display-name>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet>
<display-name>Axis Admin Servlet</display-name>
<servlet-name>AdminServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AdminServlet</servlet-name>
<url-pattern>/servlet/AdminServlet</url-pattern>
</servlet-mapping>
</web-app>
Upvotes: 0
Views: 6746
Reputation: 61
It may be the exception cause due to missing configurations in web.xml file. At first, WSDL searches for the config in web.xml and the .wsdl file you generated as SOAP service. if it mismatches InvocationTargetException might be thrown.
Upvotes: 0
Reputation: 7589
Looks pretty much like you have a WSDL file that allows you to know the operations but the actual server where you should have your services is down. Check that the services are available
Upvotes: 1