问题列表 - 第19841页

如何使用kso​​ap2将参数传递给Web服务?

我正在使用Eclipse IDE开发一个Android应用程序.我正在尝试连接到.net webservice.我正在使用kso​​ap2版本2.3

当我调用没有参数的web方法时,它工作正常.当我将参数传递给webmethod时,我得到null(在调试我发现的web服务时),我从客户端代码中的webmethod得到一个null.

码:

package com.examples.hello;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloActivity extends Activity {
    /** Called when the activity is first created. */
 private static final String SOAP_ACTION = "http://Innovation/HRService/stringBs";

 private static final String METHOD_NAME = "stringBs";

 private static final String NAMESPACE = "http://Innovation/HRService/";
 private static final String URL = "http://196.205.5.170/mdl/hrservice.asmx";
 TextView tv;

 @Override
 public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
     tv=(TextView)findViewById(R.id.text1);
     call();

 }

 public …
Run Code Online (Sandbox Code Playgroud)

java parameters android web-services ksoap2

11
推荐指数
3
解决办法
4万
查看次数

哪个Google API用于获取用户的名字,姓氏,图片等?

我有谷歌正式工作的oauth授权,我从联系人api获取数据.现在,我想以编程方式获取gmail用户的名字,姓氏和图片.哪个google api可以用来获取这些数据?

oauth google-api

16
推荐指数
3
解决办法
4万
查看次数

如何在C++中使用my_alloc进行_all_新调用?

想象一下,我在C-land,我有

 void* my_alloc(size_t size);
 void* my_free(void*);
Run Code Online (Sandbox Code Playgroud)

然后我可以浏览我的代码并用my_alloc/my_free替换所有对malloc/free的调用.

怎么,我知道了一个Foo课,我可以做新的安置; 我也可以重载新运算符.但是,有没有办法为我的所有 C++类做到这一点?(即我想为新的和新的[]使用我自己的分配器;但我不想破解并破解我定义的每个类.)

谢谢!

c++ constructor memory-management new-operator

0
推荐指数
1
解决办法
360
查看次数

linq to sql如何与sql连接一起使用?

使用linq数据上下文的最佳方法是什么?链接如何与sql连接一起工作(何时打开连接以及何时关闭连接)?当我使用数据上下文时,我是否应该使用using语句?

对不起,问题列表.提前致谢.

.net linq-to-sql

1
推荐指数
1
解决办法
1014
查看次数

.NET中的java.lang.IllegalStateException?

java.lang.IllegalStateException来自Java文档的描述:

表示在非法或不适当的时间调用了方法.换句话说,Java环境或Java应用程序未处于所请求操作的适当状态.

IllegalStateException在.NET框架中是否有相同的东西?

.net java exception

81
推荐指数
1
解决办法
2万
查看次数

以与wpf控件上的错误类似的方式显示警告

我想在验证业务对象时显示警告和错误,并将这些信息以可视方式显示给用户.

例如,我有一个实现如下界面的业务对象类:

interface IOrderItem : IDataErrorInfo
{
  int ProductId { get; set; }
  string ProductName { get; set; }
  decimal Price { get; set; }
  IDictionary<string, string> Warnings { get; }
}
Run Code Online (Sandbox Code Playgroud)

这与用户界面绑定如下:

<TextBox Text="{Binding Price, ValidatesOnDataErrors=True}/>
Run Code Online (Sandbox Code Playgroud)

错误是:

  • 价格<0 =>"价格不能低于0"

当我使用IDataErrorInfo界面将错误消息放在业务对象上时,这很好地工作并在文本框周围绘制一个红色边框.

我想做的还是指定警告,例如:

  • 价格<15 || 价格> 30 =>"价格超出容忍度"

这些警告会在文本框周围放置橙色边框,并告知用户可能存在问题但不会阻止它们继续运行.

警告以类似的方式存储在映射PropertyName => WarningMessage的字符串字典中IDataErrorInfo.

问题:最好的方法是什么?

  • 显然我需要一个包含文本框橙色边框的Style,但是如何触发呢?
  • 我真的不希望每个文本框都有单独的样式,所以样式如何访问底层绑定以获取它应该在Dictionary中查找的属性名称.

c# wpf

10
推荐指数
1
解决办法
4430
查看次数

如何使用eclox,Eclipse的doxygen插件

如何在Eclipse 3.5中使用eclox?

我正在使用Ubuntu 9.04.我从ubuntu存储库安装了Doxygen(版本1.5.8).然后我通过更新站点在eclipse上安装了eclox.

尽管如此,我没有任何选项可以在任何菜单中启动它.

此外,eclox网站似乎没有任何"入门"指南.

请帮忙.

eclipse doxygen eclipse-plugin

24
推荐指数
2
解决办法
5万
查看次数

surfaceview + glsurfaceview + framelayout

我是java和OpenGL的新手.

我正在尝试使用能够同时显示3d对象的相机预览屏幕.通过api演示中的示例,我认为在api演示中组合示例的代码就足够了.但不知何故它不起作用.强制我在启动时关闭,错误被称为空指针异常.有人可以和我分享我哪里出错了以及如何从那里开始.我如何为代码组合如下所示:

myoverview.xml


<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <android.opengl.GLSurfaceView 
            android:id="@+id/cubes" 
            android:orientation="horizontal" 
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"/> 
    <SurfaceView 
            android:id="@+id/camera" 
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"/> 
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

myoverview.java


import android.app.Activity; 
import android.os.Bundle; 
import android.view.SurfaceView; 
import android.view.Window; 
public class MyOverView extends Activity { 
@Override 
    protected void onCreate(Bundle savedInstanceState) { 
       super.onCreate(savedInstanceState); 
       // Hide the window title. 
       requestWindowFeature(Window.FEATURE_NO_TITLE); 
       // camera view as the background 
       SurfaceView cameraView = (SurfaceView) findViewById(R.id.camera); 
       cameraView = new CameraView(this); 
       // visual of both cubes 
       GLSurfaceView cubesView = (GLSurfaceView) findViewById(R.id.cubes); 
       cubesView = new GLSurfaceView(this); 
       cubesView.setRenderer(new CubeRenderer(false)); …
Run Code Online (Sandbox Code Playgroud)

android surfaceview

9
推荐指数
1
解决办法
2万
查看次数

Delphi中有条件运算符,或者有没有?

我想,我把手远离德尔福太久了.在过去的几年里,我一直忙于Java和PHP.现在,当我回到做一点Delphi工作时,我意识到我真的很想念Java和PHP都支持的条件运算符.

在Delphi程序中你会找到多少个这样的行?

var s : string;
begin
  ...<here the string result is manipulated>...

  if combo.Text='' then
      s := 'null'
    else
      s := QuotedStr(combo.Text);

  result := result + s;
end;
Run Code Online (Sandbox Code Playgroud)

哪里很简单

result := result + (combo.text='')?'null':quotedStr(combo.text);
Run Code Online (Sandbox Code Playgroud)

就够了 我喜欢这个,它不仅缩短了代码,这样我也避免声明一些辅助s:string变量.

为什么条件运算符不是Delphi的一部分 - 它们是否会得到支持?我注意到2009版Delphi(泛型)有很多语言扩展,为什么不添加这个功能呢?

delphi language-features delphi-2009 conditional-operator

32
推荐指数
4
解决办法
1万
查看次数

Javascript数组问题

为什么JavaScript返回错误的数组长度?

var myarray = ['0','1'];
delete myarray[0];
alert(myarray.length); //gives you 2
Run Code Online (Sandbox Code Playgroud)

javascript arrays

7
推荐指数
2
解决办法
1509
查看次数