ASAP using .NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Massimo Bonanni

    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:

    [XmlTypeAttribut e(Namespace="ht tp://www.oasis-open.org/asap/0.9/asap.xsd")]
    [XmlRootAttribut e(Namespace="ht tp://www.oasis-open.org/asap/0.9/asap.xsd",
    IsNullable=fals e)]
    public class Request : SoapHeader
    {

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    public string ReplayTo;

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    public string From;

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    public string To;

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    public string MessageID;

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    public string Action;

    [XmlElementAttri bute(Form=XmlSc hemaForm.Qualif ied, DataType="anyUR I")]
    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>anyUR I</ReplayTo>
    <From>anyURI</From>
    <To>anyURI</To>
    <MessageID>anyU RI</MessageID>
    <Action>anyUR I</Action>
    <RelatesTo>anyU RI</RelatesTo>
    </Request>
    </soap:Header>

    This is wrong, because ASAP Header must be:

    <soap:Header>
    <ReplayTo>anyUR I</ReplayTo>
    <From>anyURI</From>
    <To>anyURI</To>
    <MessageID>anyU RI</MessageID>
    <Action>anyUR I</Action>
    <RelatesTo>anyU RI</RelatesTo>
    </soap:Header>

    Please, someone have a solution? Thank you.

    Max

  • François Lemaire

    #2
    RE: ASAP using .NET

    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.

    Comment

    Working...