468,306 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

ASAP using .NET

Hi, I try to implement ASAP protocol in my web service, but I find a very
hard problem.
I define my SOAP Header:

[XmlTypeAttribute(Namespace="http://www.oasis-open.org/asap/0.9/asap.xsd")]
[XmlRootAttribute(Namespace="http://www.oasis-open.org/asap/0.9/asap.xsd",
IsNullable=false)]
public class Request : SoapHeader
{

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string ReplayTo;

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string From;

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string To;

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string MessageID;

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string Action;

[XmlElementAttribute(Form=XmlSchemaForm.Qualified, DataType="anyURI")]
public string RelatesTo;
}

but when I view WSDL of my web service i find:

<soap:Header>
<Request xmlns="http://www.oasis-open.org/asap/0.9/asap.xsd">
<ReplayTo>anyURI</ReplayTo>
<From>anyURI</From>
<To>anyURI</To>
<MessageID>anyURI</MessageID>
<Action>anyURI</Action>
<RelatesTo>anyURI</RelatesTo>
</Request>
</soap:Header>

This is wrong, because ASAP Header must be:

<soap:Header>
<ReplayTo>anyURI</ReplayTo>
<From>anyURI</From>
<To>anyURI</To>
<MessageID>anyURI</MessageID>
<Action>anyURI</Action>
<RelatesTo>anyURI</RelatesTo>
</soap:Header>

Please, someone have a solution? Thank you.

Max

Nov 23 '05 #1
1 1374
If I understand well your requirements, I think you should have one header
for ReplayTo, one for From, etc., not one big header containing all the
others ; SOAP headers are the elements immediatly under the soap:Header tag,
thus ReplayTo is a different header from the From header, in my opinion.

Moreover, some of these headers look like WS-Addressing headers. If this is
the case, you must precise the namespace.

Regards

François

PS : if I'm wrong about the headers, try removing the XmlRoot attribute or
putting its ElementName field to "" ; by default, this attribute uses the
class name as element name for XML serialization.
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by whisper | last post: by
2 posts views Thread by AnuSree | last post: by
1 post views Thread by Mithun Verma | last post: by
reply views Thread by Chris | last post: by
2 posts views Thread by SC | last post: by
2 posts views Thread by archana | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.