Accessing Java webservice (XML over http) via WCF or HTTP adapter with content-type and authorization HTTP headers with POST method

Hi Team,
I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
<GetStatus> message is being constructed in the orchestration and URI is constant to access.
Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
System.Net.WebException:
The HTTP request is unauthorized with client authentication scheme 'Basic'. The
authentication header received from the server was 'Basic realm='.
Authentication failed for principal Basic. Message payload is of type:
String 
In Fiddler, request looks line following
POST <https://URL/GetServiceReopnse HTTP/1.1
Content-Type: application/xml
Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
Host: <Server name>
<GetStatus XMLNS="http://server.com/.....">
<OrgId>232323</OrgId>
<HubId>3232342323</HubId>
</GetStatus>
MMK-007

First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
Start with the WCF-Custom Adapter and select the customBinding.
You should start with the textMessageEncoder and httpTransport and go from there.

Similar Messages

  • SRT: Wrong Content-Type and empty HTTP-Body received

    Hi All,
    I created and activated a web service for data acquisition in BI 7.0. The service has been activated and when do a test service from SICF transaction I get the following error page.
    I appreciate any  help to resolve this issue.
    Thanks,
    Jomon
    - <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <soap-env:Header />
    - <soap-env:Body>
    - <soap-env:Fault>
      <faultcode>soap-env:Server</faultcode>
      <faultstring xml:lang="en">SRT: Wrong Content-Type and empty HTTP-Body received</faultstring>
    - <detail>
    - <ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">
      <Host>undefined</Host>
      <Component>COREMSG</Component>
    - <ChainedException>
      <Exception_Name>CX_SOAP_CORE</Exception_Name>
      <Exception_Text>SRT: Wrong Content-Type and empty HTTP-Body received</Exception_Text>
      </ChainedException>
      </ns:SystemFault>
      </detail>
      </soap-env:Fault>
      </soap-env:Body>
      </soap-env:Envelope>

    good morning,
    i am having the same problem, did you find an answer for this? can you update either this message, or reply back at your findings.
    we are trying to get a external system to talk with ecc 6.0 thru sap connecter for .net v2.0.1. it worked with sap 4.6c, but not now.
    any help is appreciated.
    thanks.

  • OSB+how to change content type header in http transport header.

    I have a requirement where I need to change the value of:
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
    to the end system specific like:
    <http:Content-Type>application/abcd-cvs-v1+xml; </http:Content-Type>
    and the http:accept value to:
    <http:Accept>application/abcd-cvs-v1+xml</http:Accept>
    Can some one please explain how to do this.

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html
    Use replace action/insert on the follwoing QPath in trhe request action of the ServiceCallout/Routing as
    $outbound/ctx:transport/ctx:request/tp:headers/http:Content-Type
    $outbound/ctx:transport/ctx:request/tp:headers/http:Accept
    Manoj

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • Access my web.xml data source via a class

    Hi - I've gone ahead and set up a datasource in my web.xml according to the steps provided here by the good folks at Netbeans. I know my db works and my data source is set up correctly because I'm able to get results back from something using the following bits in a jsp:
    <sql:query var="prodListQry" dataSource="jdbc/Goober">
        SELECT DISTINCT PRODUCT_NAME,PRODUCT_CODE FROM PRODUCTS //edited somewhat
    </sql:query>
    //lots of stuff
    <c:forEach var="prodListQry" items="${prodListQry.rows}">
    <option value="${prodListQry.PRODUCT_NAME}"     
           >${prodListQry.PRODUCT_NAME}${prodListQry.PRODUCT_CODE}</option>
    </c:forEach>That's all well and good, but I don't seem to be bright enough to extrapolate how to use this same resource (if I can) from within a class (ie NOT a jsp).
    I'm left with duplicate code like the following, which we all know is bad...
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         String username = "";
         String password = "";
         con = DriverManager.getConnection("jdbc:odbc:Goobir",username,password);
    //...Can anyone point me in the right direction?

    Sounds promising.... I'm testing it out as a scriptlet within a jsp before I put it in a class, but it seems like I need to import something...
    "Generated servlet error cannot find symbol
    symbol : class Context"
    My complete jsp is as follows:
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*" %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
    <%
    Context initContext = new InitialContext();
    DataSource dataSource = (DataSource) initContext.lookup("jdbc/Goober");
    Connection connection = dataSource.getConnection();
        %>
        </body>
    </html>

  • CFHTTP request with content-type "application/atom+xml"

    Is it possible to send a HTTP request (method="post")  with a body that has a set content-type (such as "application/atom+xml")?
    using CFHTTP and CFHTTPPRAM, it seems the tag does not accept a content-type.
    <cfhttpparam type="body" value="#myAtomXML#">
    is there anyway to have CFHTTP , post the body with a given content-type?
    IF NOT, could anyone point me to the right direction to accompolish this using Java?

    Hi,
    Have you tried the "mimetype" attribute of the <cfhttpparam> tag?.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_10.html

  • HT1386 I have been syncing my IPad to only one PC computer successfully for over a year.  Now when I try to sync I get the message that the ipad is synced with another computer and can be synced with only one.  How can I correct this?

    Although I have synced my ipad to only one PC computer I now get the message that it is synced to another computer and only one computer sync is permitted.  I have lots of apps on the ipad and do not want to loose everything by starting fresh with the ipad.  How can I get the ipad to again accept my computer and sync successfully?

    Plawexki wrote:
    ...  do you know if the contacts, photos, messages etc will be wiped?
    Yes... Everything will be Wiped and Replaced with what is currently on Your Mac.
    SYNCING with iTunes
    See here  >  http://support.apple.com/kb/HT1386
    From Here  >  http://www.apple.com/support/iphone/syncing/
    You may find this information of interest...
    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • Using PL/SQL Function with CLOB types and a Java Source

    Hi people.
    I have some problems trying to use a function in pl/sql with a CLOB parameter to a java source function.
    Here is the problem: I have to read a TXT file and return a CLOB with the data of the file. The reading is done with a java source function.
    The problem is how to read the file without messing the content and return it to the pl/sql function?
    Another problem: If I pass a CLOB as a parameter to a pl/sql function and have to write the content to a file, how to do it without screwing the EOL chars and so?
    My code is:
    /******** PLSQL FUNCTIONS ********/
    function fn_gravaconteudoarquivo( pv_caminho in varchar2
    , pv_nomearquivo in varchar2
    , pc_conteudo in clob ) return varchar2 as language java
    name 'Importacao.gravaConteudoArquivo(java.lang.String, java.lang.String, oracle.sql.CLOB) return varchar2';
    function fn_lerconteudoarquivoclob( pv_caminho in varchar2
    , pv_nomearquivo in varchar2 ) return clob as language java
    name 'Importacao.lerArquivoClob(java.lang.String, java.lang.String) return clob';
    /******** JAVA SOURCE FUNCTIONS *********/
    public static String gravaConteudoArquivo(String caminho, String nomeArquivo, CLOB conteudo) {
    File file = new File(caminho, nomeArquivo);
    PrintWriter pwFile;
    String mensagem = "";
    StringBuffer sb = new StringBuffer();
    try {
    pwFile = new PrintWriter(new BufferedWriter(new FileWriter(file,true)));
    for (int i=0;i<=(conteudo.length()/32000);i++) {
    sb.append(conteudo.getSubString(conteudo.getLength()+1,32000));
    pwFile.println(sb.substring(0));
    pwFile.close();
    } catch (Exception ex) {
    mensagem = "Erro: "+ex;
    return mensagem;
    public static CLOB lerArquivoClob(String caminho, String nomeArquivo) throws SQLException {
    File file = new File(caminho, nomeArquivo);
    Connection conn;
    CLOB clob = null;
    String lineSep = System.getProperty("line.separator");
    StringBuffer sb = new StringBuffer();
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:csdesv", "csestoque", "liberada");
    clob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    BufferedReader brFile = new BufferedReader(new FileReader(file.getPath()));
    while (brFile.ready()) {
    sb.append(brFile.readLine());
    sb.append(lineSep);
    clob.open(CLOB.MODE_READWRITE);
    clob.setString(clob.getLength()+1, sb.toString());
    clob.close();
    } catch (Exception ex) {
    ex.printStackTrace();
    return clob;
    Ah, just remembered... This will work as a JOB.... >.< ... So the connection aparently is at localhost.
    Thanks.

    No one? I really need this....

  • My kid id just starting to explore her voice. Are there formats of music that can be simply imported to Gband that she can then add her voice over. I know its Kereokeeish, but she is 7 and wants to tinker with recording. thanks for input.

    My kid is just starting to explore her voice. I was trying to find out is there a way to import insturmental versions of songs to Gband and then allow her to sing over the music. Essentially creatig a cover of the song with her voice that can later be tweaked in the Gband program. I know this is kereokeeish, but she is 6 and im brand new at Gband and have no studio backround. Very cool program but a little overwhelming so far. Thanks for any guidance.

    search for standard MIDI files, they can simply be dropped into the GB timeline and you can then assign instruments to each track.
    as well if you find any karaoke files in any of GB's supported formats:
    http://www.bulletsandbones.com/GB/GBFAQ.html#importformats
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    you can drop them into the timeline as well

  • Any resolution with Xfi cards and Win 7 64bit with over 4gb??

    I recently went from 2gb to 4gb and found that my xtremegamer will not work unless I set the GB below 4gb. I have all updated drivers. I don't want to decrease my ram or buy a new card/use onboard sound. I see that this issue has been ongoing for quite awhile now. Is there REALLY no resolution for this? Is there an outside driver that works and has decent quality sound? Anything?

    @I'm using an old Xtrememusic card on a Win 7 / 64 bit machine with 8 gb RAM and no issues. I installed the beta driver a few days ago, but, as of yesterday, it appears Creative made it the uni'versal driver for it's X-Fi cards. You may want to try the newest driver (.04).

  • Content type is text\xml - 400 Bad Request, Content Type - Blank - success

    Hi,
    I have a send port subscribing to a message from the Message Box and sending the message to a service.
    The content type is text\xml, and it fails with a 400-Bad Request.
    If the send port picks up the message from a folder , Content Type is Blank, the service returns a response.
    How do I make the message picked up from the Message Box ( with Content Type text\xml)  work. Can I change the Content Type of the message at the Send Port (WCF-Custom, Basic HTTP Binding).
    Regards,
    Sharmishtha Sarkar

    You issue is not with Content Type text\xml  On the wire web request is passed as text\xml as content type and  issues is neither with send port folder .
    I would say you need to check your send port binding and  SOAP Action header inside your Send Handler . Best way to import the binding generated while consuming service through BizTalk WCF Service Consuming Wizard.
    I suspect you are sending wrong message to web service and thus due to data contract conflict you are getting exception from the service .
    There are various articles which can guide you how to consume web service in BizTalk .Some of them are listed below .
    How to Use the BizTalk WCF Service Consuming Wizard to Consume a WCF Service
    BizTalk and WCF: Part I, Operation Patterns
    Consuming WCF Service in BizTalk 2010 Orchestration
    Thanks
    Abhishek

  • Query regarding sending XML over HTTP Post request

    Hello,
    I am trying to send XML data from a server to client via HTTP Post request
    And vice versa � receive the data by a client
    Assume that the xml data looks something like
    <?xml+version="1.0"?>
    So my post query will look like
    http://<IP Address>:<port>/
    POST /MessageReceiver.jsp HTTP/1.0
    Host: www.SomeHost.net
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 38
    %3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+
    This information will be received by the client and converted back to xml data.
    My query is - is there some library/open-source stuff that
    does the process of transcoding the entity's non-ASCII characters
    at the server side
    and decoding the URL back to human-readable form at the client side?
    i.e. I need a simple mechanism to convert
    <?xml+version="1.0"?>
    to
    %3C%3Fxml%2Bversion%3D%221.0%22%3F%3E+
    at the server side, while sending data
    and do the opposite at the client side to get the xml back.
    Also could some one confirm if JTidy is a right tool to check if the xml is well-formed?
    Or is there any other standard tool that checks for well-formed properties of xml?
    regards,
    Deepak.

    java.net.URLEncoder / URLDecoder?
    Also could some one confirm if JTidy is a right tool to check if the xml is well-formed?No, it's for parsing HTML. An XML parser is checking for well-formedness in any case.

  • Query regarding encoding/decoding of XML over HTTP Post request

    Hello,
    I am working on a project where I need to put SMS inside XML and
    eventually transfer this XML via HTTP post from/to server/client.
    Assuming the SMS to be 7-bit text the XML may look something like
    <?xml+version="1.0"?>
    <SMS
    TESTMESSAGE
    </SMS>
    This XML when encoded in a HTML post may look something like
    http://<IP Address>:<port>/
    POST /MessageReceiver.jsp HTTP/1.0
    Host: www.SomeHost.net
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 90
    xmlMsg=%3C%3Fxml+version%3D%221.0%22%3F%3E%0D%0A%3CSMS%0D%0A%09TESTMESSAGE0D%0A%3C%2FSMS%3E
    This xml is UTF-8 (7-bit ASCII) by default since no encoding format has been specified.
    My question - how will the encoding of xml change to - when 8 bit binary data
    is transferred via xml.
    for e.g.
    <?xml+version="1.0"?>
    <SMS
    <!!!!!BINARY DATA!!!!!>
    </SMS>
    for such a file how/what shld the encoding be set to.
    Further my spec-states the following.
    "The content of the XML must respect the encoding. Thus a SMS
    containing typically french characters must use ISO-8859-1 encoding"
    "This code needs to work with both UTF-8 and UTF-16 standards (ASCII and Unicode). Because of this the parsing code should work internally with UTF-16 and translate up/down to/from UTF-8 (ASCII) only when dealing with the basic HTTP."
    could anyone clarify this for me.

    The first thing you need to do is clear up some fundamental misconceptions about character encodings. UTF-8 is not the same thing as "7-bit ASCII", and UTF-16 is not the same as "Unicode". Anyway, you're making this a lot more difficult than it needs to be. Just use UTF-8 to encode and decode all messages; it can handle all the characters from any language you're likely to run into.

  • WCF client consumes JAVA web service - should I use WCF or just create a custom parser/message factory?

    We've a business partner who requires us to create a service request message with a SAML 2.0 assertion. The partner's supplied two certificates and a test harness for their JAVA webservice.
    I've created a WCF client with a `CustomBinding` to try and recreate the request and consume the service, but I'm getting so frustrated with the nuances of WCF (and the lack of intrinsic support for SAML 2.0) I'm wondering am I better off using something like
    a `WebClient` or `HttpWebRequest` and encrypting/building & signing the XML web request and doing the same for the response. I know there's a lot of work involved on this but at least I'd be in full control.
    Your advice would be very much appreciated, what I'm working with is displayed below
    **Note: I was supplied with a SoapUI Test harness for the Java service**
    **The vendor supplied me with this request (ran though SOAPUI and extracted via Fiddler)**
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
    <SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <xenc:EncryptedKey Id="EncKeyId-29B98C291D1FDFB39113352984774895">
    <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <wsse:SecurityTokenReference>
    <ds:X509Data>
    <ds:X509IssuerSerial>
    <ds:X509IssuerName>CN=test_server</ds:X509IssuerName>
    <ds:X509SerialNumber>12356789</ds:X509SerialNumber>
    </ds:X509IssuerSerial>
    </ds:X509Data>
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    <xenc:CipherData>
    <xenc:CipherValue>
    <!--Omitted -->
    </xenc:CipherValue>
    </xenc:CipherData>
    <xenc:ReferenceList>
    <xenc:DataReference URI="#EncDataId-3"/>
    </xenc:ReferenceList>
    </xenc:EncryptedKey>
    <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="CertId-29B98C291D1FDFB39113352984773591" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><!-- Omitted --> </wsse:BinarySecurityToken>
    <ds:Signature Id="Signature-1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <ds:Reference URI="#id-2">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <ds:DigestValue>
    <!--Omitted -->
    </ds:DigestValue>
    </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>
    <!--Omitted -->
    </ds:SignatureValue>
    <ds:KeyInfo Id="KeyId-29B98C291D1FDFB39113352984773792">
    <wsse:SecurityTokenReference wsu:Id="STRId-29B98C291D1FDFB39113352984773893" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Reference URI="#CertId-29B98C291D1FDFB39113352984773591" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    </ds:Signature>
    </wsse:Security>
    <saml:Assertion ID="_54d0c8395de26c3e44730df2c9e8d3e9" IssueInstant="2012-02-17T10:40:36.806Z" Version="2.0" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
    <saml:Issuer>CN=test_client</saml:Issuer>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <Reference URI="#_54d0c8395de26c3e44730df2c9e8d3e9">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted -->
    </DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>
    <!--Omitted -->
    </SignatureValue>
    <KeyInfo>
    <X509Data>
    <X509Certificate>
    <!--Omitted -->
    </X509Certificate>
    </X509Data>
    </KeyInfo>
    </Signature>
    <saml:Subject>
    <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">[email protected]</saml:NameID>
    </saml:Subject>
    <saml:Conditions NotBefore="2012-02-17T10:40:21.806Z" NotOnOrAfter="2012-02-17T10:41:06.806Z"/>
    </saml:Assertion>
    <wsa:Action SOAP-ENV:mustUnderstand="1">http://www.xxxxxxx.xxx/ws/schemas/xxxxxx1/xxxx/xxxxxxxxxxxxxx</wsa:Action>
    <wsa:MessageID SOAP-ENV:mustUnderstand="1">uuid:bffc27ba-68d9-44e6-b1f0-e2f852df7715</wsa:MessageID>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body wsu:Id="id-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <xenc:EncryptedData Id="EncDataId-3" Type="http://www.w3.org/2001/04/xmlenc#Content">
    <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:Reference URI="#EncKeyId-29B98C291D1FDFB39113352984774895"/>
    </wsse:SecurityTokenReference>
    </ds:KeyInfo>
    <xenc:CipherData>
    <xenc:CipherValue>
    <!--Omitted -->
    </xenc:CipherValue>
    </xenc:CipherData>
    </xenc:EncryptedData>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    **This is as close as I've gotten with my WCF client. Issues I can immediatley is that the `<o:SecurityTokenReference>` element should contain the Issuer and Serial, instead it contains a `KeyIdentifier` element?**
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
    <a:Action s:mustUnderstand="1" u:Id="_3"/>
    <a:MessageID u:Id="_4">urn:uuid:fc8ef84b-dbf5-4150-a0c3-d4cc986333d1</a:MessageID>
    <ActivityId CorrelationId="a9e1fec4-32bc-4633-909e-3d601c809b3c" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">d1909115-8922-46f3-a96c-db15bf91c599</ActivityId>
    <a:ReplyTo u:Id="_5">
    <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
    </a:ReplyTo>
    <VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo27oY4/3mnBOry0YL4StqvcAAAAA0UM+eVt4fU2AOe9/B3lPDZNf/2HmAuNEvzAoW0eKVSUACQAA</VsDebuggerCausalityData>
    <a:To s:mustUnderstand="1" u:Id="_6">https://localhost:8089/ws</a:To>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <u:Timestamp u:Id="uuid-e5592f06-32af-40fb-996e-a0a469c7ed5e-2">
    <u:Created>2012-04-24T20:41:50.447Z</u:Created>
    <u:Expires>2012-04-24T20:46:50.447Z</u:Expires>
    </u:Timestamp>
    <e:EncryptedKey Id="uuid-e5592f06-32af-40fb-996e-a0a469c7ed5e-1" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <o:SecurityTokenReference>
    <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">lU10DQn4lSpE4fRpE9gslm5QDt0=</o:KeyIdentifier>
    </o:SecurityTokenReference>
    </KeyInfo>
    <e:CipherData>
    <e:CipherValue>
    <!--Omitted-->
    </e:CipherValue>
    </e:CipherData>
    <e:ReferenceList>
    <e:DataReference URI="#_2"/>
    <e:DataReference URI="#_7"/>
    <e:DataReference URI="#_8"/>
    </e:ReferenceList>
    </e:EncryptedKey>
    <o:BinarySecurityToken u:Id="uuid-fad0c01f-ab4b-4a5f-bec6-93aa8c2d5a52-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"><!--Omitted--></o:BinarySecurityToken>
    <e:EncryptedData Id="_7" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    <e:CipherData>
    <e:CipherValue>
    <!--Omitted-->
    </e:CipherValue>
    </e:CipherData>
    </e:EncryptedData>
    <e:EncryptedData Id="_8" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    <e:CipherData>
    <e:CipherValue><!--Omitted--></e:CipherValue>
    </e:CipherData>
    </e:EncryptedData>
    </o:Security>
    </s:Header>
    <s:Body u:Id="_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    <e:CipherData>
    <e:CipherValue><!--Omitted--></e:CipherValue>
    </e:CipherData>
    </e:EncryptedData>
    </s:Body>
    </s:Envelope>
    Using this configuration for the WCF CustomBinding
    <system.serviceModel>
    <bindings>
    <customBinding>
    <binding name="WSHttpBinding_IEnquiryRequest" >
    <transactionFlow />
    <security defaultAlgorithmSuite="TripleDesRsa15"
    authenticationMode="MutualCertificate"
    messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
    requireDerivedKeys="false"
    >
    <secureConversationBootstrap authenticationMode="CertificateOverTransport"
    messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
    requireDerivedKeys="false" />
    </security>
    <textMessageEncoding messageVersion="Soap11WSAddressing10" />
    <!--<mtomMessageEncoding messageVersion="Soap11WSAddressing10" />-->
    <httpsTransport requireClientCertificate="true" />
    </binding>
    </customBinding>
    </bindings>
    <behaviors>
    <endpointBehaviors>
    <behavior name="certBehaviour">
    <clientCredentials>
    <!-- clientCertificate not defaultCertificate -->
    <clientCertificate x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" findValue="test_client" />
    <serviceCertificate>
    <defaultCertificate x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="My" findValue="test_server"/>
    <authentication revocationMode="NoCheck" certificateValidationMode="None" />
    </serviceCertificate>
    </clientCredentials>
    </behavior>
    </endpointBehaviors>
    </behaviors>
    <client>
    <endpoint
    address="https://localhost:8089/pvs/ws"
    binding="customBinding"
    bindingConfiguration="WSHttpBinding_IEnquiryRequest"
    contract="XXXService.enquiryRequest"
    name="WSHttpBinding_IEnquiryRequest"
    behaviorConfiguration="certBehaviour"
    >
    <identity>
    <dns value="test_server"/>
    </identity>
    </endpoint>
    </client>
    </system.serviceModel>
    I've no idea how to insert the SAML 2.0 assertion in there before it's signed. That and the Key Issuer/serial issue above is where my main problems lie with the request.
    Any and all help appreciated
                        

    Yaron,
    Thanks a million for your response, think you hit the nail on the head there. Actually figured out the first part myself this morning, I've retrieved the SymmetricSecurityBindingElement object from the binding configured in the app.config and set it explicitly,
    just as you've defined. Couldnt figure out how to do this yesterday for some reason! Here's the code for anyone that's interested:
    //Get custom binding reference from app.config
    CustomBinding binding = new CustomBinding("bindingNameInConfig");
    // Reference the symmetric security element
    SymmetricSecurityBindingElement securityBindingElement = binding.Elements.Find<SymmetricSecurityBindingElement>();
    // Get the x509ProtectionParams from the security element
    X509SecurityTokenParameters tokenParameters = new X509SecurityTokenParameters();
    tokenParameters.X509ReferenceStyle = X509KeyIdentifierClauseType.IssuerSerial;
    tokenParameters.RequireDerivedKeys = false;
    tokenParameters.InclusionMode = SecurityTokenInclusionMode.AlwaysToInitiator;
    // Set the X509SecurityTokenParameters to point to the one's just configured. This is for symetric encryption, for asymetric this line needs to change
    securityBindingElement.ProtectionTokenParameters = tokenParameters;
    Are you sure that SAML assertion is not signed? That makes things a lot easier! Do you think the following approach will work when inserting in the SAML 2.0 assertion? :
    Create a class that inherits from IClientMessageInspector and insert the SAML as shown below
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.ServiceModel.Description;
    using System.ServiceModel.Dispatcher;
    using System.Text;
    using System.Xml;
    using Microsoft.IdentityModel.Protocols.XmlSignature;
    namespace TestClient.Application
    class Saml20Extension : IClientMessageInspector, IEndpointBehavior
    #region Implementation of IClientMessageInspector
    public object BeforeSendRequest(ref Message request, IClientChannel channel)
    MessageBuffer buffer = request.CreateBufferedCopy(int.MaxValue);
    // ** Add the SAML Assertion XML here **
    request = buffer.CreateMessage();
    return null;
    public void AfterReceiveReply(ref Message reply, object correlationState)
    MessageBuffer buffer = reply.CreateBufferedCopy(Int32.MaxValue);
    // ** REMOVE THE SAML ASSERTION HERE **
    reply = buffer.CreateMessage();
    #endregion
    #region Implementation of IEndpointBehavior
    public void AddBindingParameters(ServiceEndpoint endpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
    public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
    // Add this implementation to the inspectors.
    clientRuntime.MessageInspectors.Add(this);
    public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
    public void Validate(ServiceEndpoint endpoint)
    #endregion
    Also, There's a second signature being inserted into my WCF request that I need to replace with the SAML insertion - how do i get rid of the second signature?? (see updated request below)
    POST https://localhost:8089/pvs/ws HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    Host: localhost:8089
    Content-Length: 6720
    Expect: 100-continue
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <s:Header>
    <a:Action s:mustUnderstand="1" u:Id="_3"/>
    <a:MessageID u:Id="_4">urn:uuid:84dc0bb8-13fd-4e90-84c4-ed1e6e831801</a:MessageID>
    <ActivityId CorrelationId="07e0df62-d40a-4e24-aacc-12e626f80e8b" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">40077c44-d415-4567-99a1-1ea610c41d94</ActivityId>
    <a:ReplyTo u:Id="_5">
    <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
    </a:ReplyTo>
    <VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo1f0ZJ98FOxIvULl0pmGv/wAAAAAEGu5/G7VNkia/XbStJDa+ldqi+8xxdtAiBL+Y8vCqa0ACQAA</VsDebuggerCausalityData>
    <a:To s:mustUnderstand="1" u:Id="_6">https://localhost:8089/pvs/ws</a:To>
    <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <e:EncryptedKey Id="uuid-5b1de37e-ea76-4f75-b268-ebb63b554c11-1" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <o:SecurityTokenReference>
    <X509Data>
    <X509IssuerSerial>
    <X509IssuerName>CN=test_server</X509IssuerName>
    <X509SerialNumber>123456789</X509SerialNumber>
    </X509IssuerSerial>
    </X509Data>
    </o:SecurityTokenReference>
    </KeyInfo>
    <e:CipherData>
    <e:CipherValue><!--Omitted--></e:CipherValue>
    </e:CipherData>
    <e:ReferenceList>
    <e:DataReference URI="#_2"/>
    </e:ReferenceList>
    </e:EncryptedKey>
    <o:BinarySecurityToken u:Id="uuid-d62ff21f-7e9b-460d-a0ee-d5fad221427d-1" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MIIBpzCCARCgAwIBAgIETzKMfzANBgkqhkiG9w0BAQUFADAYMRYwFAYDVQQDDA10ZXN0X2ZhY2lsaXR5MB4XDTEyMDIwODE0NTM1MVoXDTE3MDIwODE0NTM1MVowGDEWMBQGA1UEAwwNdGVzdF9mYWNpbGl0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvzdwlxcpwRKGzLvpqYoS4NEbhbx/jV6Z6kyXgJ0IWLZAW20oWmxPwumsqkKr6bWX2NWbGrka6w1e9+iZFBKiBq5zzxJKusCJQtPjuYwjaTGjVTFnixHp9sKnjIEprKyarceG00WzCVdtuI1NpNp8dgemzA6FFt1ESwwELq+rKvECAwEAATANBgkqhkiG9w0BAQUFAAOBgQAokX6HZhhEj7Bfo0Z8ZeoZeYFB8pHrN5A6927cJx17EXWVv0Mwn/+fDgTAhtsN9DB68CFNejox8mM0+KewjsgT4z80YxMHGlpM13z4c8+iMiQcJ7cISScTBaTONOtDqK1WNtci8biNjnLn7+4Z4fw17jlttN0dPHC3fvGywh6TkQ==</o:BinarySecurityToken>
    <Signature Id="_0" xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
    <Reference URI="#_1">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    <Reference URI="#_3">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    <Reference URI="#_4">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    <Reference URI="#_5">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    <Reference URI="#_6">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>
    <!--Omitted-->
    </SignatureValue>
    <KeyInfo>
    <o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
    <o:Reference ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#EncryptedKey" URI="#uuid-5b1de37e-ea76-4f75-b268-ebb63b554c11-1"/>
    </o:SecurityTokenReference>
    </KeyInfo>
    </Signature><!-- Why is this second signature here? how do i get rid of it and replace with SAML --> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
    <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <Reference URI="#_0">
    <Transforms>
    <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
    </Transforms>
    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <DigestValue>
    <!--Omitted-->
    </DigestValue>
    </Reference>
    </SignedInfo>
    <SignatureValue>
    <!--Omitted-->
    </SignatureValue>
    <KeyInfo>
    <o:SecurityTokenReference>
    <o:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#uuid-d62ff21f-7e9b-460d-a0ee-d5fad221427d-1"/>
    </o:SecurityTokenReference>
    </KeyInfo>
    </Signature>
    </o:Security>
    </s:Header>
    <s:Body u:Id="_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
    <e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
    <e:CipherData>
    <e:CipherValue>
    <!--Omitted-->
    </e:CipherValue>
    </e:CipherData>
    </e:EncryptedData>
    </s:Body>
    </s:Envelope>

  • PI 7.1. Setup Abap user to access Java tools

    Hi gurus!
    I need your help, I'm working with a new PI instalation, and we have 2 types of user, one Java user with their password, and other ABAP user with their password. When I try to access to repository or directory, I must to use Java user, but in the other PI system, this is not so, I only use ABAP user for all things.
    In this system, I need keep roles in abap stack and java stack, and  think this is not optimal.
    How I can synchronize the two types of users for only use the ABAP user to all things?
    Thank you in advance.

    How I can synchronize the two types of users for only use the ABAP user to all things?
    Simple....assign the *_J2EE roles to your ABAP user....more information on the roles required can be taken from
    http://www.erpgenie.com/sap/netweaver/xi/xiauthorizations.htm
    We normally create only one user and then assign ABAP and JAVA roles to it.

Maybe you are looking for