Sending WSSE security headers to non-weblogic web service

I have been trying to send wsse headers to a non-weblogic web service. I am looking for a way to do this using the control file I generated from the wsdl or the page flow where I implement the control, or the message handler file. I have username and password parameters but I cannot get this to function.
Here is the signature I need:
<?xml version="1.0" encoding="UTF-8" ?>
- <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <env:Header>
- <wsse:Security env:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- <wsse:UsernameToken wsu:Id="Id-dFQDZm_34ewPYtaARIJ_4BfI" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>weblogic</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">weblogic</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
- <env:Body>
<n1:hello xmlns:n1="http://workshop.bea.com/WebServiceB" />
</env:Body>
</env:Envelope>
Of course the Body is different, but this is the security signature that I need to get into the header. After looking at all the examples, I only see the option of using a java proxy class to call the web service, which would be a little difficult to use as my whole page flow application so far is calling the web service from a generated control. There are also lots of coplex datatypes that are being sent to the web service so a jave proxy would be a little difficult. I have tried to take the code from the java proxy class example and put it in my handler class, but the handler seems to only use MessageContext, not WebServiceContext and will not let me add the username password tokens. When I have tried to case a WebServiceContext out of a MessageContext, it gives me a runtime error "Class Cast Exception" even though workshop lets me do it.
This is extremely urgent. Please help me! I am using the sample handler class called MessageHandler.java and the sample WSSE java proxy class called WebServiceBClient.java that generated the above signature.

More information:
Here is the first part of my Java Control where I am calling the web service and the message handler:
package controls;
* @jc:location http-url="http://localhost:7001/Checking.jws"
* @jc:wsdl file="#CheckingWsdl"
* @jc:handler callback="MessageHandler" operation="MessageHandler"
public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class CustomerInfo
implements java.io.Serializable
public java.lang.String FirstName;
public java.lang.String LastName;
public java.lang.String MiddleName;
public int SSN;
public int CustomerNumber;
public java.util.Calendar CreationDate;
public java.util.Calendar LastModifiedDate;
public static class FundingInfo
implements java.io.Serializable
public float Amount;
public java.util.Calendar CurrentDate;
public int AccountNumber;
public static class anyType
implements java.io.Serializable
public com.bea.xml.XmlObject[] t;
public static class AccountInfo
implements java.io.Serializable
public int AccountNumber;
public float Balance;
public int CustomerNumber;
public java.util.Calendar LastModifiedDate;
* @jc:protocol form-post="false" form-get="false"
public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
static final long serialVersionUID = 1L;
Here is the section of the MessageHandler class where I am attempting to add security token to the header:
protected void addSecurityHeader (MessageContext mc)
* Registers a handler for the SOAP message traffic.
HandlerRegistry registry = mc.getHandlerRegistry();
List list = new ArrayList();
list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
registry.setHandlerChain(new QName("hello"), list);
try
WebServiceContext context = (WebServiceContext)WebServiceContext.currentContext().getLastMessageContext();
//(WebServiceContext)mc;
WebServiceSession session = context.getSession();
* Set the username and password token for SOAP message sent from the client, through
* the proxy, to the web service.
UserInfo ui = new UserInfo("weblogic", "weblogic");
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
//mc.setProperty(WSSEClientHandler.REQUEST_USERINFO, ui);
* Adds the username / password token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
//mc.setProperty(WSSEClientHandler.REQUEST_SECURITY, security);
} catch (Exception ex) {System.out.println("EXCEPTION CAUGHT DOING SECURITY STUFF " + ex.getMessage());}
I tried to use the MessageContext to do this but it came out null. I tried to cast the MessageContext to WebServiceContext and it gave me a Class Cast Exception. I tried to add the HandlerRegistry section to this but of course the assignment mc.getHandlerRegistry is improper and is not compiling so don't let that confuse you.

