aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Clarification sought on the Basic profile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Clarification sought on the Basic profile" Watch "Clarification sought on the Basic profile" New topic
Author

Clarification sought on the Basic profile

Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
I have some clarification confusion on interpretting some basic profile statements .

1.
The media type of a MESSAGE's envelope MUST indicate the correct character encoding, using the charset parameter.
Where is the media type defined in a MESSAGE envelope. ?

2.A DESCRIPTION containing WSDL extensions MUST NOT use them to contradict other requirements of the Profile.

What are WSDL extensions ?

3.The target namespace for WSDL definitions and the target namespace for schema definitions in a DESCRIPTION MAY be the same

Can some one show me an example for number "3".

4. A document-literal binding in a DESCRIPTION MUST, in each of its soapbind:body element(s), have at most one part listed in the parts attribute, if the parts attribute is specified.

What is the parts attribute .. Is it referring to part in the message element ?
I didnt see any parts attribute in RMH .. .

5.A wsdl:binding in a DESCRIPTION MUST use the attribute named part with a schema type of "NMTOKEN" on all contained soapbind:header and soapbind:headerfault elements.
6. A wsdl:binding in a DESCRIPTION MUST NOT use the attribute named parts on contained soapbind:header and soapbind:headerfault elements.

The query I have is parts attr not to be used yet it is defined in soapbind:body element containing soapbind:header
CORRECT:

<binding name="StockQuoteSoap" type="tns:StockQuotePortType">
<soapbind:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="SubscribeToQuotes">
<input message="tns:SubscribeToQuotes">
<soapbind:body parts="body" use="literal"/>
<soapbind:header message="tns:SubscribeToQuotes"
part="subscribeheader" use="literal"/>
</input>
</operation>
</binding>


7 .A DESCRIPTION MAY use any construct from XML Schema 1.0.


When it states a description may use any construct .. does it mean any elements from the XML Scheme can be used to represent any element in the definition.


Thanks
Dhiren
Richard Monson-Haefel
author
Ranch Hand

Joined: Oct 31, 2003
Posts: 92
Originally posted by Dhiren Joshi:
I have some clarification confusion on interpretting some basic profile statements .

1.
The media type of a MESSAGE's envelope MUST indicate the correct character encoding, using the charset parameter.
Where is the media type defined in a MESSAGE envelope. ?



I think they are refering to the XML encoding which may be UTF-8 or UTF-16. You can find this in the XML declaration - if there is one. If there isn't, than its assumed to be UTF-8

e.g <?xml version="1.0" encoding="UTF-8"?>



2.A DESCRIPTION containing WSDL extensions MUST NOT use them to contradict other requirements of the Profile.

What are WSDL extensions ?




An extension is a set of elements that are used in combination with the WSDL binding element. For example, the soap peration element is part of the SOAP extension. Basically an extension provide protocol or encoding specific information to a WSDL document.



3.The target namespace for WSDL definitions and the target namespace for schema definitions in a DESCRIPTION MAY be the same

Can some one show me an example for number "3".




In the following example the targetNamespace attribute of the WSDL document and XML Schema document fragment (in side the WSDL:types element) are the same. This is allowed. They can also be different.




4. A document-literal binding in a DESCRIPTION MUST, in each of its soapbind:body element(s), have at most one part listed in the parts attribute, if the parts attribute is specified.

What is the parts attribute .. Is it referring to part in the message element ?
I didnt see any parts attribute in RMH .. .



Hmm... that looks like a new requirment. You can see examples of this in the RMH book on pages 813 and 814. I'll check into a post more later.



5.A wsdl:binding in a DESCRIPTION MUST use the attribute named part with a schema type of "NMTOKEN" on all contained soapbind:header and soapbind:headerfault elements.
6. A wsdl:binding in a DESCRIPTION MUST NOT use the attribute named parts on contained soapbind:header and soapbind:headerfault elements.

The query I have is parts attr not to be used yet it is defined in soapbind:body element containing soapbind:header
CORRECT:

<binding name="StockQuoteSoap" type="tns:StockQuotePortType">
<soapbind:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="SubscribeToQuotes">
<input message="tns:SubscribeToQuotes">
<soapbind:body parts="body" use="literal"/>
<soapbind:header message="tns:SubscribeToQuotes"
part="subscribeheader" use="literal"/>
</input>
</operation>
</binding>


7 .A DESCRIPTION MAY use any construct from XML Schema 1.0.


When it states a description may use any construct .. does it mean any elements from the XML Scheme can be used to represent any element in the definition.



It means that any valid W3C XML Schema type, be it a simple type or a complex type, can be used in a WSDL document. That means all the built-in simple types and any custom types that you or someone else defines.




Thanks
Dhiren


-- <br />Richard Monson-Haefel<br /><a href="http://www.Monson-Haefel.com" target="_blank" rel="nofollow">http://www.Monson-Haefel.com</a>
Richard Monson-Haefel
author
Ranch Hand

Joined: Oct 31, 2003
Posts: 92
Originally posted by Dhiren Joshi:
I have some clarification confusion on interpretting some basic profile statements .

4. A document-literal binding in a DESCRIPTION MUST, in each of its soapbind:body element(s), have at most one part listed in the parts attribute, if the parts attribute is specified.


Ok, if you are using attachments with a SOAP message than its possible that the attachment will be one of the part elmeents of a message defintion, in which case you don't want to include it in the body when doing the bindings. So, you can specify which <part> defintions of the <message> element are part of the body. In the case of document/literal binding only one <part> of a message may be the body, because a doc/lit message may contain only one paramter, the XML document fragment. This is explained in detail in Appendix G of the RMH book.
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Thanks for the clarification Richard.

Dhiren
Jack Zhou
Ranch Hand

Joined: Dec 27, 2003
Posts: 93
From Basic Profile Version 1.0

4.1.11 Acceptable SOAP Character Encodings
The Profile requires all XML processors are required support the "UTF-8" and "UTF-16" character encodings, in order to aid interoperability.

As a consequence of this, in conjunction with SOAP 1.1's requirement to use the text/xml media type (which has a default character encoding of "us-ascii"), the charset parameter must always be present on the SOAP envelope's media type. A further consequence of this is that the encoding pseudo-attribute of XML declaration within the message is always ignored, in accordance with the requirements of both XML 1.0 and RFC3023, "XML Media Types".

R1012 A MESSAGE MUST be serialized as either UTF-8 or UTF-16.

R1018 The media type of a MESSAGE's envelope MUST indicate the correct character encoding, using the charset parameter. C

When SOAP is used with the HTTP binding, the media type is carried in the Content-Type HTTP header field.



For soap over http binding, the media type appears to refer to HTTP header Content-Type that indicates internet media type of the request or response data.


Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA
 
 
subject: Clarification sought on the Basic profile