dw.ws
Class WebReference2

Represents a web service defined in a WSDL file. The implementation is backed by a JAX-WS framework.
The messages sent to and from the remote server are logged at DEBUG level on sandboxes, and not logged at all on production.
The custom log category used is derived from the WSDL name and message type. For example, the custom log categories for the file
This implementation does not support RPC/encoded
WSDLs. Such a WSDL must be migrated to a
supported encoding such as Document/literal
to work with this API.
To create an instance of a WebReference2, you put a web service WSDL file in the webreferences2
directory and reference the WSDL file in a B2C Commerce Script. You then request the service Port
using one the the get service methods. For example, if your WSDL file is MyWSDL.wsdl
,
here is how you create an instance of WebReference2 and access the Port:
var webref : WebReference2 = webreferences2.MyWSDL;
var port : Port = webref.getDefaultService();
Note that all script classes representing your WSDL file are placed in the webreferences2
package. To use classes in the webreferences2
package, you do not need to use the importPackage
statement in your B2C Commerce Script file.
The generated API may be customized via a property file named <WSDLFile>.properties
.
For example, if your WSDL file is MyWSDL.wsdl
, the property file name is MyWSDL.wsdl.properties
.
Supported properties include:
Name | Type | Description |
---|---|---|
namespace |
boolean |
If the WSDL contains different types with the same name a compilation error may occur. Set this to true to
generate a namespace-aware Port, which will have classes separated into packages based on their associated namespace.
The default value is false |
underscoreBinding |
string |
If you have elements in a WSDL schema that contain the underscore character, code generation may fail. Set this property
to asCharInWord to resolve the problem. The default value is asWordSeparator . |
collectionType |
string |
The generated API will use array types instead of List types for collections when this value is set to
indexed . This results in code that is more compatible with older webreferences -based
implementations. The default behavior is to generate Lists.
|
enableWrapperStyle |
boolean |
The generated API will use "bare" methods when this is false . When this is true ,
"wrapped" methods may be generated instead. The default value is true , but a false
value is more compatible with older webreferences -based implementations. |
MyWSDL.wsdl
are webreferences2.MyWSDL.request
and webreferences2.MyWSDL.response
. This
logging is controlled by the following in the WSDL properties:
Name | Type | Description |
---|---|---|
logging.enabled |
boolean |
true to explicitly allow logging, false to disallow. Default is true on Sandboxes
and false on all other instance types |
logging.pretty |
boolean |
true to pretty-print the SOAP XML. Default is false to log the actual message body. |
logging.verbose |
boolean |
true to log HTTP headers and other message information. Default is false to only log the
message body |
logging.filter.elements |
comma-separated string |
List of element tag names containing sensitive information. These will be filtered out of the message. All properties with
this prefix will be used. For example logging.filter.elements=Password,Token is equivalent to two different properties
logging.filter.elements.01=Token and logging.filter.elements.02=Token
|
logging.filter.headers |
comma-separated string |
List of message header names containing sensitive information. These will be filtered out of the message. All properties with
this prefix will be used. For example logging.filter.headers=Authorization,Token is equivalent to two different properties
logging.filter.headers.01=Authorization and logging.filter.headers.02=Token
|
Properties
defaultService
:
Port
(Read Only)
The default service endpoint interface port of the web reference. The default service is
determined as the first service based on the alphabetic order of the service name, and within
the service the first SOAP port based on the alphabetic order of the port name.
Constructor Summary
Method Summary
getDefaultService()
:
Port
Returns the default service endpoint interface port of the web reference.
getService(service
:
String, portName
:
String)
:
Port
Returns a specific service from this web reference.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
getDefaultService
getDefaultService()
:
Port
Returns the default service endpoint interface port of the web reference. The default service is
determined as the first service based on the alphabetic order of the service name, and within
the service the first SOAP port based on the alphabetic order of the port name.
Returns:
the default service of the web reference.