यहाँ है कि मैं क्या WebServiceCallout.invoke के लिए अब तक की खोज की है:
Object servicePort - A class with the following variables:
String enpoint_x: containing the service endpoint (not sure if necessary)
Map<String,String> inputHttpHeaders_x: custom httpHeaders
Map<String,String> outputHttpHeaders_x: I think this is the httpHeaders that were returned
String clientCertName_x: Used in configuring an SSL cert?
String clientCert_x: Used in configuring an SSL cert?
String clientCertPassword: Used in configuring an SSL cert?
Integer timeout_x: How long (in milliseconds?) to wait for the response
String[] ns_map_type_info: The first String is the namespace of the service schema, the second is the name of the object that contains the Apex classes defining the schema objects
Object request_x - The Apex object that will form the XML schema object
Map<String, Object> response_map_x - Object is the object that the result is to be unserialized into. String is the name of Object variable.
String[] {
endpoint - The service endpoint
soapAction - If the service call requires a soapAction, put it here. Otherwise leave blank.
methodSchema - Schema for the request object
method - Name of the request method
responseSchema Schema for the response
responseClass The Apex class that the response will be unserialized into
}
इसके अलावा, साबुन हेडर servicePort वर्ग में एक वस्तु बनाने के साथ-साथ एक ही चर नाम के साथ एक स्ट्रिंग द्वारा डाला जा सकता है + "_hns" है कि उस वस्तु के लिए नाम स्थान निर्दिष्ट करता है:
public SoapSecurity Security;
private String Security_hns = "Security=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
सुप्रीम XML स्कीमा वस्तुओं प्रत्येक बच्चे तत्व (या विशेषता) के लिए चर शामिल करना चाहिए। Arrays जिनके परिवर्तनीय नाम कुछ पैटर्न से मेल खाते हैं परिभाषित करते हैं कि एक्सएमएल में ऑब्जेक्ट चर का उपयोग कैसे किया जाता है।
को देखते हुए दिए उदाहरण में XML:
चर हैं:
public class MyService {
public class bar {
public String bar;
private String[] bar_type_info = new String[] {'bar','http://www.w3.org/2001/XMLSchema','string','0','1','true'};
private String[] apex_schema_type_info = new String[] {'http://schema.myservice.com', 'false', 'false'};
private String[] field_order_type_info = new String[] {'bar'};
}
public class foo {
public MyService.bar bar;
public String a;
private String[] bar_type_info = new String[] {'bar','http://schema.myservice.com','bar','0','1','true'};
private String[] a_att_info = new String[] {'a'};
private String apex_schema_type_info = new String[] {'http://schema.myservice.com','false','false'};
private String[] field_order_type_info = new String[] {'bar'};
}
}
यहाँ एक (संक्षिप्त) इन वस्तुओं का टूटना है:
<foo a="b"><bar>baz</bar></foo>
एपेक्स कक्षाएं कुछ इस तरह होगा एक और एक्सएमएल तत्व या एक पाठ नोड का प्रतिनिधित्व करता है, तो एक मिलान _type_info स्ट्रिंग [] उदाहरण के लिए होना चाहिए bar_type_info। इस सरणी के तत्व हैं: 1. XML तत्व नाम 2. स्कीमा 3. एक्सएमएल प्रकार 4. minOccurs 5. maxOccurs (सेट करने के लिए '-1' असीम के लिए) 6. isNillable
हैं चर एक विशेषता का प्रतिनिधित्व करता है, फिर एक मिलान _att_info स्ट्रिंग [] उदाहरण होना चाहिए a_type_info। इसमें बस विशेषता का एक्सएमएल नाम शामिल है।
ध्यान दें कि यदि एक वर्ग चर नाम एक आरक्षित शब्द है, तो _x इसमें संलग्न है उदा। bar_x। यह अन्य चर नामों को प्रभावित करेगा: bar_x_type_info। एपेक्स डेवलपर गाइड नामों के लिए अपने नियम बताती है, लेकिन यदि आप इसे मैन्युअल रूप से बना रहे हैं, तो मुझे लगता है कि आप इसे जो भी नाम चाहते हैं उसे दे सकते हैं - सरणी एक्सएमएल तत्व का नाम निर्धारित करती है ...
मुझे कोई रास्ता नहीं मिला है एक साधारण एक्सएमएल प्रकार का प्रतिनिधित्व करने के लिए जिसमें एक विशेषता भी शामिल है: उदाहरण के लिए 1. स्कीमा 2. 'सही' यदि elementFormDefault = "योग्य" 3:
<foo bar="baz">bar</foo>
apex_schema_type_info सरणी XML तत्व वर्ग का प्रतिनिधित्व करती बारे में जानकारी निर्दिष्ट करता है।'true' अगर विशेषता FormDefault = "योग्य"
मैं अभी भी 2 और 3 वास्तव में ऐसा करने पर अस्पष्ट हूं, लेकिन ऐसा लगता है कि बाल तत्व (और गुण) माता-पिता नामस्थान का उत्तराधिकारी कैसे हैं (चाहे यह निहित है या होना चाहिए परिणामी एक्सएमएल में निर्दिष्ट)।
field_order_type_info बस बाल तत्वों का क्रम निर्दिष्ट करता है।
कृपया सही या स्पष्ट करने के लिए स्वतंत्र लग रहा है ...
क्या आपको ' बार 'अनुरोध एक्सएमएल उत्पन्न करने का कोई तरीका पता चला? @ जेरेमी –
Jair
मुझे डर नहीं है। मैं वर्तमान में बिक्री बल एकीकरण पर काम नहीं कर रहा हूं, मुझे लगता है कि इसे संबोधित किया गया है, लेकिन मुझे वास्तव में पता नहीं है। – Jeremy
धन्यवाद। मुझे लगता है कि यह अभी भी अस्तित्व में है। – Jair