0

我有一个 SAP Ariba 端的集成工作,我需要通过以下方式满足 C# SOAP Web Service 端的请求。我想知道我可以做什么?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.040/cXML.dtd">
<cXML payloadID="1539050765.0492@example.com" timestamp="2018-10-09T02:06:05+00:00">
  <Header>
    <From>
      <Credential domain="NetworkId">
        <Identity>buyer</Identity>
      </Credential>
    </From>
    <To>
      <Credential domain="DUNS">
        <Identity>acme</Identity>
      </Credential>
    </To>
    <Sender>
      <Credential domain="NetworkId">
        <Identity>buyer</Identity>
        <SharedSecret>jd8je3$ndP</SharedSecret>
      </Credential>
      <UserAgent>Application Name v1.2.3</UserAgent>
    </Sender>
  </Header>
  <Request deploymentMode="production">
    <PunchOutSetupRequest operation="create">
      <BuyerCookie>550bce3e592023b2e7b015307f965133</BuyerCookie>
      <Extrinsic name="UserEmail">jdoe@example.com</Extrinsic>
      <Extrinsic name="FirstName">John</Extrinsic>
      <Extrinsic name="LastName">Doe</Extrinsic>
      <Extrinsic name="PhoneNumber">555-555-5555</Extrinsic>
      <BrowserFormPost>
        <URL>https://example.com/cxml_cart</URL>
      </BrowserFormPost>
      <ShipTo>
        <Address addressID="TEST">
          <Name xml:lang="en">My Address</Name>
          <PostalAddress>
            <Street>123 Street Address</Street>
            <City>Mountain View</City>
            <State>CA</State>
            <PostalCode>94040</PostalCode>
            <Country isoCountryCode="US">US</Country>
          </PostalAddress>
        </Address>
      </ShipTo>
    </PunchOutSetupRequest>
  </Request>
</cXML>

我可以尽可能接近并接收的请求示例如下。在这里,我需要能够在没有 Body 和 Envelope 标签的情况下满足请求

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <cXML xmlns="http://tempuri.org/">
            <!-- Optional -->
            <Header>
                <!-- Optional -->
                <From>
                    <!-- Optional -->
                    <From>
                        <!-- Optional -->
                        <Credential>
                            <!-- Optional -->
                            <Identity>
                                <Identity>[string?]</Identity>
                            </Identity>
                            <SharedSecret>[string?]</SharedSecret>
                            <!-- Optional -->
                            <CredentialMac>
                                <CredentialMac>[string?]</CredentialMac>
                            </CredentialMac>
                            <UserAgent>[string?]</UserAgent>
                        </Credential>
                    </From>
                </From>
                <!-- Optional -->
                <To>
                    <!-- Optional -->
                    <To/></To>
                <!-- Optional -->
                <Sender>
                    <!-- Optional -->
                    <Sender/>
                    <Sender>[string?]</Sender>
                </Sender>
            </Header>
            <!-- Optional -->
            <Request/>
        </cXML>
    </Body>
</Envelope>
4

0 回答 0