You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Steve Pruitt <SP...@exstream.com> on 2003/07/15 15:54:21 UTC

TargetObjectURI

All,

How do you determine what WSDL value to use for setting the TargetObjectURI?  I am parsing a WSDL file at runtime and dynamically building the call.  With Apache I have been using the namespace from the soap body extension.  But, what if the SOAP platform is unknown?  I have looked at various WSDL files.  Sometimes the namespace attibute is not provided.  What is used in this case?  Are there any conventions?  This is all still murky to me.


-Steve Pruitt
spruitt@exstream.com

Re: TargetObjectURI

Posted by Scott Nichol <sn...@scottnichol.com>.
The TargetObjectURI is always the namespace of the element representing the SOAP call.  For example, in the envelope

 
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
                      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:helloString xmlns:ns1="urn:hello1"
        SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<name xsi:type="xsd:string">Bill</name>
</ns1:helloString>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
the TargetObjectURI is "urn:hello1".

In WSDL, the namespace attribute of the soap:body element for a binding *may* be supplied, although the WSDL 1.1 spec says "the namespace attribute only applies to content not explicitly defined by the abstract types".  Therefore, in most WSDL, I do not think this should be of use, because the messages for operations are themselves in namespaces, which are the TargetObjectURI.  The namespace may be explicitly specified in the message definition, or it may be implied by the targetNamespace attribute on an enclosing element, typically the wsdl:definition element.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Steve Pruitt" <SP...@exstream.com>
To: <so...@ws.apache.org>
Sent: Tuesday, July 15, 2003 9:54 AM
Subject: TargetObjectURI


All,

How do you determine what WSDL value to use for setting the TargetObjectURI?  I am parsing a WSDL file at runtime and dynamically building the call.  With Apache I have been using the namespace from the soap body extension.  But, what if the SOAP platform is unknown?  I have looked at various WSDL files.  Sometimes the namespace attibute is not provided.  What is used in this case?  Are there any conventions?  This is all still murky to me.


-Steve Pruitt
spruitt@exstream.com