Similar Messages

  • Simple question re invoking non-WebLogic web services

    I have a very simple question that I haven't been able to resolve elsewhere.
    I need to invoke 3rd-party SOAP interfaces from my WebLogic 6.1 client EJB. All
    the Bea documentation I've found refers to invoking "WebLogic Web Services" and
    speaks of downloading the client.jar -- however, in my case it's not a "WebLogic
    Web Service" I'm invoking, it's a non-WebLogic web service.
    Does WebLogic 6.1's WebServiceProxy (or other tool) allow this? Or must I use
    some other SOAP tool such as Apache Axis in this case?
    Thanks.
    Cheers,
    allan

    Could this interopability problem have something to do with a problem
    I'm experiencing on 61.sp3?
    I have an EJB that accesses SOAP services on a Tomcat server. The SOAP
    service sends back a SOAP exception which is correct in what I am asking
    in to do. However, the weblogic app server is returning a SOAP
    exception to my EJB rather than passing the SOAP exception to the API
    that I am using to make my SOAP calls.
    Has anyone seen something like this?
    Sandy Mustard
    john wrote:
    >
    The 'samples/examples/webservices/rpc/javaClient/XMethodClient'
    is an example of how to invoke a non-WL webservice. You can
    use that code within your EJB.
    The javadocs for the WebServiceProxy class (from BEA's site)
    will give you more methods that may be useful to you.
    Note that your best bet, if possible, is to use the JAX-RPC
    APIs within WebLogic 7. The SOAP support in WL6.1 has
    interoperability issues.
    -john
    "Allan Halme" <[email protected]> wrote:
    I have a very simple question that I haven't been able to resolve elsewhere.
    I need to invoke 3rd-party SOAP interfaces from my WebLogic 6.1 client
    EJB. All
    the Bea documentation I've found refers to invoking "WebLogic Web Services"
    and
    speaks of downloading the client.jar -- however, in my case it's not
    a "WebLogic
    Web Service" I'm invoking, it's a non-WebLogic web service.
    Does WebLogic 6.1's WebServiceProxy (or other tool) allow this? Or must
    I use
    some other SOAP tool such as Apache Axis in this case?
    Thanks.
    Cheers,
    allan

  • Authenticating to weblogic web service using a client cert with webserver

    I am trying to think of how to authenticate a client to a weblogic web service
    using a client certificate. The wrinkle is that a Web Server (iis or whatever)
    will be handling the ssl part and forwarding non-secure to weblogic. The cert
    will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
    At this point it is not clear to me what I can do. When does CertAuthenticator
    get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
    class?
    Any help will be appreciated, even explaining why it can't be done.
    Thanks,
    Scott

    I am trying to think of how to authenticate a client to a weblogic web service
    using a client certificate. The wrinkle is that a Web Server (iis or whatever)
    will be handling the ssl part and forwarding non-secure to weblogic. The cert
    will still be accessable in the request using: HttpServletRequest req.getAttribute("javax.net.ssl.peer_certificates).
    At this point it is not clear to me what I can do. When does CertAuthenticator
    get called? Can I even use it? Will I have to write my own version of the weblogic.soap.server.servlet.StatelessBeanAdapter
    class?
    Any help will be appreciated, even explaining why it can't be done.
    Thanks,
    Scott

  • How to send JSON data in HTTPService to PHP web service question

    I'm using Flex 4 and a mx:HTTPService to send a JSON request to a php web service. I'm not sure if I'm sending the request correctly. Could someone look at the code below to see what I'm doing wrong?
    thanks
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   width="100%" height="100%">
        <fx:Declarations>
            <mx:HTTPService id="service" url="https://my web service url/"
                            method="POST" resultFormat="text" result="onResult(event)" fault="onFault(event)">
            </mx:HTTPService>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.adobe.serialization.json.JSON;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.Base64Encoder;
                [Bindable]private var username:String = "[email protected]";
                [Bindable]private var password:String = "the password";
                [Bindable]private var accountNumber:String = "49055";
                [Bindable]private var anticipatedDeliveryDate:Number = 20101115;
                [Bindable]private var purchaseOrder:String = "#123 for retailer";
                [Bindable]private var detailRecords:Array = new Array();
                [Bindable]private var key:String = "abc123";
                private function populateService():void {
                    populateProducts();   
                    setRequestHeader();
                    setRequestData();
                    service.send();   
                private function setRequestHeader():void {
                    var encoder:Base64Encoder = new Base64Encoder();
                    encoder.insertNewLines = false;
                    encoder.encode(key);               
                    service.headers["Authorization"] = "VIP " + key;
                    service.headers["Content-Type"] = "application/json";
                private function setRequestData():void {
                    service.request.username = username;
                    service.request.password = password;
                    service.request.accountNumber = accountNumber;
                    service.request.anticipatedDeliveryDate = anticipatedDeliveryDate;
                    service.request.purchaseOrder = purchaseOrder;
                    service.request.detailRecords = detailRecords;
                    // caching test
                    var rnd : Number = Math.round(Math.random()*1000);
                    service.request.cacheOff = rnd;
                private function populateProducts():void {
                    var prod1:Object = new Object();
                    prod1.itemCodeOrUPC = "00241";
                    prod1.itemDescription = "Budweiser Keg 1/2 BBL";
                    prod1.quantityOrdered = 2;
                    prod1.orderUOM = "Keg";
                    var prod2:Object = new Object();
                    prod2.itemCodeOrUPC = "00219";
                    prod2.itemDescription = "Budweiser 24/12 OZ CAN";
                    prod2.quantityOrdered = 4;
                    prod2.orderUOM = "Case";
                    detailRecords.push(prod1);
                    detailRecords.push(prod2);
                private function onResult(event:ResultEvent):void
                    var json:Object = JSON.decode(event.result as String);
                private function onFault(event:FaultEvent):void
                    trace("Fault: " + event.fault.faultString);
            ]]>
        </fx:Script>
        <mx:Panel width="95%" height="100%" color="#000000">
            <mx:HBox width="100%">
                <mx:Button label="Submit" click="{populateService()}"/>
            </mx:HBox>   
        </mx:Panel>
    </s:Application>

    Have you think abut using ActionScript in your Flex application? Or, you can write javascript to be proxy between your flash app and backend PHP web service?
    Also, it seems that you will allow every customer's flash player to have a copy of secret code. I think it is dangerous design because an flv file can be easity decompiled. Therefore, you secret code can be found if it is not input by your end user and it is populated on your serverside script.

  • How to prevent downloading wsdl in weblogic web service client

    Hi,
    I get a problem regarding weblogic web service client. My working environment:
    weblogic server 8.1
    Windows XP SP2
    JDK 1.4
    I use the weblogic tool to generate the client jar file from the wsdl file.
         <target name="generate-client">
              <clientgen wsdl="ACCESS.wsdl"
                   packageName="xxxxxx.client"
                   clientJar="${client}/${AccessClient_jar_file}"
                   keepGenerated="true"
                   saveWSDL="true"
              />
              <javac srcdir="${source}"
              destdir="${client}"
              includes="**/AccessClient.java">
              <classpath>
              <pathelement path="${client}/${AccessClient_jar_file}"/>
              </classpath>
              </javac>
         </target>
    After that, I create a client java file to invoke the service deploy in the server.
    public static void main(String[] argv)
    throws Exception
         int transactionId = 100;
         int id = 1000;
    // Setup the global JAXM message factory
    System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
    // Setup the global JAX-RPC service factory
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    AccessServicePorts ws = new AccessServicePorts_Impl(argv[0]);
    AccessService port = ws.getAccessService();
    // Resource - create
    Resource resource = new Resource();
    resource.setRES_CD("Create ResCo");
    resource.setCODE_CODE("code_cod");
    resource.setRES_TYPE("Resource typ");
    resource.setCOMMON_FIELD(common);
    AccessDefaultResult resultItems = port.createResource(resource);
    System.out.println("createResource : " + resultItems);
    I find that this web service client always issue 2 http requests to invoke an web service method deployed in server.
    1st http reqeust:
    GET /AccessEpol/EpolServiceSoap?WSDL HTTP/1.1
    User-Agent: Java/1.4.2_08
    Host: 127.0.0.1:8001
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    the return result is the wsdl downloaded from the server.
    2nd http request is the real web service request.
    The question is how could I eliminate the 1st http request because it's really unnecessary. I use other web service client like Axis 1.x, Axis client never has the http request to download the wsdl from the server.
    I read through weblogic web service document. It do mentions that put saveWSDL="true" in the clientgen ant task. the default value for saveWSDL is true already. I did try saveWSDL="false" also. None of them can eliminate the 1st http request.
    appreciate for any answer my question?

    Hi David,
    thanks for the reply.
    More or less I agree some points you mentioned above.
    I did use Axis 1.x to test the inter-operability. The web service was developed in Weblogic 8.1 and is a part of an existing web application. It will be merged to existing application deployed in weblogic 8.1.
    I also program the web service client to test the web service.
    The implementation of the server and client will be handed over the project team and training for supporting or continuous development have to be conducted by me. So I don't like to use two types of technologies which will make thing complex.
    I found this issue when I tried to protected the web service endpoint, eg http://localhost:7001/epol/service, using the web application Basic mechanism. The wsdl URL http://localhost:7001/epol/service?WSDL is also protected in this case. Unfortunately the username/password pair is not sent to the server when the weblogic client download the WSDL from the server. In this case, the client failed and throw exception.

  • WebLogic Web Services Home Page and authentication

    I've generated a set of web services using a session bean and have secured
    my EJB methods. I'd like to enable testing of these methods via the WebLogic
    Web Services Home Page service, but I can't figure out how to pass along the
    authentication parameters. I've tried appending
    '&username=myUser&password=myPassword' to the URL and this doesn't appear to
    work (yeah, I know, but you can't blame me for trying).
    Any ideas on how I might do this?
    Thanks,
    Rob

    Looks like a bug. filed CR086448.
    Contact support for patch.
    regards,
    -manoj
    "Rob Moore" <[email protected]> wrote in message
    news:[email protected]..
    Hi, Manoj,
    We're using WLS 7.0.0.1.
    Thanks,
    Rob
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]..
    The browser should pop up the user name/passwd dialog,
    if the WS is secured. Which version of WLS are you using?
    This could be a bug.
    regards,
    -manoj
    "Rob Moore" <[email protected]> wrote in message
    news:[email protected]..
    I've generated a set of web services using a session bean and have
    secured
    my EJB methods. I'd like to enable testing of these methods via theWebLogic
    Web Services Home Page service, but I can't figure out how to pass
    along
    the
    authentication parameters. I've tried appending
    '&username=myUser&password=myPassword' to the URL and this doesn't
    appear
    to
    work (yeah, I know, but you can't blame me for trying).
    Any ideas on how I might do this?
    Thanks,
    Rob

  • Oracle web services or WebLogic web services ?

    On " Oracle® Fusion Middleware Introducing Web Services" I read that on Oracle Fusion Middleware 11g platform there are 2 type of web services :
    1) SOA, ADF, and WebCenter services
    2) WebLogic Web services (Java EE Web services)
    But what is the difference ? both web services aren't based on java specification ? why there is the distinction ?
    Anyone can help me ?
    Edited by: kronos72it on Nov 18, 2009 4:43 AM

    It depends what you intend to do. The Oracle WebServices stack adds dynamics (needed for BPEL, etc.) and the OWSM security interceptors to the stack. Both have different security policy models and are not interoperable in this sense. I would go for the Oracle stack as the OWSM security is much easier to administer...
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Unable to pass xmlbeans object in weblogic web services using OEPE

    Migrating Weblogic web services from Weblogic Workshop 10.3 to Oracle Enterprise for Eclipse...Passing xmlbean generated types in arguments of webservice call
    How to work around the following errors? I do not have this error when in workshop 10.3 only in OEPE eclipse
    "oracle.eclipse.tools.webservices.compiler.CompilationException: Errors: JAX-WS web services must not have xmlBean parameter or return type"
    PLease note that I want DocType to be xmlbeans generated or inherited from org.apache.xmlbeans.XmlObject....
    @WebMethod
         public void upload(String filename, DocType doc) {
    Hi, I have legacy codes from Weblogic workshop 10.1 and 10.3.....
    I am able to compile and run in Weblogic workshop 10.3 by passing the xmlbean generated DocType as arguments in the web services call.... but why am I not able to do this in Oracle Enterprise for Eclipse OEPE......
    If I were to generate the web service from teh wsdl...it will generate it's own DocType.class in the jar files and not use the xmlbean generated class one....
    How to get iOEPE to generate the classes in build\jws\ for
    testWSService-annotation.xml
    weblogic-webservices.xml etc like in workshop
    How can I resolve this??? Am I stuck with Workshop on this?? How to work around??
    Any help or clarifications would be much appreciated.
    Inside testWS.java,
    package ws;
    import java.io.File;
    import javax.jws.*;
    import org.example.doc.DocType;
    @WebService
    public class testWS {
         @WebMethod
         public void upload(String filename, DocType doc) {
              try {
                   doc.save(new File(filename));
              catch(Exception e) {
                   System.out.println(e);
    Inside xmlbeans generated DocType.java.....and DocTypeDocuments.java
    * XML Type: DocType
    * Namespace: http://www.example.org/doc
    * Java type: org.example.doc.DocType
    * Automatically generated - do not modify.
    package org.example.doc;
    * An XML DocType(@http://www.example.org/doc).
    * This is a complex type.
    public interface DocType extends org.apache.xmlbeans.XmlObject
    public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
    org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(DocType.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.testWSTypeSystem").resolveHandle("doctypec217type");
    * Gets the "element1" element
    java.lang.String getElement1();
    * Gets (as xml) the "element1" element
    org.apache.xmlbeans.XmlString xgetElement1();
    * Sets the "element1" element
    void setElement1(java.lang.String element1);
    * Sets (as xml) the "element1" element
    void xsetElement1(org.apache.xmlbeans.XmlString element1);
    * Gets the "element2" element
    java.lang.String getElement2();
    * Gets (as xml) the "element2" element
    org.apache.xmlbeans.XmlString xgetElement2();
    * Sets the "element2" element
    void setElement2(java.lang.String element2);
    * Sets (as xml) the "element2" element
    void xsetElement2(org.apache.xmlbeans.XmlString element2);
    * A factory class with static methods for creating instances
    * of this type.
    public static final class Factory
    public static org.example.doc.DocType newInstance() {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
    public static org.example.doc.DocType newInstance(org.apache.xmlbeans.XmlOptions options) {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
    /** @param xmlAsString the string value to parse */
    public static org.example.doc.DocType parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
    public static org.example.doc.DocType parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
    /** @param file the file from which to load an xml document */
    public static org.example.doc.DocType parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
    public static org.example.doc.DocType parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
    public static org.example.doc.DocType parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
    public static org.example.doc.DocType parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
    public static org.example.doc.DocType parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
    public static org.example.doc.DocType parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
    public static org.example.doc.DocType parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
    public static org.example.doc.DocType parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
    public static org.example.doc.DocType parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
    public static org.example.doc.DocType parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
    public static org.example.doc.DocType parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
    public static org.example.doc.DocType parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
    /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
    public static org.example.doc.DocType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
    /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
    public static org.example.doc.DocType parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
    return (org.example.doc.DocType) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
    /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
    public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
    return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
    /** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
    public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
    return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
    private Factory() { } // No instance of this class allowed
    Edited by: user11079482 on Jan 1, 2010 2:09 AM

    Ok just as I expected. So I guess I am left with the following two options
    1) either I switched to using JAXB in my apps instaed of xmlbeans....
    2) or if I still wanna use the old JAX-RPC web services to deploy on the Weblogic 10gR3 server i will have to create my own ant task jwsc directly......as shown below in your docs
    Programming Web Services for WebLogic Server (ant tasks)
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/webserv/anttasks.html
    Getting Started With WebLogic Web Services Using JAX-RPC
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_rpc/index.html
    Will OEPE be supporting the old JAX-RPC anytime in the near future release? or have to create own build ant task to call jwsc ant task directly to compile JAX-RPC web services??

  • Calling a WebLogic web service from a WebLogic web application

    We would like to call a WebLogic web service from WebLogic web application. The current architecture looks like:
    LoadBalancer--->iPlanet-1/iPlanet-2--->Firewall--->WebLogic-AppServer-1/WebLogic-AppServer-2
    The web application and web service are in the same WebLogic cluster. We would prefer that the web services do not get published externally.
    Does the WebLogic web application need to make a call back outside the firewall to the load balancer?
    Is there a way the web services can be called locally with load balancing?
    Can web service calls be made over the t3 protocol?
    Thanks,
    Mike

    I think one solution is to use a Java proxy to call the Web services.
    In the Java proxy you can have a method that accepts the user/pass and sets them correctly for the Web service.
    Then you expose that Java proxy as a data control (right click, create data control) - and then create a page that invokes that method.
    (For the basics of working with a POJO data control see: http://blogs.oracle.com/shay/2009/07/java_class_data_control_and_ad.html )

  • Stateful WebLogic Web Services using cookie

    Hi all,
    How do I configure WebLogic Web Services to return cookie in the HTTP header?
    In my weblogic.xml I included the following attributes but no cookie is returned in the HTTP header.
    <session-descriptor>
    <cookie-http-only>false</cookie-http-only>
         <tracking-enabled>true</tracking-enabled>
         <cookies-enabled>true</cookies-enabled>
         <cookie-name>JSESSION_ID</cookie-name >
    </session-descriptor>
    Thanks
    SMT

    Ok just as I expected. So I guess I am left with the following two options
    1) either I switched to using JAXB in my apps instaed of xmlbeans....
    2) or if I still wanna use the old JAX-RPC web services to deploy on the Weblogic 10gR3 server i will have to create my own ant task jwsc directly......as shown below in your docs
    Programming Web Services for WebLogic Server (ant tasks)
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/webserv/anttasks.html
    Getting Started With WebLogic Web Services Using JAX-RPC
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_rpc/index.html
    Will OEPE be supporting the old JAX-RPC anytime in the near future release? or have to create own build ant task to call jwsc ant task directly to compile JAX-RPC web services??

  • Welcome to WebLogic Web Services forum!!

    Hello WebLogic customers/developers,
    This is a new forum dedicated to discussion on web service development on WebLogic server. You can continue to use the existing "web services" forum for questions on OC4J web services.
    For a start, you can go to http://edocs.bea.com/wls/docs103/webservices.html for the latest product documentation, samples, and other relevant resources.
    WebLogic web service dev/pm team will try to be respond to questions posted on this forum ASAP with crystal-clear information. Looking forward to hearing from you.
    Regards,
    Pyounguk

    Hii,
    I have deployed a web service on admin server.
    I tested the web service by clicking on the test page link available.
    Now i have enabled the administration port.
    As the url changes automatically for the console to 9002 and protocol to https.
    The url of the test page still shows the old url of the admin server and it doesnt change dynamically to 9002 .
    I am able to test it only when i change the port manually as 9002 and protocol as https.
    I just want some explanation regarding why it is behaving like this.

  • Generating Weblogic Web Services with OEPE

    The OEPE plugin set allows you to generate JAX-WS Weblogic Web Services via a menu option by rick clicking a WSDL and choosing Weblogic Web Services -> Generate Web Service. The downside is this plugin overrides the existing service implementation file. There is a dialogue box that warns you and asks you if you want to replace it, but in order to generate the Java classes from the XML schema, it forces you to replace your implementation file. If you have version control you can get it back, but it can be annoying and dangerous if the file was not version controlled at that time.
    Suggestion is to have a checkbox on the first menu screen to preserve the existing service implementation file.

    This is a great suggestion, currently other than creating an alternate src folder, it forces you to overwrite. We really appreciate this feedback and knowing how the features are used.

  • Adding security to my PL/SQL Web Service

    Hi, I created a web service based on PL/SQL procedure using Jdeveloper, OC4J and now I would like to know all the options that exists for security (SSL, user/password, etc).... Is there any .pdf /whitepaper / Guide of security in Oracle Web services ?
    Thanks...

    Hi John,
    For basic security (SSL and basic auth), you should look at the security guide for the container itself - see Security Guide.
    For WSS [Web services Security], there is the Security Guide from the Oracle Application Server Documnetation Library.
    Hope this helps,
    -eric

  • Problem in invoking a secure weblogic web service from javaws client

    Hi all,
    the situation is this: there is a secure web service (Wssp1.2-2007-Wss1.1-X509-Basic256.xml policy) which is accessed by a stand-alone remote web service client (swing-enabled) which is initiated via java web start. You'll probably wondering why this is a special case. Let me elaborate...
    The first step was to develop the service and the client. This wasn't much of a trouble, since the documentation was very good apart from creating a ClientBSTCredentialProvider object at the client side. The documentation should explicitly state that the sixth argument, that of the server certificate, is required! In any case, the first step was a success and the invocation was encrypted and signed at the message level.
    The second step was to create a stand-alone remote client, without any local weblogic installation. That was a bit of a problem, since wlfullclient.jar or wseeclient.jar or weblogic.jar were not enough. I should note that the client was created via netbeans 7.0 and not with the help of weblogic clientgen. So, I had to make a verbose run from netbeans, in order to enumerate the jars which are accessed and gather them into the same directory. That was OK too. The standalone client works just fine.
    The third step is to simply (not so simply...) make a java web start version of the client. Since the previous step was a success (having all necessary jars in the same directory) this one should not be a problem. Well... that turned out to be a huge issue. What I get back as the error message (shown in the java web start console) is this:
    java.lang.InternalError: error initializing kernel caused by: java.lang.AssertionError: Duplicate initialization of WorkManager
         at weblogic.work.WorkManagerFactory.set(WorkManagerFactory.java:107)
         at weblogic.work.ExecuteQueueFactory.initialize(ExecuteQueueFactory.java:23)
         at weblogic.kernel.Kernel.initialize(Kernel.java:103)
         at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:64)
         at weblogic.rjvm.wls.WLSRJVMEnvironment.ensureInitialized(WLSRJVMEnvironment.java:50)
         at weblogic.protocol.ProtocolManager$DefaultAdminProtocolMaker.<clinit>(ProtocolManager.java:53)
         at weblogic.protocol.ProtocolManager.getDefaultAdminProtocol(ProtocolManager.java:218)
         at weblogic.protocol.ProtocolHandlerAdmin.<clinit>(ProtocolHandlerAdmin.java:23)
         at weblogic.rjvm.wls.WLSRJVMEnvironment.registerRJVMProtocols(WLSRJVMEnvironment.java:120)
         at weblogic.rjvm.RJVMManager.ensureInitialized(RJVMManager.java:87)
         at weblogic.rjvm.RJVMManager.<clinit>(RJVMManager.java:46)
         at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:97)
         at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:28)
         at weblogic.rjvm.LocalRJVM$LocalRJVMMaker.<clinit>(LocalRJVM.java:31)
         at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:72)
         at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:403)
         at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:395)
         at weblogic.xml.crypto.utils.DOMUtils.assignId(DOMUtils.java:374)
         at weblogic.xml.crypto.wss.SecurityBuilderImpl.assignUri(SecurityBuilderImpl.java:148)
         at weblogic.wsee.security.policy.SigningReferencesFactory.getSigningReferences(SigningReferencesFactory.java:100)
         at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:446)
         at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:335)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:574)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:428)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.constructMessage(SecurityMessageArchitect.java:304)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:138)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:121)
         at weblogic.wsee.security.wss.SecurityPolicyArchitect.processOutbound(SecurityPolicyArchitect.java:225)
         at weblogic.wsee.security.wss.SecurityPolicyArchitect.processMessagePolicy(SecurityPolicyArchitect.java:123)
         at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:119)
         at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:91)
         at weblogic.wsee.security.wssp.handlers.WssClientHandler.processOutbound(WssClientHandler.java:117)
         at weblogic.wsee.security.wssp.handlers.WssClientHandler.processRequest(WssClientHandler.java:69)
         at weblogic.wsee.security.wssp.handlers.WssHandler.handleRequest(WssHandler.java:112)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
         at com.sun.xml.ws.client.Stub.process(Stub.java:272)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
         at $Proxy29.fetchCSD(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
         at $Proxy30.fetchCSD(Unknown Source)
         at exchangecsdclient.CSDExchangeClientImpl.fetchCSD(CSDExchangeClientImpl.java:151)
         at pdfutil.PDFUtilApp.initialize(PDFUtilApp.java:55)
         at org.jdesktop.application.Application$1.run(Application.java:170)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
         at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:66)
         at weblogic.rjvm.wls.WLSRJVMEnvironment.ensureInitialized(WLSRJVMEnvironment.java:50)
         at weblogic.protocol.ProtocolManager$DefaultAdminProtocolMaker.<clinit>(ProtocolManager.java:53)
         at weblogic.protocol.ProtocolManager.getDefaultAdminProtocol(ProtocolManager.java:218)
         at weblogic.protocol.ProtocolHandlerAdmin.<clinit>(ProtocolHandlerAdmin.java:23)
         at weblogic.rjvm.wls.WLSRJVMEnvironment.registerRJVMProtocols(WLSRJVMEnvironment.java:120)
         at weblogic.rjvm.RJVMManager.ensureInitialized(RJVMManager.java:87)
         at weblogic.rjvm.RJVMManager.<clinit>(RJVMManager.java:46)
         at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:97)
         at weblogic.rjvm.LocalRJVM.<init>(LocalRJVM.java:28)
         at weblogic.rjvm.LocalRJVM$LocalRJVMMaker.<clinit>(LocalRJVM.java:31)
         at weblogic.rjvm.LocalRJVM.getLocalRJVM(LocalRJVM.java:72)
         at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:403)
         at weblogic.xml.crypto.utils.DOMUtils.generateId(DOMUtils.java:395)
         at weblogic.xml.crypto.utils.DOMUtils.assignId(DOMUtils.java:374)
         at weblogic.xml.crypto.wss.SecurityBuilderImpl.assignUri(SecurityBuilderImpl.java:148)
         at weblogic.wsee.security.policy.SigningReferencesFactory.getSigningReferences(SigningReferencesFactory.java:100)
         at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:446)
         at weblogic.wsee.security.wss.policy.wssp.SigningPolicyBlueprintImpl.addSignatureNodeListToReference(SigningPolicyBlueprintImpl.java:335)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:574)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.resolveSignatureList(SecurityMessageArchitect.java:428)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.constructMessage(SecurityMessageArchitect.java:304)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:138)
         at weblogic.wsee.security.wss.plan.SecurityMessageArchitect.buildWssMessage(SecurityMessageArchitect.java:121)
         at weblogic.wsee.security.wss.SecurityPolicyArchitect.processOutbound(SecurityPolicyArchitect.java:225)
         at weblogic.wsee.security.wss.SecurityPolicyArchitect.processMessagePolicy(SecurityPolicyArchitect.java:123)
         at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:119)
         at weblogic.wsee.security.wss.SecurityPolicyConductor.processRequestOutbound(SecurityPolicyConductor.java:91)
         at weblogic.wsee.security.wssp.handlers.WssClientHandler.processOutbound(WssClientHandler.java:117)
         at weblogic.wsee.security.wssp.handlers.WssClientHandler.processRequest(WssClientHandler.java:69)
         at weblogic.wsee.security.wssp.handlers.WssHandler.handleRequest(WssHandler.java:112)
         at weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:222)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
         at com.sun.xml.ws.client.Stub.process(Stub.java:272)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
         at $Proxy29.fetchCSD(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
         at $Proxy30.fetchCSD(Unknown Source)
         at exchangecsdclient.CSDExchangeClientImpl.fetchCSD(CSDExchangeClientImpl.java:151)
         at pdfutil.PDFUtilApp.initialize(PDFUtilApp.java:55)
         at org.jdesktop.application.Application$1.run(Application.java:170)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    The two invocations (one using java and the other using javaws) should obviously have not differences at all since all resources (jars) are the same.
    I have tried all client jar combinations (with wlfullclient.jar, wseeclient.jar, weblogic.jar) and the result is the same. One additional piece of information is that when removing all security parameters (message level encryption and signing) from the web service the java web start client works just fine!!!
    This is not an issue of additional jars that somehow mess with weblogic jars, since the same error occurs even in the basic hello world web service.
    I wonder if someone has faced the same problem. I would really really appreciate any help. Thank you in advance and keep up the good work.
    Cheers,
    Paul.
    Edited by: PaulP on Jan 11, 2012 5:31 AM

    Hi Kal,
    since we're currently evaluating the software and haven't acquired a license, we cannot contact support.
    I only need to know if this is a solved bug or not. Does it have to do with the classloading process (I cannot think of anything else)?
    Thank you again very very much!
    Cheers,
    Paul.

  • User credentials check in the webLogic web service server

    Hi,
    I am having a simple web service deployed in WebLogic server. I need to customize the SOAP header of this webservice to include username, password, session token and session type parameter in the server side code and do further processsing like calling 3rd party web service(Siebel) which will do the credential validation against that server DB. Below are couple of questions that I am having.
    1. How to customize the SOAP header on the server side so that SOAP Header includes the following and eventually appears in the generated wsdl?
    a. UserName
    b. Password
    c. Session token
    d. Session type
    2. How to extract the above details from SOAP Header sent from the client side in the WL server program?
    I am using WebLogic 10.3 & JAX-WS stack. Can someone help?
    I referred the link http://edocs.bea.com/wls/docs100/webserv/jws.html#wp216814. Still I am getting Null Pointer exception
    Jun 10, 2009 1:07:03 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
    SEVERE: null
    java.lang.NullPointerException
         at wls.AccAttachment.GetHeader(AccAttachment.java:113)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:89)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
         at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Source breakpoint occurred at line 113 of AccAttachment.java.
    Jun 10, 2009 1:07:50 AM com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
    SEVERE: null
    java.lang.NullPointerException
         at wls.AccAttachment.GetHeader(AccAttachment.java:113)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:89)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
         at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Is there naything else I need to here other than using JWsContext?
    Thanks,
    Sudha.
    Edited by: user519950 on Jun 9, 2009 9:58 PM
    Edited by: user519950 on Jun 10, 2009 12:12 AM

    Thanks Bethune. Need further help in extracting the actual username and password from the localname UsernameToken. I am exhausted with all the possible APIs exposed in Header and headerList
    Here is what I have tried.
    HeaderList headers = (HeaderList) context.getMessageContext().get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY);
    Header header = headers.get("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","UsernameToken",true);
    Iterator<Header> header2 = (Iterator<Header>)headers.getHeaders("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","UsernameToken",true);
    Header header3 = null;
    if(header2.hasNext())
    header3 = header2.next();
    QName q = new QName("UsernameToken","Username");
    String s = header3.getAttribute("Username","");
    String s2 = header3.getAttribute(q);
    String str = header.getAttribute(q);
    String str2 = header.getLocalPart();
    String str3 = header.getStringContent();
    In all the above cases, the strings were null and the username “admin” never got returned.
    SOAP Header sent from client:
    soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:http="http:example.org">
    <soapenv:Header>
    <wsse:UsernameToken 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:Username>admin</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
    </wsse:UsernameToken>
    <wsse:Session 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:SessionType>none</wsse:SessionType>
    <wsse:SessionToken Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
    </wsse:Session>
    </soapenv:Header>

Maybe you are looking for

  • I am trying to purchase an app in the itumes store.  It keeps asking me to sign in, then says this computer is not recognized. help

    How do I sign on to itunes if it asks me to review my account information, then asks me to sign on again.  Just round and round no answer.

  • Sale registers and purchase registers

    can anybody help me to know wat do u mean by sales registers and purchase registers.im new to abap and is struggling to understand the flow of there purchase orders and sale orders  and registers. im writing a report program where im printing  both s

  • Failures in Mail 5.1 IMAP ?

    1. I am finding that Mail 5.1 is ignoring some rules and failing to divert incoming mails to the desired mailboxes. This applies only to some rules/mailboxes and is not consistent. The ones that it fails to re-route would fit the rule and should have

  • Putting lyrics in the score window

    hi, anybody got any tips about putting lyrics under a melody line in score view. i have to notate a few songs for a publisher with lyrics. cheers, sharkboy13

  • Still photo "zoom" through motion

    Hi, I'm trying to create a "memories slideshow" consisting of still photos that zoom in slowly. I'm encountering a couple problems that I'm hoping to get help with: 1) When zooming in by setting keyframes in each clip's motion tab, I find that it's d