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

  • Home
  • SEARCH
  • 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 8917929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:37:08+00:00 2026-06-15T05:37:08+00:00

I am developinging a Java web service client project. In it, I have to

  • 0

I am developinging a Java web service client project. In it, I have to send parameters from java to related java class of wsdl implementer. The code that I have to use is:

private static SendSMSOutput sendSMS(tr.com.SomeProvider.sdp.mapping.generated.SendSMSInput requestPart) {
    tr.com.SomeProvider.sdp.wsdl.generated.SendMessage service = new tr.com.SomeProvider.sdp.wsdl.generated.SendMessage();
    tr.com.SomeProvider.sdp.wsdl.generated.SendMessagePort port = service.getSendMessagePort();
    return port.sendSMS(requestPart);
}

I have to send parameters from main class to this method.

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"expirydate",
"messageclass",
"sdate",
"sender",
"shortnumber",
"srcmsisdn",
"nreq",
"toreceivers",
"messagebody"})

@XmlRootElement(name = "SendSMSInput")
public class SendSMSInput {

@XmlElement(name = "EXPIRY_DATE")
protected String expirydate;
@XmlElement(name = "MESSAGE_CLASS")
protected String messageclass;
@XmlElement(name = "S_DATE")
protected String sdate;
@XmlElement(name = "SENDER")
protected String sender;
@XmlElement(name = "SHORT_NUMBER", required = true)
protected String shortnumber;
@XmlElement(name = "SRC_MSISDN")
protected String srcmsisdn;
@XmlElement(name = "NREQ")
protected String nreq;
@XmlElement(name = "TO_RECEIVERS", required = true)
protected SendSMSInput.TORECEIVERS toreceivers;
@XmlElement(name = "MESSAGE_BODY", required = true)
protected SendSMSInput.MESSAGEBODY messagebody;

/**
 * Gets the value of the expirydate property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getEXPIRYDATE() {
    return expirydate;
}

/**
 * Sets the value of the expirydate property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setEXPIRYDATE(String value) {
    this.expirydate = value;
}

/**
 * Gets the value of the messageclass property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getMESSAGECLASS() {
    return messageclass;
}

/**
 * Sets the value of the messageclass property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setMESSAGECLASS(String value) {
    this.messageclass = value;
}

/**
 * Gets the value of the sdate property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getSDATE() {
    return sdate;
}

/**
 * Sets the value of the sdate property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setSDATE(String value) {
    this.sdate = value;
}

/**
 * Gets the value of the sender property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getSENDER() {
    return sender;
}

/**
 * Sets the value of the sender property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setSENDER(String value) {
    this.sender = value;
}

/**
 * Gets the value of the shortnumber property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getSHORTNUMBER() {
    return shortnumber;
}

/**
 * Sets the value of the shortnumber property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setSHORTNUMBER(String value) {
    this.shortnumber = value;
}

/**
 * Gets the value of the srcmsisdn property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getSRCMSISDN() {
    return srcmsisdn;
}

/**
 * Sets the value of the srcmsisdn property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setSRCMSISDN(String value) {
    this.srcmsisdn = value;
}

/**
 * Gets the value of the nreq property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getNREQ() {
    return nreq;
}

/**
 * Sets the value of the nreq property.
 * 
 * @param value
 *     allowed object is
 *     {@link String }
 *     
 */
public void setNREQ(String value) {
    this.nreq = value;
}

/**
 * Gets the value of the toreceivers property.
 * 
 * @return
 *     possible object is
 *     {@link SendSMSInput.TORECEIVERS }
 *     
 */
public SendSMSInput.TORECEIVERS getTORECEIVERS() {
    return toreceivers;
}

/**
 * Sets the value of the toreceivers property.
 * 
 * @param value
 *     allowed object is
 *     {@link SendSMSInput.TORECEIVERS }
 *     
 */
public void setTORECEIVERS(SendSMSInput.TORECEIVERS value) {
    this.toreceivers = value;
}

/**
 * Gets the value of the messagebody property.
 * 
 * @return
 *     possible object is
 *     {@link SendSMSInput.MESSAGEBODY }
 *     
 */
public SendSMSInput.MESSAGEBODY getMESSAGEBODY() {
    return messagebody;
}

/**
 * Sets the value of the messagebody property.
 * 
 * @param value
 *     allowed object is
 *     {@link SendSMSInput.MESSAGEBODY }
 *     
 */
public void setMESSAGEBODY(SendSMSInput.MESSAGEBODY value) {
    this.messagebody = value;
}


/**
 * <p>Java class for anonymous complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType>
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="message" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "message"
})
public static class MESSAGEBODY {

    @XmlElement(required = true)
    protected List<String> message;

    /**
     * Gets the value of the message 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 message property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getMessage().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getMessage() {
        if (message == null) {
            message = new ArrayList<String>();
        }
        return this.message;
    }

}


/**
 * <p>Java class for anonymous complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType>
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="msisdn" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "msisdn"
})
public static class TORECEIVERS {

    @XmlElement(required = true)
    protected List<String> msisdn;

    /**
     * Gets the value of the msisdn 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 msisdn property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getMsisdn().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link String }
     * 
     * 
     */
    public List<String> getMsisdn() {
        if (msisdn == null) {
            msisdn = new ArrayList<String>();
        }
        return this.msisdn;
    }

}

}

As far as I understood I have to send my parameters in terms of SendInput. I think I have to create such a payload that carries expirydate, messageclass, sdate, sender, shortnumber, srcmsisdn, nreq, toreceivers, and messagebody.

My question is how to send those parameters as one to SendSMSOutput method? Thanks in advance.

edit: in the documentation the way how soap message will look like is:

<soap:Body>
    <sdp:SendSMSInput>
        <sdp:EXPIRY_DATE>250106121212</sdp:EXPIRY_DATE>
        <sdp:MESSAGE_CLASS>0</sdp:MESSAGE_CLASS>
        <sdp:S_DATE>200106121212</sdp:S_DATE>
        <sdp:SHORT_NUMBER>1905</sdp:SHORT_NUMBER>
        <sdp:SRC_MSISDN>123123123123</sdp:SRC_MSISDN>
        <sdp:TO_RECEIVERS>
            <sdp:msisdn>123123123123</sdp:msisdn>
            <sdp:msisdn>123123123123</sdp:msisdn>
        </sdp:TO_RECEIVERS>
        <sdp:MESSAGE_BODY>
            <sdp:message>MESSAGE BODY GOES HERE</sdp:message>
            <sdp:message>SECOND BODY GOES HERE</sdp:message>
        </sdp:MESSAGE_BODY>
    </sdp:SendSMSInput>
</soap:Body>
  • 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-15T05:37:16+00:00Added an answer on June 15, 2026 at 5:37 am

    You’ll have to instantiate an object of class tr.com.SomeProvider.sdp.mapping.generated.SendSMSInput, populate its fields and forward it to the method sendSMS. Instantiation should be done in usual way, by calling appropriate constructor. Most of the fields you’ll populate directly, by calling setXXX(..) methods, except MESSAGEBODY and TORECEIVERS. You’ll populate them this way (an example for TORECEIVERS, similar for MESSAGEBODY):

    //INSTANTIATE requestPart
    ...
    SendSmsInput.TORECEIVERS receivers = new SendSmsInput.TORECEIVERS();
    receivers.getMsisdn().add("value1");
    receivers.getMsisdn().add("value2");
    ..
    requestPart.setTORECEIVERS(receivers);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to work with another team that is developing in php, when I'm

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.