简体   繁体   中英

Calling Webservice inside webservice WCF

I'm working on a SOAP project which contains:

  • C# client
  • C# server (WCF)
  • J2EE server (with webservice)

On my C# Server , I have my service and I'm adding the J2EE WSDL to this project to calling a J2EE method.

But I'm still having an issue. Which does not append when I'm calling the WSDL from an console app wjich contains a MAIN .

Any clue if there is a restriction or anything else?

the service:

public class ClientRequest : IClientRequest
    {
        public STG m_service(STG msg)
        {
            var remoteJavaServer = new ServerServicesClient();
            remoteJavaServer.Open();
            Console.WriteLine("Result value for 2 square -> {0}", remoteJavaServer.test(2));


            return msg;
        }

        public int m_square(int i)
        {
            Console.WriteLine("value input = "+i);
            return i*i;
        }
    }

the console app :

class Program
    {
        static void Main(string[] args)
        {
            var client = new ServerServicesClient();
            client.Open();
            Console.WriteLine("2 -> {0}", client.test(2));
        }
    }

Turns out, only my 'service' library project was configure with the endpoint to target the WSDL. So, I've add the endpoint to the host console app and now it is working.

Thanks anyway.

Closed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM