Adding soap header in java

Can anyone please tell me how to add following security header in Webservices (WS 1.0 ) client using java code? (I m using axis 1.4)
<soap:Header>
<wsse:Security soap:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>[email protected]</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-
token-profile-1.0#PasswordText">adminOnDemand</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>

XML snippit
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:con="urn:crmondemand/ws/contact/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:con1="urn:/crmondemand/xml/contact">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>your_site/your_login</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">your_password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
This isn't exactly what you are looking for but you can use this to add a header to a axis web service call.
SOAPHeaderElement header = new SOAPHeaderElement("http://your.xsd", "your tag");
SOAPHeaderElement header1 = new SOAPHeaderElement("http://your other.xsd", "your other tag");
header1.setAttribute("Id", "your value");
header.addChild(header1);
SOAPElement node = header1.addChildElement("more text");
node.addTextNode("more text");
SOAPElement nodepwd = header1.addChildElement("another tag");
nodepwd.addTextNode("more text");
nodepwd.setAttribute("Type", "http://another url");
((Stub)service2).setHeader(header);
Hope this is more helpful than confusing.

Similar Messages

  • How to generate soap header using java code

    Hi,
    I need to generate the following soap header using java DOM.
    Can you send me some java code snippet to do so?
    <soapenv:Header>
    <api:RequesterCredentials soapenv:mustUnderstand="0" xmlns:api="urn:ThinkPod:api:ThinkPodAPI" xmlns:ebl="urn:ThinkPod:apis:eBLBaseComponents">
    <ebl:ThinkPodAuthToken>YourToken</ebl:ThinkPodAuthToken>
    <ebl:Credentials>
    <ebl:DevId>YourDevId</ebl:DevId>
    <ebl:AppId>YourAppId</ebl:AppId>
    <ebl:AuthCert>YourAuthCert</ebl:AuthCert>
    </ebl:Credentials>
    </api:RequesterCredentials>
    </soapenv:Header>

    You want to generate that on a mobile device or how is that related to CLDC and MIDP?

  • Adding soap header in MX6.1

    I have a code working on MX7, it first adds soap
    header(username and password) then gets the response, but similar
    code didn't work on MX6.1. Please help.
    MX7 code:
    <cfscript>
    ru = XmlNew();
    ru.AuthenticationHeader = XmlElemNew(ru, "
    http://www.mytesting.com/Webservices/ProductInfo","AuthenticationHeader");
    ru.AuthenticationHeader.UserName = mlElemNew(ru,"
    http://www.mytesting.com/Webservices/ProductInfo","UserName");
    ru.AuthenticationHeader.UserName.XmlText = "myusername";
    ru.AuthenticationHeader.Password = XmlElemNew(ru,"
    http://www.mytesting.com/Webservices/ProductInfo","Password");
    ru.AuthenticationHeader.Password.XmlText = "mypassword";
    ws = CreateObject("webservice", "
    http://www.mytesting.com/Webservices/ProductInfo/Management.asmx?WSDL");
    addSOAPRequestHeader(ws, "
    http://www.mytesting.com/Webservices/ProductInfo",
    "AuthenticationHeader", ru.AuthenticationHeader, true);
    subbid = ws.GetProductInfo();
    </cfscript>
    MX6.1 code:
    <!--- get SOAP functions --->
    <cfinclude template="soap-udfs.cfm">
    <cfscript>
    ru = XmlNew();
    ru.AuthenticationHeader = XmlElemNew(ru, "
    http://www.mytesting.com/Webservices/ProductInfo","AuthenticationHeader");
    ru.AuthenticationHeader.UserName = XmlElemNew(ru,"
    http://www.mytesting.com/Webservices/ProductInfo","UserName");
    ru.AuthenticationHeader.UserName.XmlText = "myusername";
    ru.AuthenticationHeader.Password = XmlElemNew(ru,"
    http://www.mytesting.com/Webservices/ProductInfo","Password");
    ru.AuthenticationHeader.Password.XmlText = "mypassword";
    ws = CreateObject("webservice", "
    http://www.mytesting.com/Webservices/ProductInfo/Management.asmx?WSDL");
    addRequestHeader(ws, "AuthenticationHeader",
    ru.AuthenticationHeader, "
    http://www.mytesting.com/Webservices/ProductInfo",
    true);
    subbid = ws.GetProductInfo();
    </cfscript>
    Error message for MX6.1:
    Could not perform web service invocation "GetProductInfo"
    because AxisFault faultCode: {
    http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode: faultString: java.io.IOException: No serializer found
    for class coldfusion.xml.XmlNodeList in registry
    org.apache.axis.encoding.TypeMappingImpl@19a61ad faultActor:
    faultNode: faultDetail: {
    http://xml.apache.org/axis/}stackTrace:
    java.io.IOException: No serializer found for class
    coldfusion.xml.XmlNodeList in registry
    org.apache.axis.encoding.TypeMappingImpl@19a61ad at
    org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImp l.java:1281)
    at
    org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java :795)
    at
    org.apache.axis.message.MessageElement.outputImpl(MessageElement.java:817)
    at
    org.apache.axis.message.SOAPHeaderElement.outputImpl(SOAPHeaderElement.java:250)
    at
    org.apache.axis.message.MessageElement.output(MessageElement.java:783)
    at
    org.apache.axis.message.SOAPHeader.outputImpl(SOAPHeader.java:342)
    at org.apache.ax...

    XML snippit
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:con="urn:crmondemand/ws/contact/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:con1="urn:/crmondemand/xml/contact">
    <soapenv:Header>
    <wsse:Security>
    <wsse:UsernameToken>
    <wsse:Username>your_site/your_login</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">your_password</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soapenv:Header>
    This isn't exactly what you are looking for but you can use this to add a header to a axis web service call.
    SOAPHeaderElement header = new SOAPHeaderElement("http://your.xsd", "your tag");
    SOAPHeaderElement header1 = new SOAPHeaderElement("http://your other.xsd", "your other tag");
    header1.setAttribute("Id", "your value");
    header.addChild(header1);
    SOAPElement node = header1.addChildElement("more text");
    node.addTextNode("more text");
    SOAPElement nodepwd = header1.addChildElement("another tag");
    nodepwd.addTextNode("more text");
    nodepwd.setAttribute("Type", "http://another url");
    ((Stub)service2).setHeader(header);
    Hope this is more helpful than confusing.

  • SOAP Header in java

    Hi,
    Here is my scenario - NWCE 7.1, EJB as a WebService and I want to access the SOAP Header,  what would be the best way. I'm thinking of using handler-chains, appreciate any suggestions.
    Rajiv.

    Probably the easiest way is to insert
    @Resource
    WebServiceContext wsc;
    in your @WebService annotated class.
    Depending what you want to do a SOAPHandler might be appropriate.
    also possible:
    http://www.khapre.org/blog/archives/2008_08_01_index.aspx
    Edited by: Konrad KRENTZ on Dec 1, 2009 8:56 PM

  • Unable to add custom SOAP header to consumer webservice in CRM( without using PI)

    Hello Experts,
    We have a requirement to consume webservice proxy in CRM without involving PI. We have WSDL file which has many services as depicted in the first screenshot.After checking old posts, I could add custom SOAP header by using if_wsprotocol_ws_header and there is no xml parsing error for ws_header.Have used if_ixml_stream_factory to check xml parsing error for header.
    '<soapenv:Header>'
    '<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'
    '<wsse:UsernameToken wsu:Id="UsernameToken-2">'
                '<wsse:Username>user id</wsse:Username>'
                '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">paswd</wsse:Password>'
                '<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MT0B9XFzsZJXXKmVKOsj/Q==</wsse:Nonce>'
                '<wsu:Created>2015-03-30T06:29:17.407Z</wsu:Created>'
    '</wsse:UsernameToken>'
    '</wsse:Security>'
    '</soapenv:Header>' INTO l_string.
    But when my ABAP program as a whole gets executed where consumer proxy is called, then it still throws XML parsing error - undeclared namespace prefix. As mentioned, there is no parsing error for header and WSDL file as a whole in SOAP UI tool works fine,by manually adding SOAP header.
    Have configured SOAMANAGER with logical port.Or any wrong setting in SOAMANAGER can cause this issue? When I tested webservice ping, it gave me attached error but I read in a SAP note that such error can be ignored.
    I want to know if some more setting/coding is required if we manually add custom header to a payload? Is PI really required to implement this requirement? Payload mapping has to be done to add custom header and if that can be taken care by ABAP coding and how?
    Can you please help?
    BR,
    Nisha Verma

    Hello Experts,
    I have not found the solution yet.
    Can anyone provide some insight??
    BR,
    Nisha Verma

  • Overriding Soap Header using Axis(SOAP) Receiver

    Hi Experts,
    I am having a problem in including the SOAP Header in the XML using the SOAP Axis Receiver Adapter. Well I am not sure on how to place this structure in the header:
    <SoapHeader>
        <Header1>
            <child1>
            <child2>
        </Header1>
        <Header2>
            <child1>
            <child2>
        </Header2>
    </SoapHeader
    I have already tried overriding the SOAP Header via Java Mapping but it is not working when I send it to the third-party. I believe this header should be directly encoded using the axis module, but I can only find examples for simple headers and not nested ones...
    Please help.
    Edited by: Mark Dihiansan on Sep 7, 2010 5:15 PM

    Hi,
    you simply place your header template in the handler configuration. If you need to set some values of the header dynamically, you can pass each value in the dynamic configuration header. The axis handler will fill the header with the supplied values.
    The Axis Note 1039369 describes a few header insertion examples that you should look at.
    regards, yza

  • Amending SOAP Header

    My Axis SOAP server developers has recently added SOAP header
    authentication and so far I have managed to add Authentication tags
    in header. I am using
    SoapHeaderFix.as
    class provided on Adobe website to enable this functionality.
    So I am adding these two tags inside header using
    AddPersistentSOAPHeader
    method of SoapHeaderFix class and my header looks something
    like...
    <SOAP-ENV:Header><ns1:authenticateUser
    SOAP-ENV:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/"><username
    xsi:type="xsd:string">{$uname}</username><password
    xsi:type="xsd:string">{$pass}</password></ns1:authenticateUser></SOAP-ENV:Header>
    However the problem I am facing is Axis server needs valid
    namespace defined inside top header tag. So the header should look
    like
    <SOAP-ENV:Header
    xmlns:ns1="promoregistration" ><ns1:authenticateUser
    SOAP-ENV:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/"><username
    xsi:type="xsd:string">{$uname}</username><password
    xsi:type="xsd:string">{$pass}</password></ns1:authenticateUser></SOAP-ENV:Header>
    Can any one please help with how to achieve this?
    Even If this is possible in AS3 please let me know so I could
    propose porting my app to AS3.

    My Axis SOAP server developers has recently added SOAP header
    authentication and so far I have managed to add Authentication tags
    in header. I am using
    SoapHeaderFix.as
    class provided on Adobe website to enable this functionality.
    So I am adding these two tags inside header using
    AddPersistentSOAPHeader
    method of SoapHeaderFix class and my header looks something
    like...
    <SOAP-ENV:Header><ns1:authenticateUser
    SOAP-ENV:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/"><username
    xsi:type="xsd:string">{$uname}</username><password
    xsi:type="xsd:string">{$pass}</password></ns1:authenticateUser></SOAP-ENV:Header>
    However the problem I am facing is Axis server needs valid
    namespace defined inside top header tag. So the header should look
    like
    <SOAP-ENV:Header
    xmlns:ns1="promoregistration" ><ns1:authenticateUser
    SOAP-ENV:encodingStyle="
    http://schemas.xmlsoap.org/soap/encoding/"><username
    xsi:type="xsd:string">{$uname}</username><password
    xsi:type="xsd:string">{$pass}</password></ns1:authenticateUser></SOAP-ENV:Header>
    Can any one please help with how to achieve this?
    Even If this is possible in AS3 please let me know so I could
    propose porting my app to AS3.

  • Query reg adding custom tags in SOAP Header - AXIS Receiver Adapter

    Hi All,
    I need to send custom tags as mentioned below to my traget webservice application. I think I can do this with Receiver AXIS adapter but not sure how it can be done. Can any of you suggest?
                                                  <WSContext>
                   <FromAppId>ABC</FromAppId>
                   <ToAppId>XYZ</ToAppId>
              </WSContext>
    Thanks,

    If you want to add custom tags in the soap header, one possible solution is use XSLT mapping or Java mapping to create header first then do message mapping for mapping the payload structure between your source and target  as usual.
    So in operation mapping you sequence mapping like this... first XSLT mapping for custom tags for the SOAP Header followed by payload mapping.
    Hope that helps.
    Search SDN for XSLT Mapping for soap header. Already we have handled these issues.

  • Adding values to XI Soap Header

    Hi All,
    We have scenario, Soap to RFC. We are generating the wsdl for the ICO. We want the end system to send some values in the soap header(XI Soap header). We have used the keep header in the sender soap communication channel and added the value to the variable binding. When we generate the wsdl, there is no header in wsdl. We can only get the body.
    Kindly let us know if what we are doing is correct.
    Also please let us know how it can be  done.

    Hi,
    We want the end system to send some values in the soap header(XI Soap header). We have used the keep header in the sender soap communication channel and added the value to the variable binding. When we generate the wsdl, there is no header in wsdl. We can only get the body.
    Checking the Keep Header option will only include the XI header as part of the response message. It will not be included in the request message. The variable binding allows you to place three variable headers (HTTP Headers) that you can use in dynamic config, it will not populate the SOAP Header at all.
    If there is information in the SOAP Header that you need, you might as well run it in noSOAP mode by checking Do Not Use SOAP Envelope in your sender CC.
    Regards,
    Mark

  • Adding C# Soap Header to a client that calls BT2010 Orchestration published as a WCF Web Service

    I've added code from this reference to my orchestration (that is published as a WCF webservice):
    Accessing SOAP Headers in Orchestrations.
    I have a C# client that I was previously using before I was using any of the SOAP Headers.  I've been looking at dozens of blogs, and find the answers to anything related to SOAP Headers most confusing (and often specific to unique cases). 
    I'm using BT2010.  How can I add username, password, and a custom header called "ApplicationID" to my existing C# program and pass it to the orchestration/web service?
    Thanks,
    Neal

    Neal,
    The BizTalk WCF Service Publishing Wizard does not include custom SOAP header definitions in the generated metadata. To publish metadata for WCF services using custom SOAP headers, you should manually create a Web Services Description Language (WSDL) file.
    You can use the externalMetadataLocation attribute of the
    <serviceMetadata> element in the Web.config file that the wizard generates to specify the location of the WSDL file. The WSDL file is returned to the user in response to WSDL and metadata exchange (MEX) requests instead of the auto-generated WSDL.
    The following XML data shows an example of a part of the WSDL file defining custom SOAP headers:
    <wsdl:operation name="Request">
    <soap12:operation soapAction="http://Microsoft.Samples.BizTalk.NetTcpAdapter/OrderProcess/IOrderProcess/Request" style="document" />
    <wsdl:input name="Order">
    <soap12:header message="i0:Order_Headers" part="SalesAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output name="OrderConfirmation">
    <soap12:header message="i0:OrderConfirmation_Headers" part="PaymentAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    Refer:
    SOAP Headers with Published WCF Services
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Adding WS Security in SOAP header for calling soap services from PI

    When i am calling a wss enabled webservice from soapui with the header parameters
    Username , Password and Password Type - PasswordText , it is able to get results. The soapui tool automatically adds the following in the soap header -
         <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <wsse:UsernameToken wsu:Id="UsernameToken-9368150" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>xxxxx</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxxx</wsse:Password>
                <wsse:Nonce>aOA1P6t2hJPRyuraQ/IliQ==</wsse:Nonce>
                <wsu:Created>2009-07-10T14:58:33.781Z</wsu:Created>
             </wsse:UsernameToken>
          </wsse:Security>
    However , in PI when the following configurations are made -
    Web Services Security option selected in soap receiver adapter
    In Receiver Agrrement -
    Security Standard -  http://docs.oasis ....
    Security Procedure (Request) - None
    Security Procedure (response) - None
    the user tokens don't seem to generated and it is giving an authentication error . Is there any process of generating this in the outgoing soap header from PI.
    SOAP Axis framework is not installed at present  and working on PI 7.1 SP6.
    Looking forward for your replies

    same issue for me too.
    Try using WS adapter on receiver side .
    If you are able to attach SOAP header with WSSE fields using SOAP adapter at reciever channel let me know how you did it.

  • Adding element RelatesTo to the soap header

    Hi All,
    I need to replace wsa05:MessageID element in the soap header with the following value
    <wsa05:MessageID>fn-bea:uuid()</wsa05:MessageID>
    <wsa05:RelatesTo>$header/wsa05:MessageID/text()</wsa05:RelatesTo>
    How would I do that in OSB proxy service?

    You may use Insert or Assign or Replace action -
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15867/proxy_actions.htm#CIHEFDFB
    Regards,
    Anuj

  • Newbie: adding a SOAP header

    I want to add this header to a web service. I don't know how
    to make this.
    Please help me (if you can).
    <SOAP-ENV:Header>
    <wsse:Security xmlns:wsse="
    http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    <wsse:UsernameToken>
    <wsse:Username>user</wsse:Username>
    <wsse:Password Type="
    http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#Password Text">passtext</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </SOAP-ENV:Header>
    Thanks,
    Cristy

    Neal,
    The BizTalk WCF Service Publishing Wizard does not include custom SOAP header definitions in the generated metadata. To publish metadata for WCF services using custom SOAP headers, you should manually create a Web Services Description Language (WSDL) file.
    You can use the externalMetadataLocation attribute of the
    <serviceMetadata> element in the Web.config file that the wizard generates to specify the location of the WSDL file. The WSDL file is returned to the user in response to WSDL and metadata exchange (MEX) requests instead of the auto-generated WSDL.
    The following XML data shows an example of a part of the WSDL file defining custom SOAP headers:
    <wsdl:operation name="Request">
    <soap12:operation soapAction="http://Microsoft.Samples.BizTalk.NetTcpAdapter/OrderProcess/IOrderProcess/Request" style="document" />
    <wsdl:input name="Order">
    <soap12:header message="i0:Order_Headers" part="SalesAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:input>
    <wsdl:output name="OrderConfirmation">
    <soap12:header message="i0:OrderConfirmation_Headers" part="PaymentAgent" use="literal" />
    <soap12:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    Refer:
    SOAP Headers with Published WCF Services
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • How to add empty soap header?

    Hello,
    I created a web service proxy using WSDL and XSD files. Then, I created a sample request from client interface and sent the request as an object to call the web services. However, I am not directly calling the webservices as I am doing it through a Gateway. Here, the problem is, the Gateway accepts only empty SOAP headers and the Gateway inserts the security details in that SOAP header and will send a request to the original web services. Even if we add any element in the SOAP header, it is not accepting the request.
    While sending a request through the client interface(Java class), I am not able to generate a empty SOAP header and send as request. I tried several ways adding a empty header. but no result. Is there any way we can add empty SOAP header while sending a requesting through Java class(Client interface)?
    Thanks
    sekhar

    Thanks for your reply.
    I have tried different approaches for adding empty SOAP header with no elements. But, none of them worked. The only solution for this issue is to add OSB proxy which has the functionality to send empty SOAP header which worked for me.
    Thanks
    sekhar

  • SOAP Header based user/password authentication in OSB 11g Proxy Service

    Hi,
    I have implemented SOAP Header based authentication in my OSB 11g Proxy Service.
    In the Security settings of my AnySOAP(Soap 1.1) HTTP Proxy service, I have amde the following changes:
    1.
    In Transport Access Control link, i selected the User predicate, and provided an user already existing on weblogic server with following roles(AppTesters, Monitors, Operators).
    The AuthorizationProvider was XACMLAuthorizer
    2.
    Under Custom Authentication, I selected the Custom User Name and Password option, and provided the below mentiioned xpaths
    User Name XPath: ./*/*:Username/text()
    User Password XPath: ./*/*:Password/text()
    3.
    In Message Access Control link, i selected the User predicate with the same user as mentioned in Transport Access Control link.
    Now, when I am testing this service from OSB Test Console, I am providing the following input.
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:N1="http://abcd.com/common/bodcomponents/transactional/model/1.0/">
    <soap:Header>
    <AuthHeader>
    <N1:Username>userXYZ</N1:Username>
    <N1:Password>passXYZ</N1:Password>
    </AuthHeader>
    </soap:Header>
    <soap:Body>
    <!-- body payload -->
    </soap:Body>
    </soap:Envelope>
    The response is "The invocation resulted in an error: ."
    The OSB server logs show the below error:
    ####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-387082> <Proxy service access denied (proxy: ABCD/Services/Common_HTTP_Proxy, subject: Subject: 0
    )>
    ####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Kernel> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-382004> <Failed to process request message for service ProxyService ABCD/Services/Common_HTTP_Proxy: com.bea.wli.sb.security.AccessNotAllowedException
    com.bea.wli.sb.security.AccessNotAllowedException
         at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:136)
         at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:117)
         at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:586)
         at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:329)
         at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
         at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
         at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
         at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
         at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
         at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
         at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
         at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
         at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please suggest where I am going wrong in this. I have cross checked the user/pass credentials with what I am giving in the input, and it is perfectly fine.

    I have added the Username and Password as follows, since the namespace declaration was required due to the namespace prefix 'N1' in the XPath
    declare namespace N1="http://abcd.com/common/bodcomponents/transactional/model/1.0/";./AuthHeader/N1:Username/text()
    declare namespace N1="http://abcdp.com/common/bodcomponents/transactional/model/1.0/";./AuthHeader/N1:Password/text()
    I have removed the Message Access Control conditions, have only kept Transport Access Control conditions.
    If i keep the condition in Transport Access Control as "Allow access to everyone", and test with proper credentials in the Username/Password tags in SOAP Header, then it works fine. However, if I try to give an incorrect password in the SOAP Header, it denies the access. So that means the XPaths given for Username/Password are working fine. The OSB logs show the below message
    +####<Feb 10, 2011 12:59:21 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000ef2> <1297322961536> <BEA-386008> <Message level username/password authentication failed: [Security:090304]Authentication Failed: User weblogic javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User weblogic denied>+
    However if i add the condition with predicate as "User" and user name argument as "weblogic", and try to pass the same in the SOAP Header as well with the correct password, it denies the access with below message in the logs.
    +####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Security> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-387082> <Proxy service access denied (proxy: ABCD/Services/Common_HTTP_Proxy, subject: Subject: 0+
    +)>+
    +####<Feb 9, 2011 6:05:42 PM IST> <Error> <OSB Kernel> <test.abcd.co.in> <osb_server1> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <5a5769b8025ef997:-2bda316:12def49100a:-7fff-0000000000000c92> <1297254942782> <BEA-382004> <Failed to process request message for service ProxyService ABCD/Services/Common_HTTP_Proxy: com.bea.wli.sb.security.AccessNotAllowedException+
    com.bea.wli.sb.security.AccessNotAllowedException
    at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:136)
    at com.bea.wli.sb.pipeline.RouterSecurity.doAccessControl(RouterSecurity.java:117)
    at com.bea.wli.sb.pipeline.RouterManager.processMessage(RouterManager.java:586)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:329)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Maybe you are looking for

  • Back up in database

    hi expert, what is sccs? How  to provide  Differenent type  back up in database? thanx

  • Web module: exporting keywords to a template not possible?

    I want to use the web module to generate my photoblog, however I need to be able to export the keywords or collections used to tag each image. The dialog box for changing the image caption allows you to export all sorts of EXIF and IPTC metadata but

  • Having a field navigable but not editable?

    I have a one field block that displays three records at a time. I have a popup menu associated with the field. The popup calls a form that will populate the field. It populates the record in the block from where the user called the popup (if the user

  • Zoom in iPhoto11

    In iPhoto09 there was a slider bar in full screen mode allowing the user to zoom in on a part of a photo. Slider does not seem to be present in iPhoto11. How does one zoom now? Thanks.

  • Cannot Start Up Mail

    Everytime I start up mail, the mail window comes up as normal but in a second it says its loading (spinning rainbow circle). Then I select the Force Quit option and I find out that my mail is not responding. Any suggestions? I use a MacBook. Thank Yo