开发者

about blackberry development

I started in blackberry development.

Currently, I try to develop App with: Blackberry Widget API (Javascript + CSS) and Eclipse (JAVA)

1/ When I try with Blackberry Widget API, I try to load a webservice in .NET, I try to run this in simulator 8520 curve... and the connect to the webservice not works, I use the config.xml to set the domains but nothing happends, later I test in 9800 simulator and works fine... but I have some fear开发者_如何转开发 because this app is for run in any device :(

2/ When I try with Eclipse and kSOAP2 Library, This is my code:

    String WSD_URL = "http://service.com/service.asmx";
    String WSD_NAMESPACE = "http://service.com/GetInfo";
    String WSD_ACTION = "http://service.com/GetInfo/fGetInfo";      

    SoapObject soap = new SoapObject(WSD_NAMESPACE, "fGetInfo");
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.bodyOut = soap;
    envelope.encodingStyle = SoapEnvelope.XSD;

    HttpTransport ht = new HttpTransport(WSD_URL);


    try {
        ht.call(WSD_ACTION, envelope);

    } catch (Exception e){
    }

When I launch the app in simulator... nothing happend, few minutos after I see a error in the white screen with message "controlled access exception" :(

I have doubt here because I dont know how to solve this and if this app run in any devive.

In eclipse I see JRE 6.0


To access dot net webservice, instead of Ksoap method, try this one.. http://whatpaulhaslearnt.wordpress.com/2011/04/19/consuming-a-net-web-service-from-a-blackberry-native-application-using-the-java-me-platform-sdk-3/ .. this is the best way of accessing dot net webservice..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