The heart of my question is basically interoperability.  I am trying to compose a SOAP 
message by parsing a WSDL file and without any specific soap platform knowledge.  I 
have not seen any sort of matrix specifying what the various platform vendors require. 
 If the WSDL has the SOAP Action set, then naturally I assume this required.  But, the 
TargetObjectURI remains problematic to me. I have been using the namespace URI of the 
first child element of the body.  But this seems "squishy" in light of Scott's 
response below.

>From the response below...

If the soap:body namespace is of no use, then I am a bit confused about what to do.  
Not sure where a namespace can be explicitly specified in a message definition?  The 
soap:body and soap:header are the only tags with a namespace attribute.  Should I 
always use the wsdl:definition targetNamespace attribute?  I have found wsdls where 
the wsdl:definition targetNamespace and the soap:body namespace attibutes are 
different, so I am a bit confused about that.

Hopefully, I am not the only one clueless about this and others face the same issue or 
similar issue.


Steve Pruitt




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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
[EMAIL PROTECTED]

Reply via email to