[Answer and more Qs] Namespaces in WSDL and SOAP
[Answer and more Qs] Namespaces in WSDL and SOAP
- Subject: [Answer and more Qs] Namespaces in WSDL and SOAP
- From: Corin Lawson <email@hidden>
- Date: Mon, 5 Jun 2006 18:28:51 +1000
It can't be done (but here's how to do it), according to http://
en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/Problems
Francis Labrie
Problem: A DirectToWebService defined Web Services can't return a
WSDL with custom values for properties like namespaces and
definitions name. Worse, the generated namespace can even contains
WebObjects application instance number or the wrong hostname.
Solution: Base on a tips from DarelLee, I've found in the
com.webobjects.webservices.generation._private.WOWSDLTemplate class
some extras key definitions read from the user.d2wmodel
DirectToWebService rule file. For instance:
serviceLocationURL: a key that allow the setting of the location
URL for an operation. This is usefull if you need your WebServices
to be reached using a secure HTTPS reference;
WSDLDefinitionName: a key that allow the definitions name change.
So instead of having "ServiceNameDefinition", you can set this value;
WSDLTargetNamespace: a key that allow the namespace change. This is
the most usefull: you can avoid dynamic generation depending on
WebObjectsHTTPAdaptor? with this.
Here is an example of rule definition changing the above values:
(serviceName="Service") ->
WSDLTargetNamespace="https://host.net/cgi-bin/Service.woa/ws/
Service"
(serviceName="Service") ->
WSDLDefinitionName="AnotherDefinition"
((operationName="anOperation") and (serviceName="Service")) ->
serviceLocationURL="https://host.net/cgi-bin/Service.woa/ws/
Service"
On 05/06/2006, at 3:37 PM, Corin Lawson wrote:
Hi,
How do I (partly) customize the target namespace of the definitions
element in a wsdl doc generated by WO (5.2.4) and the corresponding
ns used in soap messages to and from services described in that
wsdl doc?
I find this in the wsdl doc generated:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://host/cgi-bin/WebObjects/
AppName.woa/1/ws/ServiceName" xmlns:impl="http://host/cgi-bin/
WebObjects/AppName.woa/1/ws/ServiceName" xmlns:intf="http://host/
cgi-bin/WebObjects/AppName.woa/1/ws/ServiceName" ...
Why does is have those redundant ns (impl and intf)?
In soap messages I find:
... <ns1:operationNameResponse ... xmlns:ns1="http://host/cgi-bin/
WebObjects/AppName.woa/1/ws/ServiceName"> ...
I need to customize that also.
In the very least I need to remove the instance number.
Please Help.
Corin.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden