Help with SOAP

Hi there,
Hoping to get some help here with an issue I'm stuck on.
I'm trying to use the Bing Ads Web service in Python (SUDS) and also just using curl.
I'm able to read in the WSDL file and generate the XML/SOAP output. 
I feel like there is something minor wrong, just not too sure or familiar with what it might be. 
Trying to call the following action:  DownloadCampaignsByAccountIds
I tried to mimic the documentation as much as possible: http://msdn.microsoft.com/en-US/library/jj885755.aspx#request_soap
Even copying and pasting the XML from the link above and adding my own values in after to make sure.
I have the XML generated in SUDS but I keep getting a 400 Error: HTTP failed - 400 - Bad Request
If I use curl and use the example provide as a template I get a slightly different error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode>
<faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. 
This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a 
binding/security mismatch between the sender and the receiver.  
Check that sender and receiver have the same contract and the same binding 
(including security requirements, e.g. Message, Transport, None).
</faultstring></s:Fault></s:Body></s:Envelope> 
Here is my full XML I am trying to pass to the service:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" 
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns2="https://bingads.microsoft.com/CampaignManagement/v9" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <Action mustUnderstand="1">DownloadCampaignsByAccountIds</Action>
      <ApplicationToken i:nil="false"></ApplicationToken>
      <AuthenticationToken i:nil="false"></AuthenticationToken>
      <CustomerAccountId i:nil="false">xxxx</CustomerAccountId>
      <CustomerId i:nil="false">xxxxx</CustomerId>
      <DeveloperToken i:nil="false">xxxxxxxx</DeveloperToken>
      <Password i:nil="false">xxxx</Password>
      <UserName i:nil="false">xxxxxxx</UserName>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns2:DownloadCampaignsByAccountIdsRequest>
         <ns2:AccountIds>
            <ns0:long>xxxxxxx</ns0:long>
         </ns2:AccountIds>
         <ns2:DataScope>EntityData</ns2:DataScope>
         <ns2:DataScope>EntityPerformanceData</ns2:DataScope>
         <ns2:DataScope>QualityScoreData</ns2:DataScope>
         <ns2:DownloadFileType>Csv</ns2:DownloadFileType>
         <ns2:Entities>Ads</ns2:Entities>
         <ns2:Entities>SiteLinksAdExtensions</ns2:Entities>
         <ns2:Entities>Keywords</ns2:Entities>
         <ns2:Entities>AdGroups</ns2:Entities>
         <ns2:Entities>Campaigns</ns2:Entities>
         <ns2:FormatVersion>2.0</ns2:FormatVersion>
         <ns2:LastSyncTimeInUTC></ns2:LastSyncTimeInUTC>
         <ns2:LocationTargetVersion></ns2:LocationTargetVersion>
         <ns2:PerformanceStatsDateRange>
<CustomDateRangeEnd i:nil="false">
 <Day></Day>
 <Month></Month>
 <Year></Year>
</CustomDateRangeEnd>
<CustomDateRangeStart i:nil="false">
 <Day></Day>
 <Month></Month>
 <Year></Year>
</CustomDateRangeStart>
            <ns2:PredefinedTime>Yesterday</ns2:PredefinedTime>
         </ns2:PerformanceStatsDateRange>
      </ns2:DownloadCampaignsByAccountIdsRequest>
   </ns1:Body>
</SOAP-ENV:Envelope>
Any thoughts or ideas here? I feel like I am close...

