SOAP WSDL Generate Code

OneClickForAppBindingV3 / retrievePageFormats

ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
$oXml = ObjCreate("Chilkat.Xml")
$oXml.Tag = "soapenv:Envelope"
$oXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
$oXml.AddAttribute("xmlns:v3","http://oneclickforapp.dpag.de/V3")
$oXml.UpdateChildContent "soapenv:Header",""
$oXml.UpdateChildContent "soapenv:Body|v3:RetrievePageFormatsRequest",""

; In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
$oXml.EmitXmlDecl = False
Local $soapRequestBody = $oXml.GetXml()

Local $sEndpoint = "https://internetmarke.deutschepost.de/OneClickForApp/OneClickForAppServiceV3/OneClickForAppV3EJB"
Local $soapAction = " "
;  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
Local $sContentType = "text/xml"

$oHttp = ObjCreate("Chilkat.Http")

$oHttp.ClearHeaders 
$oHttp.SetRequestHeader "Content-Type",$sContentType
$oHttp.SetRequestHeader "SOAPAction",$soapAction

Local $oResp = $oHttp.PostXml($sEndpoint,$soapRequestBody,"utf-8")
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    ConsoleWrite("Failed to send SOAP request." & @CRLF)
    Exit
EndIf

; Get the XML response body.
$oResponseXml = ObjCreate("Chilkat.Xml")
$oResp.GetBodyXml($oResponseXml)

Local $iStatusCode = $oResp.StatusCode
ConsoleWrite("response status code: " & $iStatusCode & @CRLF)

; If the status code does not indicate succcess, then show the response XML,
; which probably contains error information.
If ($iStatusCode <> 200) Then
    ConsoleWrite($oResponseXml.GetXml() & @CRLF)
    Exit
EndIf

ConsoleWrite($oResponseXml.GetXml() & @CRLF)

; Parse the successful SOAP response XML.

; This is a sample of the response XML, but the namespace prefixes will be different.
; We can parse the result using "*" for the namespace prefixes (see below).

Local $sId = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:id")
Local $sIsAddressPossible = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:isAddressPossible")
Local $sIsImagePossible = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:isImagePossible")
Local $sName = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:name")
Local $sDescription = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:description")
Local $sPageType = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageType")
Local $sX = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:size|*:x")
Local $sY = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:size|*:y")
Local $sOrientation = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:orientation")
$sX = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:labelSpacing|*:x")
$sY = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:labelSpacing|*:y")
Local $sLabelX = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:labelCount|*:labelX")
Local $sLabelY = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:labelCount|*:labelY")
Local $sTop = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:margin|*:top")
Local $sBottom = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:margin|*:bottom")
Local $sLeft = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:margin|*:left")
Local $sRight = $oResponseXml.GetChildContent("*:Body|*:RetrievePageFormatsResponse|*:pageFormat|*:pageLayout|*:margin|*:right")
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="http://oneclickforapp.dpag.de/V3">
    <soapenv:Header/>
    <soapenv:Body>
        <v3:RetrievePageFormatsRequest/>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="http://oneclickforapp.dpag.de/V3">
    <soapenv:Header/>
    <soapenv:Body>
        <v3:RetrievePageFormatsResponse>
            <v3:pageFormat>
                <v3:id>int</v3:id>
                <v3:isAddressPossible>true</v3:isAddressPossible>
                <v3:isImagePossible>true</v3:isImagePossible>
                <v3:name>string</v3:name>
                <v3:description>string</v3:description>
                <v3:pageType>REGULARPAGE</v3:pageType>
                <v3:pageLayout>
                    <v3:size>
                        <v3:x>456.00</v3:x>
                        <v3:y>456.00</v3:y>
                    </v3:size>
                    <v3:orientation>LANDSCAPE</v3:orientation>
                    <v3:labelSpacing>
                        <v3:x>456.00</v3:x>
                        <v3:y>456.00</v3:y>
                    </v3:labelSpacing>
                    <v3:labelCount>
                        <v3:labelX>int</v3:labelX>
                        <v3:labelY>int</v3:labelY>
                    </v3:labelCount>
                    <v3:margin>
                        <v3:top>456.00</v3:top>
                        <v3:bottom>456.00</v3:bottom>
                        <v3:left>456.00</v3:left>
                        <v3:right>456.00</v3:right>
                    </v3:margin>
                </v3:pageLayout>
            </v3:pageFormat>
        </v3:RetrievePageFormatsResponse>
    </soapenv:Body>
</soapenv:Envelope>