Testing Sender HTTP URL

Hi All,
I am trying to test the sendeer HTTP URL , when i add the URL in IE and try to open the page , it asks me to enter the userid and pwd details of the XI server . Once i have added the details and press enter , the page doesnt get directed anywhere . It just remains static.
Does this mean that the URL is working fine and we can provide this to the sender side ??
Target URL is of the format:
http://XIDEVServerAddres:port/sap/xi/adapter_plain?namespace=urn:sap-com:document:sap:idoc:messages&interface=IDOC_NAME&service=TEST&party=&agency=&scheme=&QOS=EO
Regards
Vinay P.

PS : I have generated the target URL using HTTP client tool

Similar Messages

  • Sender http adapter - decoding (URL unescape)

    PI 7.0
    Incoming http request in XI is URL decoded. Currently I am using java mapping to decode it. Is there a way to set any adapter specific properties in sender http adater so that I can avoid the java mapping for decoding. Or any settings in SICF? In other words, how can XI handle encoded http requests?
    When XI makes a external http request, I can set a property "Mask Special Charcters (URL Escaping)" in the receiver http adapter. XI will make a encoded http request, meaning the xml will encoded in UT-8.

    Hi Ted,
    I'm currently trying to do something like that, but not yet totally successed with a base64 encoded payload.
    Here two documents that I really find interresting:
    How to Configure Message Level Security in SAP Exchange Infrastructure 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d024ca8e-e76e-2910-c183-8ea4ba681c51
    How to handle unstructured source contents for Adapters (with Java mapping or with Module)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0
    if you find others... I'm ok to know it also
    Cheers.
    Mickael

  • How to send HTTP Post to URL (third party software) in JSP/JSPDynpage

    Hello,
    we want to integrate a third party application in our Portal Component (JSPDynpage using JSP and HTMLB). This third party component is called like this:
    http://servername:port/cgi-bin/cgi.exe?request=map&format=html&swldy_ace=GDF&swldy_image_format=p n g&width=525&height=375
    How can we do this in the JSP using HTMLB?
    Thanks for your help.
    Best regards,
    Daniel

    Hi Detlev,
    thanks for your hint regarding the App. Integrator, but it seemn not to be what we want to do: We call a CGI and get a JEPG Image back as request.
    Now we used the java.net.URLConnection to do the HTTP post in the JSPDynpage:
    // send HTTP POST
    try {
      u = new URL("http://server/path/ourcgi.exe");
    } catch(MalformedURLException ex) {
      System.err.println("MalformedURLException");
    // build query sting      
    String query = "request=plot&format=jpeg&template_name=......."
    int cl = query.length();
    try {
      // open the connection and prepare it to POST
      URLConnection uc = u.openConnection();
      uc.setDoOutput(true);
      uc.setDoInput(true);
      uc.setAllowUserInteraction(false);
      DataOutputStream dos = new DataOutputStream(uc.getOutputStream());
      dos.writeBytes(query);
      dos.close();
    } catch ...
    Best regards,
    Daniel

  • Testing  HTTP URL that causes a network problem

    Hi all,
    I'm developping an applet for multiple unlimited files downloading using HttpConnection .
    i want to implement the following feature :
    In the case of an error occurring due to network problems during file download; the applet must be able to reconnect and resume the data transfer without downloading the entire file(s).
    well i need to test this feature ; so i'm looking for some HTTP URL that can cause network probs so i can catch the error and retry connection etc...
    can someone point me where to find such HTTP files for my test ?
    thanks.

    >
    I can do this with FTP since it has commands to do
    this but I don't know of any using HTTP unless one
    uses a Servlet (or some other agent on the server) to
    process a download request for a file starting at
    some offset.
    Actually i did it only using HttpConnetion class and inputstream using some work arounds to keep track of the offset during download (actually i'm saving the offset to a temporary proprieties file that i'm reading again to get specific offset and resuming the download from last point)
    That is one way. You could also use an HTTP 'tunnel'
    that forwards all requests to an HTTP server but
    within the 'tunnel' you could at random close the
    connection.I will go for throwing exception manually ; but i'm curious to know how an HTTP tunnel works.
    thanks.

  • How to do Handshake with tired party(bank) HTTPS URL from SAP PI server

    Dear Expert,
    I have developed bunch of scenarios, all are synchronous ABAP proxy to HTTP_AAE with bank on PI 7.4(dual stack). Bank web server is HTTPS enabled server. Our ABAP developments are still in progress also we have few issue in connection from ECC to PI.but that is not the focus of discussion here.
    we want to do the handshake to check the connectivity with bank on their HTTPS URL from PI. Bank has provided the privet key for SSL from their server and corresponding public key they have maintained on their server. I have imported the private key under NWA -> Certificates -> Key Storage -> TrustedCA->Import Entry->Entry Type->PKCS#12->select the SSL.p12 file->import , also I have selected the option to "Use SSL" in HTTP_AAE receiver communication channel and selected the corresponding entryin  "keystore view" and "keystore entry". All these I have done in our DEV system, and we are trying to connect our PI dev to bank Dev server.
    Questions
    Is there any specific steps to do the handshake with third party HTTPS(bank in my case) server? if not, how can we just test the HTTPS connectivity by using the SSL private installed on our PI server, without running the complete scenarios. Our PI has been installed on UNIX, and "telnet https url 443" is working, as network team has opened the HTTPS port.
    We have not enabled the SSL technically on our PI server, and we have not installed any generated certificate from our PI server. Moreover, we have not made our PI url as "https:hostname:port" as we just need to communicate with bank by using their private key. Do you guys think we should enable the SSL? if yes, please explain why.
    What is the best practice to test the connection with third party having HTTPS URL? how can I just assure HTTPS communication is working fine, before testing my actual scenarios.
    Thanks for helping always.
    Regards,
    Farhan

    Hi Farhan,
    Some part of the blog is applicable for sending HTTPS request to partners/third party (Receiver SOAP Adapter).
    If banks certificates are already in trustedCA, then,  can you check if it also imported under user PIISuser under Identity management in NWA. If above 2 steps are done then i think your are good to go. But be careful when you install certificate, it should be in proper order.
    As you already mentioned, connectivity is already established and you are able to PIng/telnet from pi server, connectivity looks ok.
    While sending request, if you are getting 401 unauthorized, below might be the reason -
    1. Certificate not installed correctly or some missing steps
    2. Partner or TP is not ready to receive it, some certificate issue in there side.
    other than 401 means you are ok (As per certificate and Connectivity) - 403 and 500 errors are next stops.
    403 - error because of encoding method.
    500 - data issue.
    Regards
    Aashish Sinha

  • Problems with SAP BC to post a request to https URL

    Hello,
    in a integration scenario one of our partners wants to send a xml to our server via https.<br/>
    I tried this internal with a test business connector. I simple use the WmPublic.pub.client http service.<br/>
    I try to post a record to an https:// URL and get an error. It seems that there is some trouble with the ssl handshake. However it is working in the browser.<br/>
    The option Security -> Certificates -> Trusted Certificates -> CA Certificates Directory is 'unspecified'. Therefore no server certificate should be reject.<br/>
    <br/>
    Now I got an 'iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure<br/>
    ' error. I do not find any helpful entries in this forum. Did anyone solve this issue?<br/>
    <br/>
    Thank you,<br/>
    Nils<br/>
    <br/>
    error:<br/>
    2009-08-03 10:08:13 CEST iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure<br/>
         at iaik.security.ssl.r.f(Unknown Source)<br/>
         at iaik.security.ssl.x.b(Unknown Source)<br/>
         at iaik.security.ssl.x.a(Unknown Source)<br/>
         at iaik.security.ssl.r.d(Unknown Source)<br/>
         at iaik.security.ssl.SSLTransport.startHandshake(Unknown Source)<br/>
         at iaik.security.ssl.SSLTransport.getInputStream(Unknown Source)<br/>
         at iaik.security.ssl.SSLSocket.getInputStream(Unknown Source)<br/>
         at com.wm.net.NetURLConnection.trySSLConnect(NetURLConnection.java:691)<br/>
         at com.wm.net.NetURLConnection.httpsConnect(NetURLConnection.java:562)<br/>
         at com.wm.net.NetURLConnection.connect(NetURLConnection.java:171)<br/>
         at com.wm.net.HttpURLConnection.getOutputStream(HttpURLConnection.java:419)<br/>
         at com.wm.net.HttpContext.getOutputStream(HttpContext.java:578)<br/>
         at com.wm.net.HttpContext.getOutputStream(HttpContext.java:554)<br/>
         at com.wm.net.HttpContext.post(HttpContext.java:338)<br/>
         at pub.client.http(client.java:512)<br/>
    <br/>
    SAP BC Info:<br/>
    Software <br/>
    Product webMethods Integration Server <br/>
    Version 4.6 (Standard Encryption)    Release Notes  <br/>
    Updates BC46_CoreFix7  <br/>
    Build Number 940 + CoreFix 7 [Fixes 1-205 + SP1-3] <br/>
    SSL Standard (40-bit), Provider: IAIK 2.6 <br/>
      <br/>
    Server Environment <br/>
    Java Version 1.3.1_20 (47.0) <br/>
    Java Vendor Sun Microsystems Inc. <br/>
    Java Home /usr/jdk1.3.1_20/jre <br/>
    Java VM Version 1.3.1_20-b03 <br/>
    Java VM Info Java HotSpot(TM) Client VM (mixed mode) <br/>
    Classpath /usr/local/sapbc46/server/updates/BC46_CoreFix7.jar<br/>
    /usr/local/sapbc46/server/lib/server.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/java/lib/i18n.jar<br/>
    /usr/java/jre/lib/rt.jar<br/>
    /usr/local/sapbc46/server/lib/classes<br/>
    /usr/local/sapbc46/server/lib/client.jar<br/>
    /usr/local/sapbc46/server/lib/mail.jar<br/>
    /usr/local/sapbc46/server/lib/server.jar<br/>
    packages/SAP/code/classes<br/>
    packages/SAP/code/jars/static/inqmyxml.jar<br/>
    packages/SAP/code/jars/static/jARM.jar<br/>
    packages/SAP/code/jars/static/jCO.jar<br/>
    packages/SAP/code/jars/static/sapjco.jar<br/>
    packages/SAP/code/jars/static/sapxmltoolkit.jar<br/>
    packages/WmPartners/code/classes<br/>
    packages/WmWin32/code/classes <br/>
    OS Linux <br/>
    OS Platform i386 <br/>
    OS Version 2.6.18.8-0.13-default <br/>
    Current User sapbc <br/>
    Working Dir /usr/local/sapbc46/server<br/>

    Ok - in this case you need to include to session based SSL setup in your flow (scenario).
    The pub.security:setKeyAndChain and pub.security:clearKeyAndChain services are used to control which client certificate
    the SAP BC server presents to remote servers. You need to use these services to switch between certificates and
    certificate chains if you are not using aliases for remote servers.
    List of services to be used:
    pub.security:clearKeyAndChain
    -- Associates the default key and certificate chain with the subsequent set of invoked services.
    pub.security:setKeyAndChain
    -- Processes a digital signature to make sure that the provided data has not been modified. The signature input is the DER encoding of the PKCS#7 SignedData object.
    pub.security.pkcs7:sign
    -- Creates a PKCS7 SignedData object.
    pub.security.pkcs7:verify
    -- Processes a digital signature to make sure that the provided data has not been modified.
    pub.security.util:createMessageDigest
    -- Generates a message digest for a given message.
    pub.security.util:getCertificateInfo
    -- Retrieves information (e.g., serial number, issuer, expiration date) from a digital certificate.
    pub.security.util:loadPKCS7CertChain
    -- Converts a certificate chain that is in PKCS7 format to a list (a one-dimensional array) of byte arrays.
    Example:
    Invoke pub.client:http to send data to Company D.
    Invoke pub.security:setKeyAndChain using the key and certificate chain for Company B.
    Invoke pub.client:http to send data to Company B.
    Invoke pub.security:setKeyAndChain using the key and certificate chain for Company C.
    Invoke pub.client:http to send data to Company C.
    Invoke pub.security:clearKeyAndChain to revert back to the default key and certificate chain for Company
    Au2019s server.
    Invoke pub.client:http to send data to Company D.
    Edited by: Kai Lerch-Baier on Aug 3, 2009 1:47 PM

  • Problem sending HTTP

    I am getting 404 not found error message while sending the message from PI to HTTP application using HTTP receiver adapter.
    I know it is not finding the proper interface to send this message back. But I cross verified using HTTP application developers and they validated the URL to be true. where can I furthur validate these entries.
    THe end point HTTP url when entered in the browser, shows up a blank screen; is this something i need to worry about?
    THanks

    Hi,
    you can test http receivers with Microsoft's test tool [wfetch|http://articles.techrepublic.com.com/5100-10878_11-5032823.html]
    Regards,
    Udo

  • HTTP url check not working

    I have a simple http check, and it doesn't seem to check the URL at all.
    probe http URL_Check
    interval 10
    passdetect interval 3
    passdetect count 2
    request method get url /index.shtml
    expect status 200 200
    open 1
    expect regex "testtest1234test"
    Here is the details of the probe:
    sh probe URL_Check detail
    probe : URL_Check
    type : HTTP
    state : ACTIVE
    description :
    port : 80 address : 0.0.0.0 addr type : -
    interval : 10 pass intvl : 3 pass count : 2
    fail count: 3 recv timeout: 10
    http method : GET
    http url : /index.shtml
    conn termination : GRACEFUL
    expect offset : 0 , open timeout : 1
    expect regex : testtest1234test
    send data : -
    ------------------ probe results ------------------
    associations ip-address port porttype probes failed passed health
    ------------ ---------------+-----+--------+--------+--------+--------+------
    serverfarm : test
    real : CHILD[0]
    192.168.219.2 80 DEFAULT 35 0 35 SUCCESS
    Socket state : CLOSED
    No. Passed states : 1 No. Failed states : 0
    No. Probes skipped : 0 Last status code : 0
    No. Out of Sockets : 0 No. Internal error: 0
    Last disconnect err : -
    Last probe time : Thu Sep 24 00:56:52 2009
    Last fail time : Never
    Last active time : Thu Sep 24 00:51:12 2009
    Any help would be great!

    looks like the issue is that the server isn't passing the content-length field.

  • I want to test sender ABAP proxy in AAE by SOAP client

    To PI Specialists
    Now I plan to test sender ABAP proxy in AAE by SOAP client system.
    (we use aae so we set sender abap proxy by sender soap adapter.)
    ABAP creating team and PI creating team are in other site.We cant contact easily.
    I want to separate ABAP Unit test and PI Unit test, plan to use soap client for test driver.
    (we use SOAPUI. )
    the url is http://<host>:<port>/XISOAPAdapter/MessageServlet?channel=party:service:channel
    I noticed that sender soap adapter is started, but the messeage protocol is invalid.
    we use messege of wsdl. it must be XI3.0 protocol.
    Please tell me XI3.0 protocol.
    Naoki

    This is possible to do in SOAPUI.  I am testing this scenario using AAE, but I am also using SOAP UI Pro.  The procedure is pretty basic.  Instead of sending your payload in as part of the body, you have to send it in as an attachment.  You will also need to set the header correctly.  Here is a sample message from my SOAP UI tests that may help. The only thing you need to do differently is load the attachment, name it, and make sure that the name of the attachment is reflected in the SAP:Payload attribute.  Also, I am using a Groovy script to create a GUID.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30">
    <soapenv:Header>
      <SAP:Main versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92FFF13F5C59777FE1ABE00000A1551F7" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
                xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
       <SAP:MessageClass>ApplicationMessage</SAP:MessageClass>
       <SAP:ProcessingMode>asynchronous</SAP:ProcessingMode>
       <SAP:MessageId>${Create GUID#result}</SAP:MessageId>
       <SAP:TimeSent>${=new java.text.SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'").format(new Date())}</SAP:TimeSent>
       <SAP:Sender>
        <SAP:Service>SVCNM</SAP:Service>
       </SAP:Sender>
       <SAP:Interface namespace="Interface_Namehttp://namespace.com">Interface_Name</SAP:Interface>
      </SAP:Main>
      <SAP:ReliableMessaging SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SAP:QualityOfService>ExactlyOnce</SAP:QualityOfService>
      </SAP:ReliableMessaging>
      <SAP:System SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SAP:Record namespace="http://www.sap.com/webas/712/soap/features/runtime/metering/" name="CallingType">SA</SAP:Record>
      </SAP:System>
      <SAP:Diagnostic SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SAP:TraceLevel>Information</SAP:TraceLevel>
       <SAP:Logging>Off</SAP:Logging>
      </SAP:Diagnostic>
      <SAP:HopList SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SAP:Hop timeStamp="${=new java.text.SimpleDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'").format(new Date())}" wasRead="false">
        <SAP:Engine type="BS">SVCNM</SAP:Engine>
        <SAP:Adapter namespace="XIhttp://sap.com/xi/XI/System">XI</SAP:Adapter>
        <SAP:MessageId>${Create GUID#result}</SAP:MessageId>
        <SAP:Info>3.0</SAP:Info>
       </SAP:Hop>
      </SAP:HopList>
    </soapenv:Header>
    <soapenv:Body>
      <SAP:Manifest wsu:Id="wsuid-main-92FFF13F5C59777FE1ABE00000A1551F7" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink"
                    xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
       <SAP:Payload xlink:href="cid:TestPayload.xml">
        <SAP:Name>MainDocument</SAP:Name>
        <SAP:Description/>
        <SAP:Type>Application</SAP:Type>
       </SAP:Payload>
      </SAP:Manifest>
    </soapenv:Body>
    </soapenv:Envelope>
    Here is a picture of my SOAP UI project in case it help the understanding.

  • Sender http problem

    hi,
    where should i change url for sender http   symbols like  / by %2F and . by %3E in the url generated by the HTTP client ?
    where i i find this url
    http://xxxxx:8000/sap/xi/adapter_plain?namespace=http%3A//sap.com/xi/yyyyy&interface=abcd&service=ghj&sap-user=skapu&sap-password=super
    regards

    Vijender,
    you can create your own http client using the following doc.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    copy the piece of html code and paste in notepad and save that with extn ".html"
    to send the http request to ur xi integration engine, provide the parameters asked.
    n dont forget to change the user id and password in document source code.
    Else you can also test your scenario using RWB.
    Regards
    Pushkar

  • Print PDF from http URL

    I have a project wherein a piece of it will require me to retrieve a PDF file from a http URL (i.e.
    http://www.somewebsite.com/test.pdf) and print the PDF.  I've been looking for examples of how to do this but I'm not finding any. Is the only way to do this download the PDF to disk and then send to a
    printer? Speaking of printing, I need to send the PDF to an IP address which I've not done before either. If someone could point me to a good example of that, I'd appreciate it.
    Thank you.

    Since I had access to ABCPDF8, I ended up using it to print the PDF.  ABCPDF comes with example projects that helped me figure out what I needed to get the PDF to print.  For anyone who also has access to
    ABCPDF and needs to use it to print a PDF, I've pasted my code below.  The code is a cut-down version of the ABCPDF example as I did not need a lot of the functionality the example had. 
    Thanks again to all who responded to my post.
    ABCPDF8 code:
                private static WebSupergoo.ABCpdf8.Doc mDoc = null;
                private static System.Drawing.Printing.PrintDocument mPrint = null;
                private static int mPage = 0;
                private static int mPageSaved = 0;
                private static int mCopiesNumber;
                private static string pdfFile;
                private static string pdfPrinterName;
                private static string pdfPrinterTray;
                public enum Method
                    AdobeReader,
                    ABCPDF8
                /// <summary>
                /// </summary>
                /// <param name="pdfFilePath"></param>
                /// <param name="printerName"></param>
                /// <param name="printMethod"></param>
                public static void DoPrint(string pdfFilePath, string printerName, string printerTray, Method printMethod)
                    if (System.IO.Path.GetExtension(pdfFilePath).Trim().ToUpper() != ".PDF")
                        throw new System.ApplicationException(String.Format("File '{0}' is not a PDF!", pdfFilePath));
                    pdfFile = pdfFilePath;
                    pdfPrinterName = printerName;
                    pdfPrinterTray = printerTray;
                    switch (printMethod)
                        case Method.AdobeReader:
                            PrintViaAdobeReader();
                            break;
                        case Method.ABCPDF8:
                            PrintViaABCPDF8();
                            break;
                        default:
                            break;
               private static void PrintViaABCPDF8()
                    mDoc = new WebSupergoo.ABCpdf8.Doc();
                    //read in the PDF
                    mDoc.Read(pdfFile);
                    //crete new print document
                    mPrint = new System.Drawing.Printing.PrintDocument();
                    mPrint.DocumentName = System.IO.Path.GetFileName(pdfFile);
                    mPrint.PrinterSettings.PrinterName = pdfPrinterName;
                    mPrint.PrinterSettings.FromPage = 1;
                    mPrint.PrinterSettings.ToPage = mDoc.PageCount;
                    mPrint.PrinterSettings.MinimumPage = 1;
                    mPrint.PrinterSettings.MaximumPage = mDoc.PageCount;
                    mPrint.QueryPageSettings += (sndr, args) =>
                        if (!String.IsNullOrWhiteSpace(pdfPrinterTray))
                            for (int i = 0; i < mPrint.PrinterSettings.PaperSources.Count; i++)
                                if (mPrint.PrinterSettings.PaperSources[i].SourceName.ToLower().Trim() == pdfPrinterTray.ToLower())
                                    args.PageSettings.PaperSource = mPrint.PrinterSettings.PaperSources[i];
                                    break;
                    mPrint.BeginPrint += new System.Drawing.Printing.PrintEventHandler(DoBeginPrint);
                    mPrint.EndPrint += new System.Drawing.Printing.PrintEventHandler(DoEndPrint);
                    mPrint.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(DoPrintPage);
                    mPrint.Print();
                    mDoc.Clear();
                    mDoc.Dispose();
                /// <summary>
                /// Start printing via ABCPDF8
                /// </summary>
                /// <param name="sender"></param>
                /// <param name="e"></param>
                private static void DoBeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e)
                    mPage = mPrint.PrinterSettings.FromPage;
                    mPageSaved = mDoc.PageNumber;
                    mCopiesNumber = 1;
                /// <summary>
                /// Print page using ABCPDF8
                /// </summary>
                /// <param name="sender"></param>
                /// <param name="e"></param>
                private static void DoPrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
                    mDoc.PageNumber = mPage;
                    if (mCopiesNumber++ >= mPrint.PrinterSettings.Copies)
                        mPage++;
                        mCopiesNumber = 1;
                    e.HasMorePages = mPage <= mPrint.PrinterSettings.ToPage;
                    using (System.Drawing.Graphics g = e.Graphics)
                        if (mDoc.PageCount == 0) return;
                        if (mDoc.Page == 0) return;
                        WebSupergoo.ABCpdf8.XRect cropBox = mDoc.CropBox;
                        double srcWidth = (cropBox.Width / 72) * 100;
                        double srcHeight = (cropBox.Height / 72) * 100;
                        double pageWidth = e.PageBounds.Width;
                        double pageHeight = e.PageBounds.Height;
                        double marginX = e.PageSettings.HardMarginX;
                        double marginY = e.PageSettings.HardMarginY;
                        double dstWidth = pageWidth - (marginX * 2);
                        double dstHeight = pageHeight - (marginY * 2);
                        const bool autoRotate = true;
                        int rotate = 0;
                        if (autoRotate && srcWidth != srcHeight && dstWidth != dstHeight
                            && (srcWidth > srcHeight) != (dstWidth > dstHeight))
                            double temp = pageWidth;
                            pageWidth = pageHeight;
                            pageHeight = temp;
                            temp = marginX;
                            marginX = marginY;
                            marginY = temp;
                            temp = dstWidth;
                            dstWidth = dstHeight;
                            dstHeight = temp;
                            rotate = GetPageRotation(mDoc) % 360;
                            if (rotate <= -180)
                                rotate += 360;
                            else if (rotate > 180)
                                rotate -= 360;
                            rotate = rotate > 0 ? 90 : -90; // default to -90
                            // Use -90 because we want the staple to be at a top corner
                            // of the page.  Assuming a rotation of "rotate" (0 or 180 degrees)
                            // produces upright contents, a rotation of -90 or 90 degrees
                            // (respectively) produces outputs whose top is at the
                            // left edge of the portrait page.  The staple at the top-left
                            // corner of the portrait page will be at the top-right corner of the
                            // contents.
                        else
                            rotate = GetPageRotation(mDoc) % 360;
                            if (rotate != 180 && rotate != -180)
                                rotate = 0;
                        // if source bigger than destination then scale
                        if ((srcWidth > dstWidth) || (srcHeight > dstHeight))
                            double sx = dstWidth / srcWidth;
                            double sy = dstHeight / srcHeight;
                            double s = Math.Min(sx, sy);
                            srcWidth *= s;
                            srcHeight *= s;
                        // now center
                        double x = (pageWidth - srcWidth) / 2;
                        double y = (pageHeight - srcHeight) / 2;
                        // save state
                        double saveDotsPerInch = mDoc.Rendering.DotsPerInch;
                        mDoc.Rendering.AutoRotate = false;
                        System.Drawing.RectangleF theRect = new System.Drawing.RectangleF((float)x, (float)y, (float)srcWidth, (float)srcHeight);
                        int theRez = e.PageSettings.PrinterResolution.X;
                        if (e.PageSettings.Color) // color is generally CMYK so to translate from dpi to ppi we divide by four
                            theRez /= 4;
                        if (theRez <= 0) // Invalid printer resolution - use the default value
                            theRez = 72;
                        // draw content
                        mDoc.Rect.SetRect(cropBox);
                        System.Drawing.Drawing2D.Matrix oldTransform = null;
                        if (rotate != 0)
                            oldTransform = g.Transform;
                            switch (rotate)
                                case 90:
                                    using (System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix(0,
    1, -1, 0,
                                        (float)(2 * y + srcHeight), 0))
                                        g.MultiplyTransform(matrix);
                                    break;
                                case -90:
                                    using (System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix(0,
    -1, 1, 0,
                                        0, (float)(2 * x + srcWidth)))
                                        g.MultiplyTransform(matrix);
                                    break;
                                case 180:
                                case -180:
                                    using (System.Drawing.Drawing2D.Matrix matrix = new System.Drawing.Drawing2D.Matrix(-1,
    0, 0, -1,
                                        (float)(2 * x + srcWidth), (float)(2 * y +
    srcHeight)))
                                        g.MultiplyTransform(matrix);
                                    break;
                        g.SetClip(theRect);
                        if (!mDoc.Encryption.CanPrintHi)
                            mDoc.Rendering.DotsPerInch = 72;
                            using (System.Drawing.Bitmap bm = mDoc.Rendering.GetBitmap())
                                g.DrawImage(bm, theRect);
                        else
                            mDoc.Rendering.DotsPerInch = theRez;
                            mDoc.Rendering.ColorSpace = WebSupergoo.ABCpdf8.XRendering.ColorSpaceType.Rgb;
                            mDoc.Rendering.BitsPerChannel = 8;
                            byte[] theData = mDoc.Rendering.GetData(".emf");
                            System.IO.MemoryStream theStream = new System.IO.MemoryStream(theData);
                            using (System.Drawing.Imaging.Metafile theEMF = new System.Drawing.Imaging.Metafile(theStream))
                                g.DrawImage(theEMF, theRect);
                        if (oldTransform != null)
                            g.Transform = oldTransform;
                            oldTransform.Dispose();
                        // restore state
                        mDoc.Rendering.DotsPerInch = saveDotsPerInch;
                        mDoc.Rendering.AutoRotate = true;
                /// <summary>
                /// End printing ABCPDF8
                /// </summary>
                /// <param name="sender"></param>
                /// <param name="e"></param>
                private static void DoEndPrint(object sender, System.Drawing.Printing.PrintEventArgs e)
                    mDoc.PageNumber = mPageSaved;
                /// <summary>
                /// Current page number
                /// </summary>
                public static int PageNumber
                    get
                        if (mDoc == null)
                            return 0;
                        else
                            return mDoc.PageNumber;
                    set
                        if (mDoc != null && value <= mDoc.PageCount && value != mDoc.PageNumber)
                            mDoc.PageNumber = value;
                /// <summary>
                /// </summary>
                /// <param name="theDoc"></param>
                /// <returns></returns>
                private static int GetPageRotation(WebSupergoo.ABCpdf8.Doc theDoc)
                    return (theDoc != null) ? theDoc.GetInfoInt(theDoc.Page, "Rotate") : 0;

  • Content Server 6.4 Windows Server 2008 R2 First Test Blank HTTP response

    I have installed Content Server 6.4 with MaxDB 7.6 on a Windows 2008 Server r2 system as directed in the "installation guide for SAP Content Server for Windows 2008" at service.sap.com/contentserver -> Media Library
    -> Literature.  Whenever I test the installation (a CACHE server) with this command:
    http://localhost:1095/Cache/CSProxyCache.dll?serverInfo
    it sits for about 20 or 30 seconds and then simply returns a blank screen.  If I refresh, it returns immedilately, again a blank screen.  There is nothing produced in the IIS logs at C:\inetpub\logs\LogFiles\W3SVC1.  I am at a loss. 
    FYI, I used the 50105790 DVD for the installation of Content Server and MaxDB.

    I have solved my problem.  I initially started by installing the software, putting the databases online, and since I was only installing CACHE SERVER and not CONTENT SERVER, I never attempted to test the CONTENT SERVER URL.  After many failures, I then also installed CONTENT SERVER, tested it, and it worked.  I found that the database DID NOT have to be online for testing of CONTENT SERVER.  That was where things went south.  I assumed that the database did not have to be online for testing the CACHE SERVER HTTP URL as well and thus continued my future attempts without the database online.  I finally found that with a combination of SAP NOTE 658442 in regards to giving the NETWORK SERVICE proper permissions (even though it says it is for CONTENT SERVER 6.3), plus making sure the databases are ONLINE, I had success.

  • Accessing BSP File Download using HTTPS URL

    Hi,
    I'm struggling with a problem of downloading a file from a https url. I wrote a BSP App for downloading a file from a unix server.. It works fine when I use a http URL with port 8080 and does not work when I use https.!!
    Example:
    https://comms.gmsanet.co.za/supplier [ download does not work ]
    http://comms.gmsanet.co.za:8080/supplier [ download works ]
    When I try to download using https.. it does not pull the file name and path
    see code  below and suggest me if anything to be chnaged.
    In the Form Initialization method:
    event handler fr data retrieval
    DATA: i_file        type string,
          s_fields      TYPE tihttpnvp,
          s_fields_line TYPE ihttpnvp,
          multipart_form type ref to if_http_entity,
          file_upload    type xstring,
          lv_backend     type string,
          success        type string,
          entity         type ref to if_http_entity,
          file           type xstring,
          content_type   type string,
          content_filename type string,
          content_length type string,
          content_disposition type string,
          num_multiparts type i,
          i              type i value 1,
          doEcho         type string value 'X',
          value          type string,
          filename       type ZFILETAB-fileinfo,
          ext1           type string,
          ext2           type string,
          dsn            type string,
          bptype         like sy-uname,
          itab           TYPE ZFILETAB,
          itab_line      TYPE ZFILETABLINE,
          file_ext       type ZFILETABLINE,
          fileinfo       type c,
          zcount         type i.
        filename = '/NewMessge.doc'.
        content_filename = filename.
    Check the extension and assign the content type
        split filename at '.' into ext1 ext2.
        case ext2.
          when 'zip'.
            content_type = 'application/x-zip-compressed'.
          when 'doc'.
            content_type = 'application/msword'.
          when 'txt'.
            content_type = 'text/plain'.
          when 'ppt' or 'pps'.
            content_type = 'application/vnd.ms-powerpoint'.
          when 'xls' or 'exe'.
            content_type = 'application/octet-stream'.
          when 'gif'.
            content_type = 'image/gif'.
          when 'jpg' or 'jpeg'.
            content_type = 'image/pjpeg'.
          when 'htm' or 'html'.
            content_type = 'text/html'.
        endcase.
        dsn = filename.
        OPEN DATASET dsn FOR INPUT IN BINARY MODE.
        IF sy-subrc NE 0.
          zmessage = 'Error opening file'.
          navigation->set_parameter( name = 'zmessage' value = zmessage ).
          navigation->goto_page( 'downloaderror.htm' ).
          exit.
        ENDIF.
        DO.
          READ DATASET dsn INTO <b>file</b>.
          EXIT.
        ENDDO.
        CLOSE DATASET dsn.
    set response data to be the file content
      runtime->server->response->set_data( <b>file</b> ).
      runtime->server->response->set_header_field(
                                    name  = 'Content-Type'
                                    value = content_type ).
      concatenate 'attachment; filename=' filename into content_disposition.
      runtime->server->response->set_header_field(
                                    name = 'Content-Disposition'
                                    value = content_disposition ).
    set the file size in the response
      content_length = xstrlen( file ).
      runtime->server->response->set_header_field(
                                name  = 'Content-Length'
                                value = content_length ).
      runtime->server->response->delete_header_field(
                                name = 'Cache-Control' ).
      runtime->server->response->delete_header_field(
                                name = 'Expires' ).
      navigation->response_complete( ).
    Thanks
    Ajay

    Hi Brian,
    I have the same problem as Ajay Yeluguri. In http mode I can generate a download of an Excel document but when we use the portal in https it doesn't work.
    When I try to download using https it does not pull the file name and path and when I choose download I have a error message : "Internet Explorer cannot download from ..."
    I've test the point 3.2 "... including file up/download" of the BSP application IT00 and it works fine in http and https mode. My problem is not the upload but the download. And in this application the uploaded document is opened in the Internet Explorer window but I want to generate a Save as... window to download the file.
    Have you an idea what i can do to solve my problem.
    Thanks
    Yann

  • How do I test Sender SOAP scenario?

    Hi
    Soap - IDOC.
    The authorizations on the WS to send data is not yet provided to me.
    thus, I m trying to send a sample data from Altova XML spy.
    For this purpose I have created a WSDL from ID (Tools -> create WS)
    in Receiver NS, receiver MI, I have given receiver side details only
    but in sender side NS and MI and Sender service, I have given the Sender service that I have created in ID and the XI's local NS and receiver MI
    For URL, I have selected on "Propose URL". Now will I be able to send data to the R3 server with this link?
    (R3 is production server in my network)
    now with that WSDL, I coudlnt validate in XML SPY.
    have I provided the correct details?
    Please suggest me is there any other way of testing Sender WS to IDOC?
    Thanks and Regards,
    Venkat.

    oops I guess I have confused u
    let me detail it again
    Scenario : SOAP - XI - IDOC
    The scenario is finished.
    I dont have authorizations on WS to logon n send the data
    Thus, I have created WSDL from ID (in XI)
    now I want to send data to XI which inturn will post the data to R3 and create a IDOC
    when I try to validate the WSDL created through XI using SPY, it couldnt validate and I couldnt send the request
    I want to send the data from outside XI and I want to generate a IDOC with the test data I have specified.
    how do I do it?
    Hope I made it clear this time
    Thanks,
    Nikhil.

  • Name of .crl and .crt file missing from HTTP URL in certificate details

    Hello Everyone,
    I am in the process of building a 2-tier Windows Server 2012 R2 PKI. The CA name of both the offline standalone root CA and enterprise subordinate CA have spaces in it (we'll call the CA name, 'Test Lab Root CA' for point of reference).
    When I submitted the certificate request for the subordinate CA to the root CA and viewed the attributes/extensions of the pending request, I noticed the HTTP URL is missing the name of the .crt and .crl file.
    The AIA extension reads URL=http://test.domainname.com/pki/.crt
    in the issued certificate details.
    The CDP extension reads URL=http://test.domainname.com/pki/.crl
    in the issued certificate details.
    The AIA and CDP location HTTP URLs are configured as http://test.domainname.com/pki/<CertificateName>.crt and  http://test.domainname.com/pki/<CRLNameSuffix><DeltaCRLAllowed>.crl, respectively on the
    root CA. 
    The LDAP URL shows the .crt and .crl file name (with %20 replacing the spaces) perfectly fine. The LDAP URL is configured using variables as well. It's just the HTTP URL that is missing the name of the file altogether. 
    I have read about the issue where spaces are not being replaced with %20 in the URL on Windows Server 2012 and a hotfix is available for that issue. But this issue seems to be slightly different and I'm running Windows Server 2012 R2. I tried installing
    the hotfix to see if it would help, but the hotfix can't install because it doesn't apply to Server 2012 R2.
    I've been trying to find a technet discussion or blog article for a week to see if anyone has seen this and what the fix is, but I'm coming up empty. I only find talks about %20 not replacing the space in the name.
    Does anyone have any insight to my particular issue? I don't want to issue the subordinate CA certificate until I know the HTTP URL populates the CRL and CRT file name correctly. I can get around this by typing out the name of the file (with spaces and not
    %20... e.g. http://test.domainname.com/pki/Test Lab Root CA.crl) in the URL via the registry and the URL displays the name of the file (with %20 in the name) when I do another certificate request and check the attributes/extensions in the
    pending request. However, I prefer to avoid manually typing out the name of the file in the registry. I'd like to use the variables if at all possible. 
    Any help/guidance would be greatly appreciated.
    Thank you.

    On Fri, 27 Mar 2015 03:42:28 +0000, Brian Komar [MVP] wrote:
    You have totally messed up the URLs.
    If you run certutil -getreg ca\CRLPublicationURLs and certutil -getreg ca\CACertPublicationURLs, you will see that you do not have correct use of variables when compared to the settings that follow:
    The URLs should be set to the following for an offline CA:
    certutil -setreg CA\CRLPublicationURLs "1:%WINDIR%\system32\CertSrv\CertEnroll\%%3%%8%%9.crl\n2:http://test.domainname.com/pki/%%3%%8%%9.crl"
    *certutil -setreg CA\CACertPublicationURLs  "1:%WINDIR%\system32\CertSrv\CertEnroll\%%1_%%3%%4.crt\n2:http://*test.domainname.com*/pki/%%1_%%3%%4.crt"*
    For an issuing CA, they should be set to:
    The URLs should be set to the following for an offline CA:*certutil -setreg CA\CRLPublicationURLs "65:%WINDIR%\system32\CertSrv\CertEnroll\%%3%%8%%9.crl\n6:http://test.domainname.com/pki/%%3%%8%%9.crl"*
    *certutil -setreg CA\CACertPublicationURLs  "1:%WINDIR%\system32\CertSrv\CertEnroll\%%1_%%3%%4.crt\n2:http://**test.domainname.com**/pki/%%1_%%3%%4.crt"*
    Just a clarification here, if you're running the above certutil commands at
    the command prompt you only need single % characters in the command line.
    The double % characters are only required if the commands are being run in
    a batch file.
    Paul Adare - FIM CM MVP

Maybe you are looking for

  • Problems with installation on Windows XP Pro with SP1

    Hi! I've two problems during installation. I try to install Oracle 10g Enterprise First: Checking Network Configuration requirements ... Check complete. The overall result of this check is: Not executed <<<< Recommendation: Oracle supports installati

  • Mapping problem:filling field with 0 (zeros) in material number

    I want to create a mapping like the ABAP function: CONVERSION_EXIT_MATN1_INPUT for example: 1 => 000000000000000001(add zeros if input value is numeric) Z => Z(no change if input is not numeric) The standard function "formatnum" works well from 1 =>

  • Numbering the Header

    Does anyone know how to in Pages 08 have the number of the page appear in the header?

  • Eclipse-AXIS2 : Generating the stub

    hi, i implemented a POJO business service, and use the eclipse web service wizard to generate the server and client side code. everything is OK, but i want to do a customisation, i would like to force the generated stub to extends a custom class ant

  • How to use dbxml as a stand alone server?

    Dear All Is there any way to launch dbxml as a stand alone server? What I want to do is the following. I am using PHP and creating a web site on which users can search information stored in dbxml. So far each time client (browser) come to the page, p