Hello.
I made the following changes to your SOAP request to get it working. The final working request is pasted below.
1. Change i:nil to xsi:nil
2. Use 'ns2' or equivalent for the header elements e.g. ns2:UserName.
3. Specifiy DataScope as a space delimited list
4. Specify Entities as a space delimited list
5. Set last sync time to null, e.g. <ns2:LastSyncTimeInUTC xsi:nil="true" />
6. Remove custom date range, since you are requesting instead a Predefined time of Yesterday.
By the way, please also set LocationTargetVersion to Latest and use FormatVersion 3.0 which is the latest version.
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns2="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header>
    <ns2:Action mustUnderstand="1">DownloadCampaignsByAccountIds</ns2:Action>
    <ns2:ApplicationToken xsi:nil="false"></ns2:ApplicationToken>
    <ns2:AuthenticationToken xsi:nil="false"></ns2:AuthenticationToken>
    <ns2:CustomerAccountId xsi:nil="false">***</ns2:CustomerAccountId>
    <ns2:CustomerId xsi:nil="false">***</ns2:CustomerId>
    <ns2:DeveloperToken xsi:nil="false">***</ns2:DeveloperToken>
    <ns2:Password xsi:nil="false">***</ns2:Password>
    <ns2:UserName xsi:nil="false">***</ns2:UserName>
  </SOAP-ENV:Header>
  <ns1:Body>
    <ns2:DownloadCampaignsByAccountIdsRequest>
      <ns2:AccountIds>
        <ns0:long>***</ns0:long>
      </ns2:AccountIds>
      <ns2:DataScope>EntityData EntityPerformanceData QualityScoreData</ns2:DataScope>
      <ns2:DownloadFileType>Csv</ns2:DownloadFileType>
      <ns2:Entities>Ads SiteLinksAdExtensions Keywords AdGroups Campaigns</ns2:Entities>
      <ns2:FormatVersion>3.0</ns2:FormatVersion>
      <ns2:LastSyncTimeInUTC xsi:nil="true" />
      <ns2:LocationTargetVersion>Latest</ns2:LocationTargetVersion>
      <ns2:PerformanceStatsDateRange>
        <ns2:PredefinedTime>Yesterday</ns2:PredefinedTime>
      </ns2:PerformanceStatsDateRange>
    </ns2:DownloadCampaignsByAccountIdsRequest>
  </ns1:Body>
</SOAP-ENV:Envelope>
I hope this helps!
Eric

