Creating Axis 1 Project Steps: - Yash-777/Axis1x_Soap GitHub Wiki

A WSDL document describes a web service. A WSDL binding describes how the service is bound to a messaging protocol, particularly the SOAP messaging protocol. A WSDL SOAP binding can be either a Remote Procedure Call (RPC) style binding or a document style binding. A SOAP binding can also have an encoded use or a literal use. This gives you four style/use models:

  • RPC/encoded
  • RPC/literal
  • Document/encoded
  • Document/literal
package com.github.yash777;
public interface HelloWorld {
    String getHelloWorldAsString(String name);
    String getSampleText();
}
public class HelloWorldImpl implements HelloWorld {
    @Override
    public String getHelloWorldAsString(String name) {
        return "Hello World JAX-WS " + name;
    }

    @Override
    public String getSampleText() {
        return "Hello World JAX-WS  YYYY";
    }
}

http://localhost:8080/Axis1x_Soap/services/HelloWorld?wsdl

Need to write post: https://stackoverflow.com/questions/33737782/axis-error-fault-failed-to-determine-deployed-service-names-nested-excepti

-- Generates C:\Yash\Axis1x_Soap\HelloWorld.wsdl file
C:\Yash\Axis1x_Soap>java -cp "C:/Yash/WebServices/axis-1_4/lib/*";"C:/Yash/Axis1x_Soap/build/classes/" 
   org.apache.axis.wsdl.Java2WSDL -o HelloWorld.wsdl -n urn:com.yash777.HelloWorld 
   -l http://localhost:8080/Axis1x_Soap/services/HelloWorld com.github.yash777.HelloWorld

-- Generates ServerClasses and deploy.wsdd,undeploy.wsdd
C:\Yash\Axis1x_Soap>java -cp "C:/Yash/WebServices/axis-1_4/lib/*" org.apache.axis.wsdl.WSDL2Java -o src 
   -p com.github.yash777 -s HelloWorld.wsdl

-- Register web service with axis
-- Generates C:\Yash\Axis1x_Soap\server-config.wsdd
C:\Yash\Axis1x_Soap>java -cp "C:/Yash/WebServices/axis-1_4/lib/*" org.apache.axis.utils.Admin 
   server src/com/github/yash777/deploy.wsdd
<?xml version="1.0" encoding="UTF-8"?>
<Admin>Done processing</Admin>

RPC/encoded Followed digizol link...

server-config.wsdd - default generated with following elements
<service name="HelloWorld" provider="java:RPC">
  <parameter name="className" value="com.github.yash777.HelloWorldSoapBindingImpl"/>
org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.xml.sax.SAXException: 
Fatal Error: URI=null Line=42: The content of elements must consist of well-formed character data or markup.

server-config.wsdd: Line=42
<<parameter name="className" value="com.github.yash777.HelloWorldSoapBindingImpl"/>
https://stackoverflow.com/a/59197738/5081877

Here we need to use generated server implementation classes, other wise we will the following error.

AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
	org.apache.axis.ConfigurationException: Could not find class for the service named: com.github.yash777.HelloWorldSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).; nested exception is: 
	java.lang.ClassNotFoundException: com.github.yash777.HelloWorldSoapBindingImpl
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode: 
 faultString: Could not find class for the service named: com.github.yash777.HelloWorldSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).; nested exception is: 
	java.lang.ClassNotFoundException: com.github.yash777.HelloWorldSoapBindingImpl
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}hostname:neondevappsr001

Could not find class for the service named: com.github.yash777.HelloWorldSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).; nested exception is: 
	java.lang.ClassNotFoundException: com.github.yash777.HelloWorldSoapBindingImpl
	at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:432)
	at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
	at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)

Document/literal wrapped Server apache-tomcat-8.0.32

If you dont want to use Server implementation classes change the file server-config.wsdd to style="wrapped" use="literal", className=com.github.yash777.HelloWorld

Axis1x_Soap
 - WebContent
    - WEB_INT - server-config.wsdd [Generated WSDD file]
    - wsdl - HelloWorld.wsdl [Generated WSDL File]

server-config.wsdd - [Change the following]
<!-- <service name="HelloWorld" provider="java:RPC"> -->
<service name="HelloWorld" provider="java:RPC" style="wrapped" use="literal">
 
<!-- <parameter name="className" value="com.github.yash777.HelloWorldSoapBindingImpl"/>  -->
<parameter name="className" value="com.github.yash777.HelloWorld"/>


Any Way we are not using this: just for info File: deploy.wsdd

<!-- Services from HelloWorldService WSDL service -->
<!-- <service name="HelloWorld" provider="java:RPC" style="rpc" use="encoded"> -->
<service name="HelloWorld" provider="java:RPC" style="wrapped" use="literal">
  <parameter name="className" value="com.github.yash777.HelloWorld"/>
  <!-- <parameter name="className" value="com.github.yash777.HelloWorldSoapBindingImpl"/> -->

web.xml

<?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"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  id="WebApp_ID" version="3.0">
  
  <display-name>Axis1x_Soap</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>
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Axis Basic Authentication Area</realm-name>
  </login-config>
  <security-role>
    <description>The web-service-user has full access to all web services</description>
    <role-name>web-service-user</role-name>
  </security-role>
<!-- 
<mime-mapping>
  <extension>wsdl</extension>
  <mime-type>text/xml</mime-type>
</mime-mapping>
-->
</web-app>

RPC Encoded WSDL XML:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:com.yash777.HelloWorld" xmlns:intf="urn:com.yash777.HelloWorld" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:com.yash777.HelloWorld">
  <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
  <wsdl:message name="getHelloWorldAsStringResponse">
    <wsdl:part name="getHelloWorldAsStringReturn" type="soapenc:string" />
  </wsdl:message>
  <wsdl:message name="getHelloWorldAsStringRequest">
    <wsdl:part name="in0" type="soapenc:string" />
  </wsdl:message>
  <wsdl:message name="getSampleTextResponse">
    <wsdl:part name="getSampleTextReturn" type="soapenc:string" />
  </wsdl:message>
  <wsdl:message name="getSampleTextRequest" />
  <wsdl:portType name="HelloWorldSoapBindingImpl">
    <wsdl:operation name="getSampleText">
      <wsdl:input message="impl:getSampleTextRequest" name="getSampleTextRequest" />
      <wsdl:output message="impl:getSampleTextResponse" name="getSampleTextResponse" />
    </wsdl:operation>
    <wsdl:operation name="getHelloWorldAsString" parameterOrder="in0">
      <wsdl:input message="impl:getHelloWorldAsStringRequest" name="getHelloWorldAsStringRequest" />
      <wsdl:output message="impl:getHelloWorldAsStringResponse" name="getHelloWorldAsStringResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorldSoapBindingImpl">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="getSampleText">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getSampleTextRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:com.yash777.HelloWorld" use="encoded" />
      </wsdl:input>
      <wsdl:output name="getSampleTextResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:com.yash777.HelloWorld" use="encoded" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getHelloWorldAsString">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getHelloWorldAsStringRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:com.yash777.HelloWorld" use="encoded" />
      </wsdl:input>
      <wsdl:output name="getHelloWorldAsStringResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:com.yash777.HelloWorld" use="encoded" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="HelloWorldService">
    <wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld">
      <wsdlsoap:address location="http://localhost:8080/AAA/services/HelloWorld" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Document Wrapped WSDL XML:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:com.yash777.HelloWorld" xmlns:intf="urn:com.yash777.HelloWorld" xmlns:tns1="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:com.yash777.HelloWorld">
  <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
  <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:com.yash777.HelloWorld">
      <element name="getSampleText">
        <complexType />
      </element>
      <element name="getSampleTextResponse">
        <complexType>
          <sequence>
            <element name="getSampleTextReturn" type="tns1:string" />
          </sequence>
        </complexType>
      </element>
      <element name="getHelloWorldAsString">
        <complexType>
          <sequence>
            <element name="in0" type="tns1:string" />
          </sequence>
        </complexType>
      </element>
      <element name="getHelloWorldAsStringResponse">
        <complexType>
          <sequence>
            <element name="getHelloWorldAsStringReturn" type="tns1:string" />
          </sequence>
        </complexType>
      </element>
    </schema>
  </wsdl:types>
  <wsdl:message name="getHelloWorldAsStringResponse">
    <wsdl:part element="impl:getHelloWorldAsStringResponse" name="parameters" />
  </wsdl:message>
  <wsdl:message name="getHelloWorldAsStringRequest">
    <wsdl:part element="impl:getHelloWorldAsString" name="parameters" />
  </wsdl:message>
  <wsdl:message name="getSampleTextResponse">
    <wsdl:part element="impl:getSampleTextResponse" name="parameters" />
  </wsdl:message>
  <wsdl:message name="getSampleTextRequest">
    <wsdl:part element="impl:getSampleText" name="parameters" />
  </wsdl:message>
  <wsdl:portType name="HelloWorld">
    <wsdl:operation name="getSampleText">
      <wsdl:input message="impl:getSampleTextRequest" name="getSampleTextRequest" />
      <wsdl:output message="impl:getSampleTextResponse" name="getSampleTextResponse" />
    </wsdl:operation>
    <wsdl:operation name="getHelloWorldAsString">
      <wsdl:input message="impl:getHelloWorldAsStringRequest" name="getHelloWorldAsStringRequest" />
      <wsdl:output message="impl:getHelloWorldAsStringResponse" name="getHelloWorldAsStringResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="getSampleText">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getSampleTextRequest">
        <wsdlsoap:body use="literal" />
      </wsdl:input>
      <wsdl:output name="getSampleTextResponse">
        <wsdlsoap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getHelloWorldAsString">
      <wsdlsoap:operation soapAction="" />
      <wsdl:input name="getHelloWorldAsStringRequest">
        <wsdlsoap:body use="literal" />
      </wsdl:input>
      <wsdl:output name="getHelloWorldAsStringResponse">
        <wsdlsoap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="HelloWorldService">
    <wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld">
      <wsdlsoap:address location="http://localhost:8080/SoapApp/services/HelloWorld" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
⚠️ **GitHub.com Fallback** ⚠️