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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:56:15+00:00 2026-06-08T02:56:15+00:00

I am receiving a SOAP request from some legacy code, and dealing with it

  • 0

I am receiving a SOAP request from some legacy code, and dealing with it using JAX-WS generated objects from the same WSDL the legacy code uses, but I am getting an Unmarshalling Error: unexpected element error when I process the request.

The WSDL part for this request is as follows: (Please note “schema” has replaced all the actual schema locations for our WSDL)

    <xsd:complexType name="Administrate">
        <xsd:sequence>
            <xsd:element name="AdminOperation" type="typens:AdminOperation" maxOccurs="unbounded" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Administrate" type="typens:Administrate"/>
    <xsd:complexType name="AdministrateResponse">
        <xsd:sequence>
        <xsd:element name="Status" type="typens:SoapResponseStatus"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AdministrateResponse" type="typens:AdministrateResponse"/>
    <xsd:complexType name="AdminOperation">
        <xsd:sequence>
            <xsd:choice>
                <xsd:element name="Transaction" type="typens:Transaction" minOccurs="0"/>
                <xsd:element name="CreateUser" type="typens:CreateUser" minOccurs="0"/>
                <xsd:element name="DeleteUser" type="typens:DeleteUser" minOccurs="0"/>
                <xsd:element name="UpdateUser" type="typens:UpdateUser" minOccurs="0"/>
                <xsd:element name="CreateGroup" type="typens:CreateGroup" minOccurs="0"/>
                <xsd:element name="DeleteGroup" type="typens:DeleteGroup" minOccurs="0"/>
                <xsd:element name="UpdateGroup" type="typens:UpdateGroup" minOccurs="0"/>
                <xsd:element name="CreateChannel" type="typens:CreateChannel" minOccurs="0"/>
                <xsd:element name="DeleteChannel" type="typens:DeleteChannel" minOccurs="0"/>
                <xsd:element name="UpdateChannel" type="typens:UpdateChannel" minOccurs="0"/>
                <xsd:element name="CreateRole" type="typens:CreateRole" minOccurs="0"/>
                <xsd:element name="DeleteRole" type="typens:DeleteRole" minOccurs="0"/>
                <xsd:element name="UpdateRole" type="typens:UpdateRole" minOccurs="0"/>
                <xsd:element name="CreateFileType" type="typens:CreateFileType" minOccurs="0"/>
                <xsd:element name="DeleteFileType" type="typens:DeleteFileType" minOccurs="0"/>
                <xsd:element name="UpdateFileType" type="typens:UpdateFileType" minOccurs="0"/>
                <xsd:element name="CreateFolder" type="typens:CreateFolder" minOccurs="0"/>
                <xsd:element name="DeleteFile" type="typens:DeleteFile" minOccurs="0"/>
                <xsd:element name="MoveFile" type="typens:MoveFile" minOccurs="0"/>
                <xsd:element name="CopyFile" type="typens:CopyFile" minOccurs="0"/>
                <xsd:element name="UpdateFile" type="typens:UpdateFile" minOccurs="0"/>
                <xsd:element name="DeleteJob" type="typens:DeleteJob" minOccurs="0"/>
                <xsd:element name="DeleteJobNotices" type="typens:DeleteJobNotices" minOccurs="0"/>
                <xsd:element name="UpdateJobSchedule" type="typens:UpdateJobSchedule" minOccurs="0"/>
                <xsd:element name="UpdateVolumeProperties" type="typens:UpdateVolumeProperties" minOccurs="0"/>
                <xsd:element name="UpdateOpenSecurityCache" type="typens:UpdateOpenSecurityCache" minOccurs="0"/>
            </xsd:choice>
        </xsd:sequence>
    </xsd:complexType>

and the request sent:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns="schema">
        <SOAP-ENV:Header>
            <AuthId>7</AuthId>
        </SOAP-ENV:Header>
        <SOAP-ENV:Body>
            <Administrate>
                <UpdateFile>
                    <SetPermissions>
                        <Permission SOAP-ENC:arrayType="Permission[1]">
                            <UserName>username</UserName>
                            <AccessRight>rights</AccessRight>
                        </Permission>
                    </SetPermissions>
                    <NameList>
                        <String>folder1</String>
                        <String>folder1/folder2</String>
                        <String>folder1/folder2/file.ext</String>
                    </NameList>
                </UpdateFile>
            </Administrate>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

But I get the following error from my code:

            <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
                <soap:Body>
                    <soap:Fault>
                        <faultcode>soap:Client</faultcode>
                        <faultstring>Unmarshalling Error: unexpected element
                            (uri:"schema", local:"UpdateFile"). Expected elements
                            are &lt;{schema}AdminOperation> </faultstring>
                    </soap:Fault>
                </soap:Body>
            </soap:Envelope>

The Administrate JAX-WS generated object just contains an ArrayList of AdminOperations with a getter,

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "Administrate", propOrder = {
        "adminOperation"
    })
    public class Administrate {

        @XmlElement(name = "AdminOperation")
        protected List<AdminOperation> adminOperation;

        /**
         * Gets the value of the adminOperation property.
         * 
         * <p>
         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a <CODE>set</CODE> method for the adminOperation property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getAdminOperation().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link AdminOperation }
         * 
         * 
         */
        public List<AdminOperation> getAdminOperation() {
            if (adminOperation == null) {
                adminOperation = new ArrayList<AdminOperation>();
            }
            return this.adminOperation;
        }

    }

But judging from the legacy request sent and from the WSDL, this operation tag is replaced with choice of operations, e.g. updatefile etc right?

As I cannot change the legacy request or legacy WSDL, I am unsure as to how to proceed. Any help would be greatly appreciated, so thanks in advance!

  • 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-08T02:56:16+00:00Added an answer on June 8, 2026 at 2:56 am

    Your suspicion is correct. In this case, the client is actually sending a request that does not conform to the provided schema.

    Since you have no control of the client code and apparently must accommodate the client, my hope is that it is the only client for this service. The simplest path-forward would be to adjust the service to the contract for which the client has actually been built. You could manually tweak the schema to indicate that UpdateFile is a child of Administrate, then regen the relevant objects or (to not bother with regen of objects) tweak the Administrate java object annotations to reflect FileUpdate as first-level child:
    …
    @XmlType(name = “Administrate”, propOrder = {
    “updateFile”
    })
    public class Administrate {

        @XmlElement(name = "UpdateFile")
        protected UpdateFileType updateFile;
    

    …

    Due diligence would be to also recognize the other forms of request (do they conform to the contract) to ensure no further breakage when adapting the service endpoint.

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

Sidebar

Related Questions

I am receiving shouldstartloadwithrequest event and I need to stop request for some conditions.
I am having some problems building a properly formatted SOAP message using XMLDocument in
I need to use compression when sending SOAP requests and receiving responses from the
I am receiving a JSON response from our server and it is compressed using
here's my problem, I am receiving a string from a soap Webservice which seems
There's a PHP SOAP webservice that needs to be fed with some objects that
I am familiar with SimpleXML and am now receiving a SOAP response from a
My iPhone app will be receiving an xml feed from a Java web service.
I'm connecting with a SUDS client to a SOAP Server whose wsdl contains many
One desktop application needs to get some services from server. For example sending some

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.