Similar Messages

  • Help with SOAP Receiver

    Hello PI friends,
    I'm connecting PI to an external SOAP web service developed in .NET. I created a scenario which should be very close to what I need but I was getting an error when testing in RWB:
    SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request
    So then I captured my payload and tried to get this working in SOAPUI, but came to the same 400 response.
    I have a prototype program written in .NET which can execute the call correctly :-).
    I watched this in Fiddler and compared the headers / payload to what I had, making an interesting discovery.
    The overall message structure is something like this:
    <soap:Envelope>
    <soap:Body>
    <WebServiceMethod>
    <usuario/>
    <password/>
    <MyPayload>
    .....more "XML", I use quotes here for a reason, please read on...
    </MyPayload>
    </WebServiceMethod>
    </Body>
    </Envelope>
    What I noticed in Fiddler with the working .NET prototype is everything inside MyPayload is escaped XML, like: &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;
    My message in PI is sending true XML inside that element structure. So when I change from my payload in SOAPUI using that escaped notation it works great.
    But now either I need to accomplish this strange notation in PI, or perhaps I am doing something wrong with the way I've configured my datatype and mapping in the first place and it should always get escaped this way by using only passing the "MyPayload" section into the SOAP adapter?
    However, when I tried this I am missing the key parts of the SOAP Body... e.g. WebServiceMethod, usuario, password, MyPayload
    (BTW - This web service is in Spanish so username is really "usuario". I don't know if there is a way for this to be passed using the Adapter authentication options or if it must be coded into the message body)
    Currently I named my datatype to match like "WebServiceMethod" and then defined all nodes underneath this. When I capture the SOAP output it looks OK to me structure wise... its just this internal web service XML payload which is giving me trouble.
    Anyone run into this before? I hope it is something simple, I'm not a web service developer and am more accustomed to using the RFC / IDOC / JMS / JDBC adapters. Thanks for your ideas.
    -Aaron

    Hi Aaron,
    about "usario" being part of payload: The receiver seems to want it that way.As long as transport protocol is HTTPS you should not be worried about this.
    About your escaped XML: I'm assuming this is a follow up of your last post? Anyways, having an additional <?xml version...> statement within an xml document is not allowed and would render the whole document ill-formed (is that proper English?) Seems like the .net program implicitly sends all payload data (maybe only the actual data within the tags) through a serializer , which is quite normal / best practice.
    You could do so on PI also of course. As the .net program works, receiver should be able (or even may assume) that any data within <MyPayload> is serialized. Have a look at my post in your former thread about some possible util classes for that. Re: How to insert <?xml version="1.0" encoding="utf-8"?> before an element (Beware, I'm not a Java expert and haven't done this yet, so YMMV)
    HTH
    Cheers
    Jens

  • Help with soap adapter

    hi,
    how can i configure the standard http user-authentication in a soap request?
    i tried to set the user-authentication field and password under the url-field, but i still get this exception:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Aufruf eines Adapters
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="HTTP">ADAPTER.HTTP_EXCEPTION</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>HTTP 401 Unauthorized</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    and this html-message in the main-attachment:
    Sie haben nicht die erforderliche Berechtigung, um die Seite anzuzeigen
    Sie verfügen nicht über die Berechtigung, dieses Verzeichnis oder diese Seite unter Verwendung der von Ihnen bereitgestellten Anmeldeinformationen anzuzeigen, weil Ihr Webbrowser ein WWW-Authenticate-Headerfeld sendet, das die Konfiguration des Webservers nicht akzeptieren kann.
    Versuchen Sie Folgendes:
    Wenn Sie Ihrer Meinung nach in der Lage sein sollten, dieses Verzeichnis bzw. diese Seite anzuzeigen, wenden Sie sich an den Websiteadministrator.
    Klicken Sie auf die Schaltfläche Aktualisieren, um es mit anderen Anmeldeinformationen erneut zu versuchen.
    HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration favoring an alternate authentication method. (HTTP-Fehler 401.2 - Nicht autorisiert: Der Zugriff wurde verweigert, weil die Serverkonfiguration eine andere Authentifizierungsmethode verlangt.)
    Internetinformationsdienste (Internet Information Services oder IIS)
    it should be the simple standard authentication then this one:
    https://websmp104.sap-ag.de/notes
    thx for any help
    mfg Ronald Grafl

    Hi,
    Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized
    Description: The request requires user authentication
    Possible Tips:
    • Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER
    • If the error is in XI Adapter, then your port entry should J2EE port 5<System no>
    • If the error is in Adapter Engine
    –then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.
    • May be wrong password for user XIISUSER
    • May be wrong password for user XIAFUSER
    – for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message
    See the below link
    HTTP* Errors /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Regards
    Chilla

  • Help with SOAP traces to deal with VC Problem

    Hi,
    I'm currently using CE SR 3 and am having trouble using a web service in VC. I've used the WS in the web service navigator and it works there but I'm missing something in the VC environment. I'd like to be able to see the actual SOAP request and response messages that are being used.
    Does anyone have an idea on which trace locations I can set to find this information.
    Thanks.
    Dick

    Hi Richard,
    Is it possible for you to elaborate a bit about the problem?
    There is a known limitation concerning web service consumption:
    Limitation 0120031469 1000108608 - Services that contain nillable structures with no fields cannot be consumed in Visual Composer.
    Can this be the case?
    Regards,
        Shai

  • Beginner needs help with SOAP with attachments

    Hello,
    I would like for a ws client to retrieve an image from a ws endpoint. I am totally confused as to what encoding style to choose as well as how to implement it.
    Here is the code for the client:
    package pack;
    import java.awt.Image;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServletFetchesAttachment extends HttpServlet {
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            System.out.println("processRequest");
            PrintWriter out = response.getWriter();
            try {
                Image img =  getProvidesAttachmentSEIPort().retrieveAttachment();
            } catch(java.rmi.RemoteException ex) {
                ex.printStackTrace();
            } catch(Exception ex) {
                ex.printStackTrace();
            out.close();
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
        private pack.ProvidesAttachment getProvidesAttachment() {
            pack.ProvidesAttachment providesAttachment = null;
            try {
                javax.naming.InitialContext ic = new javax.naming.InitialContext();
                providesAttachment = (pack.ProvidesAttachment) ic.lookup("java:comp/env/service/ProvidesAttachment");
            } catch(javax.naming.NamingException ex) {
                ex.printStackTrace();
            return providesAttachment;
        private pack.ProvidesAttachmentSEI getProvidesAttachmentSEIPort() {
            pack.ProvidesAttachmentSEI providesAttachmentSEIPort = null;
            try {
                providesAttachmentSEIPort = getProvidesAttachment().getProvidesAttachmentSEIPort();
            } catch(javax.xml.rpc.ServiceException ex) {
                ex.printStackTrace();
            return providesAttachmentSEIPort;
    }Here is the code for the endpoint:
    package pack;
    import java.awt.Image;
    import java.awt.Toolkit;
    import java.net.MalformedURLException;
    import java.net.URL;
    public class ProvidesAttachmentImpl implements ProvidesAttachmentSEI{
        public Image retrieveAttachment() throws java.rmi.RemoteException {
            URL url=null;
            Image image = null;
            try {
                url = new URL("file:///home//julien//tests//logo.gif");
                image = Toolkit.getDefaultToolkit().createImage(url);
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
            return image;
    }Here is the wsdl:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="ProvidesAttachment" targetNamespace="urn:ProvidesAttachment/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://java.sun.com/jax-rpc-ri/internal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:ProvidesAttachment/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <types>
        <schema targetNamespace="http://java.sun.com/jax-rpc-ri/internal" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://java.sun.com/jax-rpc-ri/internal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
          <simpleType name="image">
            <restriction base="base64Binary"/></simpleType></schema>
      </types>
      <message name="ProvidesAttachmentSEI_retrieveAttachmentResponse">
        <part name="result" type="ns2:image"/>
      </message>
      <message name="ProvidesAttachmentSEI_retrieveAttachment">
      </message>
      <portType name="ProvidesAttachmentSEI">
        <operation name="retrieveAttachment">
          <input message="tns:ProvidesAttachmentSEI_retrieveAttachment"/>
          <output message="tns:ProvidesAttachmentSEI_retrieveAttachmentResponse"/>
        </operation>
      </portType>
      <binding name="ProvidesAttachmentSEIBinding" type="tns:ProvidesAttachmentSEI">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="retrieveAttachment">
          <soap:operation soapAction=""/>
          <input>
            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ProvidesAttachment/wsdl" use="encoded"/>
          </input>
          <output>
            <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ProvidesAttachment/wsdl" use="encoded"/>
          </output>
        </operation>
      </binding>
      <service name="ProvidesAttachment">
        <port binding="tns:ProvidesAttachmentSEIBinding" name="ProvidesAttachmentSEIPort">
          <soap:address location="http://ordinateur:8080/WebAppProvidesAttachment/ProvidesAttachment"/>
        </port>
      </service>
    </definitions>Any help greatly appreciated.
    Thanks in advance,
    Julien.

    double C = 5 / 9This considers "5" and "9" to be integers and does an integer division, discarding the remainder. The result of that division is 0. Trydouble C = 5.0/9.0;

  • Problem with SOAP to JDBC scenario. Please help!

    Hi Experts,
       I have configured a simple SOAP to JDBC scenario where the input data from webservice call is sent to JDBC for inserting into MSSQL database.
       The problem is that even though I have setup the QOS in SOAP channel as EO but still in SXMB_MONI I can see the message getting processed as Synchrous but getting interface mapping not found error. But the data is getting inserted in the database.
      Why is this not getting processed asynchrously? Please advice me if I am missing anything?
    Thanks
    Gopal

    Hello Gopal,
    Hope these lonks are useful to you:
    SOAP to JDBC : EXCEPTION_DURING_EXECUTE
    Re: need help on SOAP-JDBC-RFC Scenario
    SOAP to JDBC/RFC  - RFC/JDBC  to  SOAP XI Scenario
    Thanks,
    Satya Kumar

  • Create XML file from ABAP with SOAP Details

    Hi,
    I am new to XML and I am not familiar with JAVA or Web Service. I have searched in SDN and googled for a sample program for creating XML document from ABAP with SOAP details. Unfortunately I couldn't find anything.
    I have a requirement for creating an XML file from ABAP with SOAP details. I have the data in the internal table. There is a Schema which the client provided and the file generated from SAP should be validating against that Schema. Schema contains SOAP details like Envelope, Header & Body.
    My question is can I generate the XML file using CALL TRANSFORMATION in SAP with the SOAP details?
    I have tried to create Transformation (Transaction XSLT_TOOL) in SAP with below code. Also in CALL transformation I am not able to change the encoding to UTF-8. It's always show UTF-16.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
      <xsl:template match="/">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP:Header>
            <CUNS:HeaderInfo>
              <CUNS:InterfaceTypeId>10006</InterfaceTypeId>
              <CUNS:BusinessPartnerID>11223344</BusinessPartnerID>
              <CUNS:SchemaVersion>1.0</SchemaVersion>
              <CUNS:DateTime>sy-datum</DateTime>
            </CUNS:HeaderInfo>
          </SOAP:Header>
          <SOAP:Body>
            <xsl:copy-of select="*"/>
          </SOAP:Body>
        </SOAP:Envelope>
      </xsl:template>
    </xsl:transform>
    In ABAP program, I have written below code for calling above Transformation.
      call transformation ('Z_ID')
           source tab = im_t_output[]
           result xml xml_out.
      call function 'SCMS_STRING_TO_FTEXT'
        exporting
          text      = xml_out
        tables
          ftext_tab = ex_t_xml_data.
    Please help me how to generate XML file with SOAP details from ABAP. If anybody have a sample program, please share with me.
    Is there any easy way to create the XML file in CALL Transformation. Please help.
    Thanks

    Try ABAP forum, as it seems not to be PI related.

  • WSRM Adapter replaced with soap in PO7.4. Getting error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error"

    Hello All,
    We have scenario proxy->pi->webservice. In older versions of PI system they used wsrm adapter at receiver side and it's working fine.
    Receiver interface is asynchronous. So no response structute is present and receiver service is business component(since receiver is a third party).
    During migration, we have replaced the receiver adapter with SOAP adapter and used message protocol as SOAP 1.1 but the message is failing and in communication channel it is showing error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error". In this case the receiver interface is stateless xi 3.0 compatible(re using the old), after changing it to just stateless also issue persists.
    In target url field if i prefix the url with "http" then above mentioned error is occurring otherwise if i use the hostname:port/path.. then it is giving error
    "soap: Call failed: com.sap.aii.af.sdk.xi.srt.BubbleException: Unsupported protocol". So maintaing the url as http://hostname:port/pat.....
    As in old channel wsrm channel there is no userid and password, i haven't given any userid/pwd in receiver channel.
    used the bean sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean with  parameters
    Module Key  =  soap
      Parameter Name  =  noSOAPMakeSysErrFromResponseFault
    Parameter Value  =  false
    and
    xmbws.No SOAPIgnoreStatus = true
    but not successful.
    Please help me. I got stcuk here.

    Hello Jannus,
    The connectivity is working fine. Network team has confirmed it. I doubt that any strucutre(header) difference might be present in message when sending with wsrm adapter compared to sending with soap adapter.
    Please let me know the exact difference between soap and wsrm functionality in receiving end.
    By considering the structure issue, i have checked the "do not use soap envelope" check box, then i got error "Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Unsupported Media Type"
    Then i used message transform bean, but not successful.
    Regards,
    Ch.Venkat.

  • XSLT Problem with soap namespace

    Hi there,
    I have a problem transforming an XML doc with soap elements, using XSLT (Xalan).
    Here's the input:
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ean.nl">
      <testthis>123456</testthis>
    </soap:Envelope>and here's the XSL:
    <?xml version="1.0"?>
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>I expect to get something like:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01>123456<H01>
    <Orders>But instead I get:
    <?xml version="1.0" encoding="UTF-8"?>
    <Orders>
    <H01/>
    </Orders>I've tried a lot of things and I'm probably overseeing something stupid, but I'm stuck.
    It seems as if anything without soap: namespace cannot be processed by my XSL (when I add it in the input XML and XSL it works).
    Any help would be greatly appreciated.
    Greetings,
    Erik

    Yes, I found it!
    The following XSL for the same XML doc works!
    <?xml version="1.0"?>
    <xsl:transform xmlns:ean="http://www.ean.nl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="soap">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="soap:Envelope">
    <Orders>
         <H01>
              <xsl:value-of select="ean:testthis"/>
         </H01>
    </Orders>
    </xsl:template>
    </xsl:transform>Thanks, you pointed me in the right direction :-)
    Erik

  • Another problem with SOAP sender

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

  • How to Post XML Messages with SOAP Headers to a Trading Partner URL

    Hi All,
    Greeting to the Oracle B2B Community. We are currently working on how to post a Custom XML Message with SOAP Headers to a Trading Partner URL. I would really appreciate if anybody could provide me some inputs or links to some documentation on how to achieve the above requirement. The details are below:
    1. Our Internal Application generates a Flat File (PO Extract).
    2. The Extract then needs to be transformed to an XML Message. We are planning to use BPEL to do the transformation to XML Message.
    3. Once it is transformed to an XML message it needs to be posted to the Trading Partner URL as an HTTP Post and with SOAP Headers.
    We are planning to use B2B to do the posting but I am not sure on how to do the set-ups and what all parameter files in B2B needs to be updated in order to achieve the same. Also it is mandatory that we send SOAP Headers in the XML Message.
    Thanks In Advance for your help.
    Regards,
    Dibya

    Hello Dibya,
    As you are already doing the transformation from Flat file to XML in BPEL which is typically the capability of B2B, please use the Soap binding in BPEL to send the document to Trading partner.
    Rgds,Ramesh

  • Building client proxies for web services with SOAP attachemtns

    Hi all.
    I'm currently building a series of web services that take SOAP attachments as
    input, but I am unable to generate the java proxies for testing the services via
    WebLogic Workshop 8.1. When I attempt to build the proxy, I get the following
    error:
    Warning: Failed to generate client proxy from WSDL definition for this service.
    Suggestion: Please verify the <types> section of the WSDL.
    Is there something I need to alter to get this to work, or does workshop not support
    client proxies for web services with DataHandler parameters?
    Thanks.
    -Brian

    Thanks for the help. This is my first web service with SOAP attachments, so it
    may have been a long time till I realized that.
    -Brian
    "Michael Wooten" <[email protected]> wrote:
    >
    Thanks Brian,
    The problem is that you are trying to use the "document" soap-style :-)
    If you change this to "rpc", you'll should be able to successfully generate
    the
    client proxy jar. The soap-style property, is at the bottom of the "protocol"
    property sheet section, for the JWS.
    Regards,
    Mike Wooten
    "Brian McLoughlin" <[email protected]> wrote:
    Sure, sorry about that. Attached is the wsdl for a sample web service
    I created
    just to test the proxy generation.
    "Michael Wooten" <[email protected]> wrote:
    Hi Brian,
    Would it be possible for you to post the WSDL, so we can see what might
    be causing
    the problem?
    Regards,
    Mike Wooten
    "Brian McLoughlin" <[email protected]> wrote:
    Hi all.
    I'm currently building a series of web services that take SOAP attachments
    as
    input, but I am unable to generate the java proxies for testing theservices
    via
    WebLogic Workshop 8.1. When I attempt to build the proxy, I get the
    following
    error:
    Warning: Failed to generate client proxy from WSDL definition for
    this
    service.
    Suggestion: Please verify the <types> section of the WSDL.
    Is there something I need to alter to get this to work, or does workshop
    not support
    client proxies for web services with DataHandler parameters?
    Thanks.
    -Brian

  • OWSM Policy Binding Disabled for proxy/business server with SOAP 1.1

    Hi,
    I am using 11pPS2.
    In osb, i created a proxy service with soap 1.1. and business proxy with soap 1.1
    Now I click Policies tab of each service,
    In Service Policy Configuration,
    OWSM Policy Bindings is disabled to choose.
    So I can't attach any OWSM policy to osb service.
    Only Custom Policy bidings are enabled.
    appreciate any help and comments on this issue

    Need check if you Extend your Oracle Service Bus domain with Oracle Web Services Manager and Oracle Enterprise Manager.
    Select the following domain templates when running the Oracle Fusion Middleware Configuration Wizard
    Oracle Service Bus OWSM Extension
    Oracle WSM Policy Manager (automatically selected when you select the OWSM Extension)
    Oracle Enterprise Manager (optional, needed for creating and managing Oracle Web Services Manager policies)

  • Trying to invoke HTTPService with SOAP request

    Hi all,
    I have been trying to invoke a HTTPService with a SOAP request.
    Most of the times I get an error saying that the client has invoked
    HTTP with get instead of a POST eventhough my code takes care of
    it. Any clue on this? I have copied the code snippet below which
    has the SOAP request in a variable message.
    <?xml version="1.0"?><!--
    fds\rpc\WebServiceAddHeader.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="628" width="924">
    <mx:Script>
    <![CDATA[
    import mx.messaging.messages.HTTPRequestMessage;
    import mx.messaging.messages.SOAPMessage;
    var message:SOAPMessage = new SOAPMessage();
    public var msg:HTTPRequestMessage = new
    HTTPRequestMessage();
    public function headers():void {
    msg.contentType = HTTPRequestMessage.CONTENT_TYPE_SOAP_XML;
    msg.method = HTTPRequestMessage.POST_METHOD;
    msg.url = "
    http://ldlt7316.wellsfargo.com:8016/hulaweb/FrameworkServletListener";
    msg.body = <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:msg="
    http://service.wellsfargo.com/entity/message/2003/"
    xmlns:hcfg="
    http://service.wellsfargo.com/provider/HCFG/entity/envelope/2004/"><SOAP-ENV:Header><msg:W FContext><msg:messageId>1175034929937</msg:messageId><msg:sessionSequenceNumber>1</msg:ses sionSequenceNumber><msg:creationTimestamp>2007-03-27T04:35:29-0600</msg:creationTimestamp> <msg:originatorId>aow</msg:originatorId><msg:initiatorId>AOW</msg:initiatorId></msg:WFCont ext><hcfg:hulaContext><service>ApplicationDataService</service><action>getApplicationByDea lID</action><msg:processingMode>sync</msg:processingMode><contextType>SERVICE_REQUEST</con textType><password>PASSWORD123</password><msg:behaviorVersion>1</msg:behaviorVersion></hcf g:hulaContext></SOAP-ENV:Header><SOAP-ENV:Body><ns:getLendingData
    xmlns:ns="
    http://service.wellsfargo.com/provider/HCFG/common/lendingDataTransfer/getLendingData/2006 /"><servicePreferences><ns1:maximumWaitTime
    xmlns:ns1="
    http://service.wellsfargo.com/provider/HCFG/entity/common/2004/">600</ns1:maximumWaitTime> <ns1:maxReturn
    xmlns:ns1="
    http://service.wellsfargo.com/entity/message/2003/">10</ns1:maxReturn></servicePreferences ><lendingTransaction><transactionDetail>
    <ns1:dealId xmlns:ns1="
    http://service.wellsfargo.com/provider/HCFG/entity/transactionDetail/2005/">
    323010
    </ns1:dealId></transactionDetail></lendingTransaction></ns:getLendingData></SOAP-ENV:Body ></SOAP-ENV:Envelope>
    soapCall.request = msg;
    soapCall.method = "POST";
    soapCall.send();
    ]]>
    </mx:Script>
    <mx:HTTPService
    id="soapCall"
    resultFormat="xml"
    method="post"
    showBusyCursor="true"
    makeObjectsBindable="false"
    useProxy="false"
    requestTimeout="120"
    url="
    http://ldlt7316.wellsfargo.com:8016/hulaweb/FrameworkServletListener"
    request="{msg}">
    </mx:HTTPService>
    <mx:Panel layout="absolute" title="{soapCall.lastResult}"
    id="blog" fontFamily="Courier New">
    <mx:DataGrid x="15" y="10" id="dgPosts" width="482"
    dataProvider="{soapCall.lastResult}" height="108">
    <mx:columns>
    <mx:DataGridColumn headerText="Name"
    dataField="code"/>
    <mx:DataGridColumn headerText="Dates"
    dataField="lastName"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:LinkButton label="Get Data" click="headers()"/>
    <mx:TextArea x="15" y="145" width="782" fontSize="9"
    fontFamily="Verdana" borderStyle="inset"
    htmlText="{soapCall.lastResult}" height="379"/>
    </mx:Panel>
    </mx:Application>

    Would really appreciate some help with this issue. Thanks!

  • Help with java digital signing code

    hello people.
    can anybody help me?
    i have find a java code to resolve my problem with sending pay in soap envelope with digital signature and attached certificate. i compiled it with jdk jdk1.6.0_37. and it works.
    i need it to work in built-in jvm in oracle 9i. in oracle 9i jvm release is 1.3.1. Java code does not work there. there is an error
    class import com.sun.org.apache.xerces.internal.impl.dv.util.Base64 not found in import.
    i did not find this class in network.
    can anybody help with rewriting it for jvm 1.3.1?
    thanks in advance.
    code below:
    import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
    import java.io.*;
    import java.security.Key;
    import java.security.KeyStore;
    import java.security.PrivateKey;
    import java.security.Signature;
    import java.security.cert.Certificate;
    public class Sign {
    public static void main(String[] args) throws Exception {
    // TODO code application logic here
    BufferedReader reader = new BufferedReader(new FileReader("c:\\cert.p12"));
    StringBuilder fullText = new StringBuilder();
    String line = reader.readLine();
    while (line != null) {
    fullText.append(line);
    line = reader.readLine();
    KeyStore p12 = KeyStore.getInstance("pkcs12");
    p12.load(new FileInputStream("c:\\cert.p12"), "Hfrtnf$5".toCharArray());
    //????????? ????????? ????, ??? ????? ????? ???????????? alias ? ??????
    //Key key = p12.getKey("my kkb key", "ryba-mech".toCharArray());
    Key key = (Key) p12.getKey("my kkb key", "Hfrtnf$5".toCharArray());
    Certificate userCert = (Certificate) p12.getCertificate("my kkb key");
    String base64Cert = new String(Base64.encode(userCert.getEncoded()));
    //signing
    Signature signer = Signature.getInstance("SHA1withRSA");
    signer.initSign((PrivateKey) key);
    signer.update(fullText.toString().getBytes());
    byte[] digitalSignature = signer.sign();
    String base64sign = new String(Base64.encode(digitalSignature));
    String base64Xml = new String(Base64.encode(fullText.toString().getBytes()));
    System.out.println("<certificate>" + base64Cert+"</certificate>");
    System.out.println("<xmlBody>" + base64Xml+"</xmlBody>");
    System.out.println("<signature>" + base64sign+"</signature>");
    Edited by: user13622283 on 22.01.2013 22:08

    My first search is to see if there is an Apache commons project that provides it. Lo and behold:
    http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64.html
    commons-codec.

Maybe you are looking for