function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChermaduraiChermadurai 

Reg: Webservice

Dear All,

 

I have WSDL file, now i need to call few functions on this..wat i need to do now..

 

i tried like this:

 

The WSDL file is:

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSDLRFC"
targetNamespace="http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds">
<wsdl:types>
<xsd:schema targetNamespace="http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds">
<xsd:element name="NewOperation">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="NewOperationResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="NewOperationRequest">
<wsdl:part element="tns:NewOperation" name="parameters"/>
</wsdl:message>
<wsdl:message name="NewOperationResponse">
<wsdl:part element="tns:NewOperationResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="WSDLRFC">
<wsdl:operation name="NewOperation">
<wsdl:input message="tns:NewOperationRequest"/>
<wsdl:output message="tns:NewOperationResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WSDLRFCSOAP" type="tns:WSDLRFC">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="NewOperation">
<soap:operation soapAction="http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WSDLRFC">
<wsdl:port binding="tns:WSDLRFCSOAP" name="WSDLRFCSOAP">
<soap:address location="http://www.example.org/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

 

Now,

 

Setup|Develop|Apex Class| Generate from WSDL | 

 

The following compile Error is occur:

 

//Generated by wsdl2apex

public class WebservicefromJava {
public class NewOperation_element {
public String in;
private String[] in_type_info = new String[]{'in','http://www.w3.org/2001/XMLSchema','string','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds','false','false'};
private String[] field_order_type_info = new String[]{'in'};
}
public class NewOperationResponse_element {
public String out;
private String[] out_type_info = new String[]{'out','http://www.w3.org/2001/XMLSchema','string','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds','false','false'};
private String[] field_order_type_info = new String[]{'out'};
}
public class WSDLRFCSOAP {
public String endpoint_x = 'http://www.example.org/';
public Map<String,String> inputHttpHeaders_x;
public Map<String,String> outputHttpHeaders_x;
public String clientCertName_x;
public String clientCert_x;
public String clientCertPasswd_x;
public Integer timeout_x;
private String[] ns_map_type_info = new String[]{'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds', 'WebservicefromJava'};
public String NewOperation(String in) {
WebservicefromJava.NewOperation_element request_x = new WebservicefromJava.NewOperation_element();
WebservicefromJava.NewOperationResponse_element response_x;
request_x.in = in;
Map<String, WebservicefromJava.NewOperationResponse_element> response_map_x = new Map<String, WebservicefromJava.NewOperationResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds/NewOperation',
'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds',
'NewOperation',
'http://192.168.0.61:8080/RFCServer/REST/WebService/GetFeeds',
'NewOperationResponse',
'WebservicefromJava.NewOperationResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.out;
}
}
}

 

Now Error Messge is:

The following generated class(es) have compilation errors:
Error: FeedService
Error: unexpected token: 'in' at 5:22

 

THanx in Advance..