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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:15:00+00:00 2026-06-07T00:15:00+00:00

I’m having a problem with a WCF service trying to consume it from Java.

  • 0

I’m having a problem with a WCF service trying to consume it from Java. The WCF is using basicHttpBinding and pretty simple definition:

public class MyService : IMyService
{
    public int MyMethod(MyObject obj)
    {

    }
}

The MyObject contains only String properties and looks like:

[DataContract]
public class MyObject
{
    [DataMember]
    public String Client { get; set; }

    ....
}

Now in Java, using Metro libaries, I’m creating the necessary classes like this:

wsimport -extension -keep -p com.myproject -Xnocompile http://localhost:3720/MyService.svc?wsdl

And finally consuming it like that:

MyService service = new MyService();
IMyService soap = service.getBasicHttpBindingIMyService();

ObjectFactory fact = new ObjectFactory();
MyObject obj = new MyObject();

obj.setClient(fact.createString("Someone"));

soap.MyMethod(obj);

Sniffing it with Fiddler it seems the data is properly sent to the service containing the “Someone” value for the Client property. Although when debugging the WCF service the Client property receives null value. Any ideas how to proceed?

Here is the SOAP message sent by the Java client:

<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <MyMethod xmlns="http://tempuri.org/" xmlns:ns2="http://schemas.datacontract.org/2004/07/MyProject.MyService" xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
            <MyObject>
                <ns3:string>Someone</ns3:string>
                <ns3:string>123-456-789</ns3:string>
                <ns3:string>Details</ns3:string>
                <ns3:string>12345</ns3:string>
                <ns3:string>Other</ns3:string>
                <ns3:string>user</ns3:string>
                <ns3:string>2012-01-01</ns3:string>
                <ns3:string>Registered</ns3:string>
            </MyObject>
        </MyMethod>
    </S:Body>
</S:Envelope>
  • 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-06-07T00:15:01+00:00Added an answer on June 7, 2026 at 12:15 am

    Finally I managed to resolve the issue. It seems the problem was within the Java code as an alternative .NET client was working properly.
    The parameter’s properties was incorrectly set like this:

    obj.setClient(fact.createString("Someone")); 
    

    Instead the correct approach is

    obj.setClient(fact.createMyObjectClient("Someone"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

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.