• Jason Gelsomino 9
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Hello, 

I am trying to create a webservice call to an external system using APEX. I went and created the class from the WSDL using Fuse It. Then I created the VF page where I added a simple text input field and a output field for the response. I am having difficulty writing the controller to make this all work. 

Here is the code I have thus far:

VF Page
<apex:page controller="WebserviceCall">
  <apex:form >
     <apex:pageBlock >
         <apex:commandButton action="[!hello}" value="Initiate Webservice Call"/> <br/><br/>
         Drug Name: <apex:inputText value="{!ListProductNames}"/> <br/><br/>
         
         Product Name Output -- <apex:outputText value="{!ListProductNames}"/>
     </apex:pageBlock> 
  </apex:form>
</apex:page>
Controller
public with sharing class WebserviceCall {

    public String ListProductNames { get; set; }

   public String productName { get; set; }
 public Double message {get; private set;}

  public PageReference hello() {    
    gsddGoldstandardCom.ListProductNames  stub = new       gsddGoldstandardCom.ListProductNames();
    message = stub.ListProductNames(productName );
        return null;
    }

}

Class generated by Fuse IT
 
public gsddGoldstandardCom.ListProductNames_element ListProductNames(String NameFilter,Integer MaxResultsReturned) {
			gsddGoldstandardCom.ListProductNamesRequest_element request_x = new gsddGoldstandardCom.ListProductNamesRequest_element();
			gsddGoldstandardCom.ListProductNames_element response_x;
			request_x.NameFilter = NameFilter;
			request_x.MaxResultsReturned = MaxResultsReturned;
			Map<String, gsddGoldstandardCom.ListProductNames_element> response_map_x = new Map<String, gsddGoldstandardCom.ListProductNames_element>();
			response_map_x.put('response_x', response_x);
			WebServiceCallout.invoke(
				this,
				request_x,
				response_map_x,
				new String[]{endpoint_x,
				'urn:ListProductNames',
				'http://gsdd.goldstandard.com/',
				'ListProductNamesRequest',
				'http://gsdd.goldstandard.com/',
				'ListProductNames',
				'gsddGoldstandardCom.ListProductNames_element'}
			);
			response_x = response_map_x.get('response_x');
			return response_x;
		}

Any thoughts would be appreciated!!!!

Thanks
 
I am fairly new to development and need some assistance displaying data in a table on a VF page. The data is contained in a custom object called medication. The object is a related list to Case. I need to show the medication data in a table that pertains to a specific case. I am pretty sure this can be accomplished relatively easily but I can't seem to figure it out. Any assistance would be helpful? 
Hello, 

I am trying to create a webservice call to an external system using APEX. I went and created the class from the WSDL using Fuse It. Then I created the VF page where I added a simple text input field and a output field for the response. I am having difficulty writing the controller to make this all work. 

Here is the code I have thus far:

VF Page
<apex:page controller="WebserviceCall">
  <apex:form >
     <apex:pageBlock >
         <apex:commandButton action="[!hello}" value="Initiate Webservice Call"/> <br/><br/>
         Drug Name: <apex:inputText value="{!ListProductNames}"/> <br/><br/>
         
         Product Name Output -- <apex:outputText value="{!ListProductNames}"/>
     </apex:pageBlock> 
  </apex:form>
</apex:page>
Controller
public with sharing class WebserviceCall {

    public String ListProductNames { get; set; }

   public String productName { get; set; }
 public Double message {get; private set;}

  public PageReference hello() {    
    gsddGoldstandardCom.ListProductNames  stub = new       gsddGoldstandardCom.ListProductNames();
    message = stub.ListProductNames(productName );
        return null;
    }

}

Class generated by Fuse IT
 
public gsddGoldstandardCom.ListProductNames_element ListProductNames(String NameFilter,Integer MaxResultsReturned) {
			gsddGoldstandardCom.ListProductNamesRequest_element request_x = new gsddGoldstandardCom.ListProductNamesRequest_element();
			gsddGoldstandardCom.ListProductNames_element response_x;
			request_x.NameFilter = NameFilter;
			request_x.MaxResultsReturned = MaxResultsReturned;
			Map<String, gsddGoldstandardCom.ListProductNames_element> response_map_x = new Map<String, gsddGoldstandardCom.ListProductNames_element>();
			response_map_x.put('response_x', response_x);
			WebServiceCallout.invoke(
				this,
				request_x,
				response_map_x,
				new String[]{endpoint_x,
				'urn:ListProductNames',
				'http://gsdd.goldstandard.com/',
				'ListProductNamesRequest',
				'http://gsdd.goldstandard.com/',
				'ListProductNames',
				'gsddGoldstandardCom.ListProductNames_element'}
			);
			response_x = response_map_x.get('response_x');
			return response_x;
		}

Any thoughts would be appreciated!!!!

Thanks
 
I am fairly new to development and need some assistance displaying data in a table on a VF page. The data is contained in a custom object called medication. The object is a related list to Case. I need to show the medication data in a table that pertains to a specific case. I am pretty sure this can be accomplished relatively easily but I can't seem to figure it out. Any assistance would be helpful? 
Hello, 

I am looking for some live projects to gain experience with real time project scenarios . I am certified with Salesforce Developer Platform 1 and have knowledge with most of the Salesforce components . I would also be interested in the projects from non-profit organisations 

Thanks in Advance !!
Hi,

I am Prasant.I am new to salesforce developemnet.I have learnet most of the salesforce concepts like Apex,triggers,API's and salesforce customization.I have practiced with varuous uses cases form this forum.However i still don't have experience of a full time project.So if any body can help me in this context.

Thanks in advance,
Prasant