• Sergey Gorbatov
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi, 

I am creating .net Sample (Helloworld) Webservices, & converted to  APEX classes.,

Now how to call that that helloworld functions in APEX triggers???

 

My sample code of APEX Class is:

 

//Generated by wsdl2apex

public class Hello {
    public class HelloWorld_element {
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class ServiceSoap {
        public String endpoint_x = 'http://172.16.10.114/SFSample/SFSample.asmx';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://tempuri.org/', 'Hello'};
        public String HelloWorld() {
            Hello.HelloWorld_element request_x = new Hello.HelloWorld_element();
            Hello.HelloWorldResponse_element response_x;
            Map<String, Hello.HelloWorldResponse_element> response_map_x = new Map<String, Hello.HelloWorldResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://tempuri.org/HelloWorld',
              'http://tempuri.org/',
              'HelloWorld',
              'http://tempuri.org/',
              'HelloWorldResponse',
              'Hello.HelloWorldResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.HelloWorldResult;
        }
    }
    public class HelloWorldResponse_element {
        public String HelloWorldResult;
        private String[] HelloWorldResult_type_info = new String[]{'HelloWorldResult','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
        private String[] field_order_type_info = new String[]{'HelloWorldResult'};
    }
}

 

 

Now how to call that Helloworld function to APEX triggers???

 

Thanks,

Krishna.