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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:54:31+00:00 2026-05-22T23:54:31+00:00

I am trying to call some web services written in Java from my asp.net

  • 0

I am trying to call some web services written in Java from my asp.net code. I don’t know Java.

There are several methods each with multiple properties. These methods are then passed to one controlling method. The problem occurs with how to handle arrays. I cannot seem to get the syntax quite right.

For example, there can be from 1 to n locations. Each location has multiple properties.
I can build one location ok. But how do I build an array of locations? I tried several approaches. Here is the closest I’ve gotten. It complies but crashes on the third to the last line below. I’ve removed the code that is not relevant to explaining the problem.

The error says: Object reference not set to an instance of an object.

WebReferenceMERegistration.getMERegistration _myMERegistration =
       new WebReferenceMERegistration.getMERegistration();


            WebReferenceMERegistration.Locations _myLocation =
                new WebReferenceMERegistration.Locations();

            WebReferenceMERegistration.Locations[] _myLocations = null;



            _myLocation.AddressLine1 = txtEmployerAddress1.Text;
            _myLocation.AddressLine2 = txtEmployerAddress2.Text;
    // more properties set here

            _myLocations[0] = _myLocation;

  _myMERegistration.Locations = _myLocations;

               _Results = _myRegistrationService.getMERegistration(_myMERegistration);
  • 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-05-22T23:54:32+00:00Added an answer on May 22, 2026 at 11:54 pm
    int length = ...;
    WebReferenceMERegistration.Locations[] _myLocations = 
         new WebReferenceMERegistration.Locations[length];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to call a web service written in .NET from Java. The web
I'm trying to call an ASP.NET .asmx webservice, from javascript, using other than the
I'm trying to consume a Java based SOAP web service from VBA code in
I am trying to use some pinvoke code to call a C function. The
I'm trying to call a web service from Excel 2003 module. The way i've
Basically I'm trying to proxy some web services locally (for reasons I won't go
I am trying to create a standalone client to consume some web services. I
I have written some web service, I run it and see it from my
I need to call web services from my WP7 client application for user login
I'm trying to call a php webservice using WCF. I googled some public php

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.