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 7600005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:48:17+00:00 2026-05-30T22:48:17+00:00

I’m migrating my webesrvice client from Axis to Axis2-1.6.1, but the service itself will

  • 0

I’m migrating my webesrvice client from Axis to Axis2-1.6.1, but the service itself will not be changed. I’m having issues with the code generated by the WDSL2Java, because I’m getting a “Unexpected subelement” exception. The WDSL is pretty simple, since there is only one service, and it only receives a String and returns a Date:

<wsdl:definitions targetNamespace="xml.generator.ws">
    <!--WSDL created by Apache Axis version: 1.4
    Built on Apr 22, 2006 (06:55:48 PDT)-->
    <wsdl:message name="generateToday1Request">
        <wsdl:part name="idCompany" type="xsd:string"/>
    </wsdl:message>
    <wsdl:message name="generateToday1Response">
        <wsdl:part name="generateToday1Return" type="xsd:dateTime"/>
    </wsdl:message>
    <wsdl:portType name="WSGenerator">
        <wsdl:operation name="generateToday1" parameterOrder="idCompany">
            <wsdl:input message="impl:generateToday1Request" name="generateToday1Request"/>
            <wsdl:output message="impl:generateToday1Response" name="generateToday1Response"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ValuationsXMLGeneratorSoapBinding" type="impl:WSGenerator">
        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="generateToday1">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="generateToday1Request">
                <wsdlsoap:body namespace="http://generacion.stmts.bpi.com" use="literal"/>
            </wsdl:input>
            <wsdl:output name="generateToday1Response">
                <wsdlsoap:body namespace="xml.generator.ws" use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="WSGeneratorService">
        <wsdl:port binding="impl:ValuationsXMLGeneratorSoapBinding" name="ValuationsXMLGenerator">
            <wsdlsoap:address location="http://naboo:8080/Statements2/services/ValuationsXMLGenerator"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

I’ve generated the source code with the following options:

<axis-wsdl2java
    output="${src.java}"
    testcase="false"
    wsdlfilename="http://naboo:8080/Statements2/services/ValuationsXMLGenerator?wsdl"
    serverside="false"
    unpackclasses="true"
    unwrap="true"
    suppressprefixes="true"
    namespacetopackages="xml.generator.ws=com.spb.eco.valuations.xml"
    generateAllClasses="true"/>

I use the generated code to invoke the service, and the following body is sent:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Body>
  <generateToday1 xmlns="http://generacion.stmts.bpi.com">
   <idCompany xmlns="">US0010001</idCompany>
  </generateToday1>
 </soapenv:Body>
</soapenv:Envelope>

And I receive the following:

<?xml version="1.0" encoding="UTF-8"?>
<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>
  <generateToday1Response xmlns="http://generacion.stmts.bpi.com">
   <generateToday1Return>2011-09-19T22:56:53.781Z</generateToday1Return>
  </generateToday1Response>
 </soapenv:Body>
</soapenv:Envelope>

And this is the server-config.wsdd for the server:

<?xml version="1.0" ?>
<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="ValuationsXMLGenerator" provider="java:RPC" style="rpc" use="literal">


        <!-- Nombre de la clase que implementa los metodos expuestos -->
        <parameter name="className" value="com.bpi.stmts.generacion.WSGenerator"/>

        <parameter name="allowedMethods" value="generateToday1"/>
        <parameter name="wsdlTargetNamespace" value="xml.generator.ws"/>
    </service>

    <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
    <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>

    <transport name="http">
        <requestFlow>
            <handler type="URLMapper"/>
            <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
        </requestFlow>
        <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
        <parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
        <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
        <parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
        <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
        <parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
    </transport>
    <transport name="local">
        <responseFlow>
            <handler type="LocalResponder"/>
        </responseFlow>
    </transport>

</deployment>

It couldn’t be more simple, but the generated code fails with the following exception:

Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement
{http://generacion.stmts.bpi.com}generateToday1Return

In this case there is no problem with the orders of the elements, or anything like that, so I don’t understand why the client is failing. Any ideas?

TIA

JL

  • 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-05-30T22:48:18+00:00Added an answer on May 30, 2026 at 10:48 pm

    The problem is with the SOAP Binding style, In your WSDL you have used “RPC” as a style, Axis2 is not supporting the RPC. I have faced the same issue, I have tested the Web Service with Axis1 client it worked, but the same it happened in Axis2.

    Later I have changed the SOAP binding style to DOCUMENT and then I have regenerated the client stubs with Axis2. After that I was able to invoke the Web Services successfully and got the proper response as well. 
    
     So, Change the SOAP binding style to DOCUMENT. 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I need a function that will clean a strings' special characters. I do NOT
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from

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.