Menu

Help: Local wsdl repo issue on android.

Help
atline
2013-07-23
2016-07-14
  • atline

    atline - 2013-07-23

    Hi, buddies,

    I use the nightly build provided by Chris K. on the page:
    http://sourceforge.net/p/ws4d-javame/discussion/664431/thread/2257e3ea/

    This branch is used to fix android jmeds attachment issue, and it did work.

    However, for some reason, we had to use local wsdl instead of asking it from dpws server.

    In previous version, the code will just get it from /mnt/sdcard/wsdl_repo, and it does works.

    Then, with the branch that Chris. supplied, I found the scheme seems change.

    It will first try to query /data/data/YOURAPK/files/null_repo, if not found, ask metadata from server, then will query /data/data/YOURAPK/files/DPWS_repo, if not found, will access server wsdl http address.

    I simply copy index.idx and my local wsdl to /data/data/YOURAPK/files/null_repo, and the app did find the wsdl and did not ask data from server.
    But, the following error happened:
    07-23 13:19:08.189: D/JMEDS(1990): [DEBUG] No communicationmanager found!
    07-23 13:19:08.199: E/JMEDS(1990): [ERROR] Exception occurred while running thread. null
    07-23 13:19:08.199: E/JMEDS(1990): java.lang.NullPointerException

    In fact, I have no code for the libiraies, and also do not understand what null_repo mean as we already have DPWS_repo?

    Detail logcat are storeed in attachment, including wsdl, the logcat without local wsdl & the logcat with the local wsdl.
    The code is just same as Chris. supplied here:
    http://sourceforge.net/p/ws4d-javame/discussion/664431/thread/2257e3ea/

     
  • atline

    atline - 2013-07-23

    Attachment.

     
  • Chris

    Chris - 2013-07-25

    Hello atline,
    did you read the documentation? You have to use a prefix for your paths:
    ~ext/ (external storage, e.g. sd-card)
    ~int/ (internal storage)
    ~assets/ (assets folder of your project)

    Can you please provide your full source code? The message "No communicationmanager found!" seems quite strange to me.

     
  • atline

    atline - 2013-07-26

    Hi, Chris,

    Sorry to bother you again. Next is my story:
    For limit of wince dpws server, we had to use dpws2006, and wince dpws cannot response for metadata request, so we had to use local wsdl without ask for metadata from server.

    Before, all works except we cannot get attachment. With your fix library attached in
    http://sourceforge.net/p/ws4d-javame/discussion/664431/thread/2257e3ea/
    the attachment can work now.

    But the library is much newer than we use before.
    So when we try local wsdl without change your code, just put the index and wsdl in /data/data/$APK_NAME/files/null_repo, we got the error I mentioned in the first post. Before we just put the wsdl_repo in /mnt/sdcard, all works.

    To make you ease, I add local wsdl set function in attachment code now. This could reproduce my issue.

    Thanks advance for your help.

     
  • Tester Toss

    Tester Toss - 2016-07-14

    hi! i'm having this issue too. Previously i did it this way, and also got null_repo after moving on to 2013's

    URI f = new URI("int://"+myDir+"/WSDPrinterService.wsdl");

            WSDLRepository.getInstance().setRepoPathPrefix(appPath+appPath1);
            w = WSDLRepository.loadWsdl(f,CredentialInfo.EMPTY_CREDENTIAL_INFO,DPWSCommunicationManager.COMMUNICATION_MANAGER_ID);
            WSDLRepository.getInstance(DPWSCommunicationManager.COMMUNICATION_MANAGER_ID).store(w,"repo.wsdl");
    
     

Log in to post a comment.