Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:51:40+00:00 2026-06-11T09:51:40+00:00

I tried running the Web Service as a java application by adding a main

  • 0

I tried running the Web Service as a java application by adding a main method in the service, i got all the model values getting populated perfectly. There are some DAO operations with Oracle 10g DB, have classes12.jar in my classpath.

Then i created a wsdl and tested it in SOAP UI. There I can see that the service is returning a null object as response.

The wsdl was created using Apache AXIS v1.4.

This means the wsdl getting generated is not correct since all my code is working fine when i run it as java client application.

Additional Info:

When the return type of a method present in the web service is integer, then the value is getting returned correctly while invoking the Web Service using SOAP UI. But when i try to return a model, a null response object is returned.

WSDL:

<!--WSDL created by Apache Axis version: 1.4
 Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="http://service.com"   xmlns="http://www.w3.org/2001/XMLSchema">
  <import namespace="http://model.com"/>
  <element name="getAge">
   <complexType/>
  </element>
  <element name="getAgeResponse">
   <complexType>
    <sequence>
     <element name="getAgeReturn" type="xsd:int"/>
    </sequence>
   </complexType>
  </element>
  <element name="fetchEmployeeDetails">
   <complexType>
    <sequence>
     <element name="empId" type="xsd:int"/>
    </sequence>
   </complexType>
  </element>
  <element name="fetchEmployeeDetailsResponse">
   <complexType>
    <sequence>
     <element name="fetchEmployeeDetailsReturn" type="tns1:EmployeeDetails"/>
    </sequence>
   </complexType>
  </element>
 </schema>
 <schema elementFormDefault="qualified" targetNamespace="http://model.com"    xmlns="http://www.w3.org/2001/XMLSchema">
  <complexType name="EmployeeDetails">
   <sequence>
    <element name="age" type="xsd:int"/>
    <element name="deptId" type="xsd:int"/>
    <element name="empId" type="xsd:int"/>
    <element name="empName" nillable="true" type="xsd:string"/>
    <element name="sex" nillable="true" type="xsd:string"/>
   </sequence>
  </complexType>
 </schema>
</wsdl:types>

  <wsdl:message name="fetchEmployeeDetailsResponse">

  <wsdl:part element="impl:fetchEmployeeDetailsResponse" name="parameters">

  </wsdl:part>

  </wsdl:message>

  <wsdl:message name="getAgeRequest">

     <wsdl:part element="impl:getAge" name="parameters">

     </wsdl:part>

  </wsdl:message>

  <wsdl:message name="getAgeResponse">

     <wsdl:part element="impl:getAgeResponse" name="parameters">

     </wsdl:part>

  </wsdl:message>

  <wsdl:message name="fetchEmployeeDetailsRequest">

     <wsdl:part element="impl:fetchEmployeeDetails" name="parameters">

     </wsdl:part>

  </wsdl:message>

  <wsdl:portType name="WebService1">

     <wsdl:operation name="getAge">

        <wsdl:input message="impl:getAgeRequest" name="getAgeRequest">

      </wsdl:input>

        <wsdl:output message="impl:getAgeResponse" name="getAgeResponse">

      </wsdl:output>

     </wsdl:operation>

     <wsdl:operation name="fetchEmployeeDetails">

        <wsdl:input message="impl:fetchEmployeeDetailsRequest" name="fetchEmployeeDetailsRequest">

      </wsdl:input>

        <wsdl:output message="impl:fetchEmployeeDetailsResponse" name="fetchEmployeeDetailsResponse">

      </wsdl:output>

     </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="WebService1SoapBinding" type="impl:WebService1">

     <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

     <wsdl:operation name="getAge">

        <wsdlsoap:operation soapAction=""/>

        <wsdl:input name="getAgeRequest">

           <wsdlsoap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="getAgeResponse">

           <wsdlsoap:body use="literal"/>

        </wsdl:output>

     </wsdl:operation>

     <wsdl:operation name="fetchEmployeeDetails">

        <wsdlsoap:operation soapAction=""/>

        <wsdl:input name="fetchEmployeeDetailsRequest">

           <wsdlsoap:body use="literal"/>

        </wsdl:input>

        <wsdl:output name="fetchEmployeeDetailsResponse">

           <wsdlsoap:body use="literal"/>

        </wsdl:output>

     </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="WebService1Service">

     <wsdl:port binding="impl:WebService1SoapBinding" name="WebService1">

        <wsdlsoap:address location="http://localhost:8045/WebService1/services/WebService1"/>

     </wsdl:port>

  </wsdl:service>

Please help me out of this. If some additional information is required then please ask.

Regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:51:42+00:00Added an answer on June 11, 2026 at 9:51 am

    The mistake was to do the unit testing using main method and running it as java application from main method. The problem was related to classes12.jar placement. For Web app, jars should be placed ibside the lib folder. But it is not the same for a Java client app. Hence, the connection object was not getting retrieved properly when I tries to run it using the SOAP UI.

    Conclusion:

    Never test web services by adding a main method in service class and running it as a java client application, it may cause you unnecessary problems like this one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a java code for getting info from a google-app-engine web service (testeserjaum.appspot.com),
After running my Cake application locally i tried to upload it to my remote
I am running a Web service that allows users to record their trips (kind
I'm connecting to a web service over HTTPS. I've done all that I think
With Java it is easy to consume a Web Service over HTTPS but how
I'm new to java and I'm trying to compile and run a web service
I have a web service application in C#. When I run the Debug in
I have written a service for JIRA(a web application runs in tomcat) which runs
I'm trying to call a web service in my back end java code when
I am running a Web Service in C# .NET 3.5. I want to log

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.