Package org.ksoap2.serialization

Examples of org.ksoap2.serialization.SoapSerializationEnvelope


  {
  }

  public SoapObject createSoapRequest(String namespace, String name)
  {
    return new SoapObject(namespace, name);
  }
View Full Code Here


  public List<AddressStore> listAddressStores()
  {
    WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
            WebservicesClientManager.ID);
    List<AddressStore> res = new LinkedList();
    SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address",
            "listAddressStoresRequest");
    SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);

    try
    {
      Vector<Object> results = wcm.sendToCurrentServer(envelope);

      for (Object o : results.toArray())
      {
        SoapObject so = (SoapObject) o;
        AddressStore as = new AddressStore();
        as.setName(wcm.getPropertyAsString(so, "name"));
        as.setTitle(wcm.getPropertyAsString(so, "title"));
        res.add(as);
      }
View Full Code Here

  public List<Address> listAddresses(String addressStoreName, String query, int firstResult, int maxResults)
  {
    WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
            WebservicesClientManager.ID);
    List<Address> res = new LinkedList();
    SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address",
            "listAddressesRequest");

    wcm.addRequestParameter(request, "addressStoreName", PropertyInfo.STRING_CLASS, addressStoreName);
    wcm.addRequestParameter(request, "query", PropertyInfo.STRING_CLASS, query);
    wcm.addRequestParameter(request, "firstResult", PropertyInfo.INTEGER_CLASS, firstResult);
    wcm.addRequestParameter(request, "maxResults", PropertyInfo.INTEGER_CLASS, maxResults);

    SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);

    try
    {
      Vector<Object> results = wcm.sendToCurrentServer(envelope);

      for (Object o : results.toArray())
      {
        SoapObject so = (SoapObject) o;
        Address a = new Address();

        a.setStoreId(addressStoreName);
        a.setId(wcm.getPropertyAsString(so, "id"));
        a.setFirstName(wcm.getPropertyAsString(so, "firstName"));
View Full Code Here

  public List<PhoneNumber> listPhoneNumbers(String addressStoreName, String addressId)
  {
    WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
            WebservicesClientManager.ID);
    List<PhoneNumber> res = new LinkedList();
    SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address",
            "listAddressPhoneNumbersRequest");

    wcm.addRequestParameter(request, "addressStoreName", PropertyInfo.STRING_CLASS, addressStoreName);
    wcm.addRequestParameter(request, "addressId", PropertyInfo.STRING_CLASS, addressId);

    SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);

    try
    {
      Vector<Object> results = wcm.sendToCurrentServer(envelope);

      for (Object o : results.toArray())
      {
        SoapObject so = (SoapObject) o;
        PhoneNumber pn = new PhoneNumber();

        pn.setCategory(wcm.getPropertyAsString(so, "category"));
        pn.setDisplayNumber(wcm.getPropertyAsString(so, "displayNumber"));
        pn.setCanonicalNumber(wcm.getPropertyAsString(so, "canonicalNumber"));
View Full Code Here

  public String getDefaultAddressStoreName()
  {
    WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
            WebservicesClientManager.ID);
    SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address",
            "getDefaultAddressStoreNameRequest");
    SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);

    try
    {
View Full Code Here

  public Address getAddress(String addressStoreName, String addressId)
  {
    WebservicesClientManager wcm = (WebservicesClientManager) Engine.instance().getManager(
            WebservicesClientManager.ID);
    SoapObject request = wcm.createSoapRequest("http://aktera.iritgo.de/webservices/address", "getAddressRequest");

    wcm.addRequestParameter(request, "addressStoreName", PropertyInfo.STRING_CLASS, addressStoreName);
    wcm.addRequestParameter(request, "addressId", PropertyInfo.STRING_CLASS, addressId);

    SEnvelope envelope = wcm.createEnvelopeForCurrentUser(request);
    Address address = new Address();

    try
    {
      SoapObject so = (SoapObject) wcm.sendToCurrentServerReturnObject(envelope);
      address.setId(wcm.getPropertyAsString(so, "id"));
      address.setSalutation(wcm.getPropertyAsString(so, "salutation"));
      address.setFirstName(wcm.getPropertyAsString(so, "firstName"));
      address.setLastName(wcm.getPropertyAsString(so, "lastName"));
      address.setCompany(wcm.getPropertyAsString(so, "company"));
View Full Code Here

    WebserviceTools.port = port;
  }

  public static SoapObject createSoapRequest(String namespace, String name)
  {
    return new SoapObject(namespace, name);
  }
View Full Code Here

  }

  public static WebserviceRequest createWebserviceRequest(String serviceBaseURL, String serviceName, String username,
          String password)
  {
    SoapObject request = WebserviceTools.createSoapRequest(serviceBaseURL, serviceName);
    return new WebserviceRequest(request, username, password, getHost() + ":" + getPort(), getWebserviceURL());
  }
View Full Code Here

  void open(String host) throws Exception {
    endpoint = host + "/soap/services/OSGiFramework";

    httpTransport = new HttpTransportSE(endpoint);
    soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
    httpTransport.debug = true;

    SoapObject rpc = new SoapObject("http://www.w3.org/2001/12/soap-envelope", "getBundles");
    soapEnvelope.env = "http://www.w3.org/2001/12/soap-envelope";
    soapEnvelope.bodyOut = rpc;
View Full Code Here

  void setup() throws Exception {
    ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();

    try {

      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);

      soapServlet = new SoapServlet();
      log.info("SOAP server started.");
      webApp = new WebApp(getWebAppDescriptor());
      webApp.start(bc);
View Full Code Here

TOP

Related Classes of org.ksoap2.serialization.SoapSerializationEnvelope

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.