Hi,
I'm currently evaluating SmartGWT for purchase in the near future, and a very important capability I'm interested in is the WSDL Binding capability. This question is generic and isn't specific to any code sample, SmartGWT version or WSDL.
I'm dealing with a WSDL for a third party web service, where I don't have access to make changes to the schema. In order to authenticate with the web service, each SOAP request needs to include the following header:
My understanding is that this is a fairly standard WSSE security header. It's standard enough that it isn't explicitly defined in the WSDL schema.
If I were to use SOAP-UI, the instructions to perform this operation are specified here: http://www.soapui.org/soap-and-wsdl/authenticating-soap-requests.html. By simply setting, the username, password and 'WSS-Password Type' field to "PasswordText" SOAP-UI is intelligent enough to generate and use the header automatically.
Digging through the Javadoc, I'd assume that the header could be set using:
Since the WSDL doesn't define this header, and it isn't defined in a physical xsd file, adding a username field to the header data will yield the following response:
Failing to enter the header in the SOAP message yields an error (summarized):
I've looked at the Salesforce example hiding in the Smartclient zip file, and it doesn't provide the information I need. It uses a very specific login, log off capability clearly defined in the WSDL, and my WSDL uses a more generic authentication. Also, I am trying to evaluate SmartGWT and not SmartClient, so a Java based solution would be better.
Does SmartGWT provide a way to specify this SOAP-UI style of authentication header (knowing that it is not explicitly defined in the WSDL)? In the worst case, I would fine entering manual text as the header section rather than using the xml serialization.
I think this question is generic enough across multiple projects and WSDLs.
What is the recommended way to authenticate SOAP requests with SmartGWT?
I'm currently evaluating SmartGWT for purchase in the near future, and a very important capability I'm interested in is the WSDL Binding capability. This question is generic and isn't specific to any code sample, SmartGWT version or WSDL.
I'm dealing with a WSDL for a third party web service, where I don't have access to make changes to the schema. In order to authenticate with the web service, each SOAP request needs to include the following header:
Code:
<soapenv:Header> <wsse:Security mustUnderstand="1"> <wsse:UsernameToken wsu:Id="Example-1"> <wsse:Username> ... </wsse:Username> <wsse:Password Type="..."> ... </wsse:Password> <wsse:Nonce EncodingType="..."> ... </wsse:Nonce> <wsu:Created> ... </wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header>
If I were to use SOAP-UI, the instructions to perform this operation are specified here: http://www.soapui.org/soap-and-wsdl/authenticating-soap-requests.html. By simply setting, the username, password and 'WSS-Password Type' field to "PasswordText" SOAP-UI is intelligent enough to generate and use the header automatically.
Digging through the Javadoc, I'd assume that the header could be set using:
Code:
WSRequest.setHeaderData()
Code:
headerData passed for SOAP header partName: Username, no schema available, not outputting
Code:
<faultstring>Security Requirements not met - No Security header in message</faultstring>
Does SmartGWT provide a way to specify this SOAP-UI style of authentication header (knowing that it is not explicitly defined in the WSDL)? In the worst case, I would fine entering manual text as the header section rather than using the xml serialization.
I think this question is generic enough across multiple projects and WSDLs.
What is the recommended way to authenticate SOAP requests with SmartGWT?
Comment