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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:51:57+00:00 2026-05-20T10:51:57+00:00

I try to call a webservice provided by SAP to update customer data. I

  • 0

I try to call a webservice provided by SAP to update customer data. I used SoapUI for testing the connection and the actual request that is needed. Everything worked fine, this is how the SoapUI request for changing an email address looks like:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:Ze12RfcMaintainCustomer>     
         <!--Optional:-->
         <PiTEmail>
            <!--Zero or more repetitions:-->
            <item>
               <StdNo>X</StdNo>
               <EMail>me@example.com</EMail>
            </item>
         </PiTEmail>
         <!--Optional:-->
         <PiTEmailX>
            <!--Zero or more repetitions:-->
            <item>
               <StdNo>X</StdNo>
               <EMail>X</EMail>
            </item>
         </PiTEmailX>
         <PieKunnr>4711</PieKunnr>
      </urn:Ze12RfcMaintainCustomer>
   </soapenv:Body>
</soapenv:Envelope>

The webservice accepts a whole lot more parameters, but all of them are optional and not needed for this task.

Now if I try to do the same request in PHP with a SoapClient in WSDL mode, I get an error for every optional parameter that is not included in the request, e.g.:

SOAP-ERROR: Encoding: object hasn't 'EmailSrch' property

This is my code (simplified):

$params = array(
    'PieKunnr' => 4711,
    'PiTEmail' => array(
        'item' => array(
            'StdNo' => 'X',
            'EMail' => 'me@example.com',                    
        ),        
    ),
    'PiTEmailX' => array(
        'item' => array(
            'StdNo' => 'X',
            'EMail' => 'X',                    
        ),        
    ),    
);

$result = $service->Ze12RfcMaintainCustomer($params);

If I put all the optional parameters into the request, it works.

Why can optional parameters not be omitted in SoapClient requests?

  • 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-20T10:51:58+00:00Added an answer on May 20, 2026 at 10:51 am

    It turned out that the WSDL file (which is automatically generated by SAP) did not have the “minOccurs” attribute for alle the elements, although the service endpoint does not require them. I am now using the Soap Client in non-WSDL mode – this seems to be the easiest workaround for my problem.

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

Sidebar

Related Questions

i am try to call webservice using Android.I have used httpclient as well as
friends, I'm running into an issue when i try to call webservice and the
I try to call my webservice but I cant! when I put it in
I am trying to call a webservice using WCF that uses the following encoding:
I'm trying to call a webservice that has complexTypes described as input and output
I use .ajax to call a webservice mehod that sends an email to entered
I try to call an API. I just want use active resource so I
I try to call a function which checks a rule and if the rule
I try to call a function which passed as function pointer with no argument,
I try to call the esriRegAsm.exe with arguments from a C# program. The purpose

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.