Axis2 Web Services and Eclipse WSDL authoring: Adding an axis fault to wsdl causes exception when running wsdl2java
By : max
Date : March 29 2020, 07:55 AM
I wish this help you I think I have now solved this myself. It seems that for some reason the eclipse WSDL-editor did not add the fault to the binding part of the WSDL. So when I added: code :
<wsdl:fault name="fault">
<soap:fault use="literal" name="fault" />
</wsdl:fault>
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/JavaIntegrationModule/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="JavaIntegrationModule" targetNamespace="http://www.example.org/JavaIntegrationModule/">
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/JavaIntegrationModule/">
<xsd:element name="getSolutionById">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getSolutionByIdResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getSolutionByIdFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="getSolutionByIdFault"
type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getSolutionByIdRequest">
<wsdl:part element="tns:getSolutionById" name="parameters"/>
</wsdl:message>
<wsdl:message name="getSolutionByIdResponse">
<wsdl:part element="tns:getSolutionByIdResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getSolutionByIdFault">
<wsdl:part name="parameters" element="tns:getSolutionByIdFault"></wsdl:part>
</wsdl:message>
<wsdl:portType name="JavaIntegrationModule">
<wsdl:operation name="getSolutionById">
<wsdl:input message="tns:getSolutionByIdRequest"/>
<wsdl:output message="tns:getSolutionByIdResponse"/>
<wsdl:fault name="fault" message="tns:getSolutionByIdFault"></wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="JavaIntegrationModuleSOAP" type="tns:JavaIntegrationModule">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getSolutionById">
<soap:operation soapAction="http://www.example.org/JavaIntegrationModule/getSolutionById"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="fault">
<soap:fault use="literal" name="fault" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="JavaIntegrationModule">
<wsdl:port binding="tns:JavaIntegrationModuleSOAP" name="JavaIntegrationModuleSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|
Exception classes generated using Axis2 wsdl2java don't extend Exception
By : זיו אסייג
Date : March 29 2020, 07:55 AM
I wish this helpful for you I tried generating client with your 2nd wsdl using Eclipse IDE. It generated and compiled all well. That means wsdl is good to go. Generated AdminServiceException.java code :
public class AdminServiceException extends java.lang.Exception{
private static final long serialVersionUID = 1333311238212L;
private com.rsa.csd.ws.admin.UserAdminServiceServiceStub.Fault faultMessage;
public AdminServiceException() {
super("AdminServiceException");
}
public AdminServiceException(java.lang.String s) {
super(s);
}
public AdminServiceException(java.lang.String s, java.lang.Throwable ex) {
super(s, ex);
}
public AdminServiceException(java.lang.Throwable cause) {
super(cause);
}
public void setFaultMessage(com.rsa.csd.ws.admin.UserAdminServiceServiceStub.Fault msg){
faultMessage = msg;
}
public com.rsa.csd.ws.admin.UserAdminServiceServiceStub.Fault getFaultMessage(){
return faultMessage;
}
}
|
Eclipse Axis2 WSDL2Java Exception: null
By : Singh Baljeet
Date : March 29 2020, 07:55 AM
wish of those help The only Workarround I found for this, goes as follows: Create a new DynamicWebProject Create a new WSDL (You can copy you old one or what ever you like) Create a new Java Bean Skelleton (or Client)
|
Ant wsdl2java to Maven wsdl2java convertion
By : ICARE SOLUTION
Date : March 29 2020, 07:55 AM
it should still fix some issue I couldn't find a solution using cxf-codegen-plugin, but have resolved it now using: code :
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>target/generated/src/main/java</sourceRoot>
<tasks>
<taskdef resource="axis-tasks.properties" classpathref="maven.compile.classpath" />
<mkdir dir="target/generated/src/main/java" />
<axis-wsdl2java output="target/generated/src/main/java" testcase="false"
verbose="false"
url="ws/TestServiceLookupWSDL_TestServiceLookupV1Http_Service.wsdl">
<mapping namespace="namespace.1"
package="package.1" />
<mapping namespace="namespace.2"
package="package.2" />
</axis-wsdl2java>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
|
WSDL2Java Throws Could not find main class: org.apache.axis.wsdl.WSDL2Java
By : Retro732
Date : March 29 2020, 07:55 AM
I wish did fix the issue. Add the jars to the classpath individually if you're using a Java version before 6. If you're using Java 6, see here if you want to use wildcards.
|