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??

Similar Messages

  • 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??

  • 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 create JAX-WS web services using providers?

    I am looking at WebLogic web services, because we are investigating the possibility of migrating our web services from Apache CXF to WegLogic web services. Our web services are implemented using JAX-WS providers. However, I browsed through the Oracle Fusion Middleware document library, but I couldn't find any documents for implementing JAX-WS web services using providers.
    Is there any document, tutorial, or examples of that?
    Thanks in advance!
    Tao

    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??

  • Invoking web service using Weblogic Workshop (JCX)

    Invoking web service using Weblogic Workshop
    Posted: 5 Jan 2005 23:31 PM Reply
    Hi,
    I have WSDL from which I have generated a web service control (.jcx) using Weblogic Workshop.
    I need to write a client which will invoke the web service using the control.
    Can someone help me on how to go about this ?
    BTW .. I also tried the clientgen route and tried to generated the proxy jar from the WSDL but wasn't successful because of a existing clientgen bug.
    Refer bug

    Hi,
    if the consumer of the webservice is a control-aware consumer ( pageflow, control, process ) simply drag the control to this consumer and the control variable is ready for use.
    if the consumer is not control-aware, try to generate a proxy using eg. the axis tool, or handcode your proxy class.
    links :
    how to use webservice control
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/conGettingStartedWithJavaControls.html
    axis
    http://ws.apache.org/axis/
    - Anders M.
    - Anders M.

  • 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.

  • Accessing config information in XML file in a Weblogic web service (JWS)

    Problem:
    I have implemented a web service for sending emails and pages via Java Mail and SNPP respectively using WebLogic Workshop on the BEA WebLogic 8.1 platform. In the service, I use certain pieces of information that are currently stored in an XML file on disk. Also, in its current state, the web service is implemented with public methods directly in the .jws Java file and not as a session bean. The file read from disk is performed every time the web service operation to send a message is invoked. As we all know, the I/O files access is very expensive and a performance bottleneck, especially when it is incurred on every invocation of the web service ‘sendMessage’ [operation.
    Without radically re-writing the application, I am looking for a way to improve the performance of the web service and can only come up with the following 2 ways:
    1) Move the code out of the sendMessage operation: Here, the main question I have is 'to where should I move it to'? I have seen in the WebLogic Workshop documentation that WebLogic Server maintains only a single instance of a Java class that implements a Web Service operation, and each invoke of the Web Service uses this same instance. In that case, I should be able to put the code in the constructor so that the files is read only at the time the class is instantiated, but a constructor in the .jws file that contains the web service operations itself does not seem to be invoked by the container (I tried to put a breakpoint in the constructor, but it seems that the constructor code never gets called)
    2) Move the configuration variables into some type of standard configuration file of WebLogic, something like web.xml or wlw-config.xml or jws-config.properties files. But I found that these XML files have an associated schema to conform to and do not provide any custom elements or attributes that I could add for my application(is that true?). Also, if I can somehow put the configuration information into any of these standard files, how do I access it from within the application 'without' doing a file read from disk? Are these configuration file items available in memory for access and use by the web service and if they are, what API can I use to access and use them?
    Any and all ideas are welcome!
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I have been looking into a similar problem. Since web services are by design stateless, they aren't good for 'remembering' information between calls. Aside from a file read, the only other solution I have found is to use a database. You can make use of an entity bean or simply make some kind of JDBC call. I don't know if you need to stick with the config file, but if so maybe you could read the config data into a database once and then you might have faster access than reading from a file. I'm not sure about which would have better performace, but its all I have come up with so far. What parser are you using to read your XML file? Have you tried others to see if they have better performance?

  • 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.

  • Cannot Test this Web Service using the Test Page

    Hello,
    I'm using
    - JDeveloper 11.1.1.3.0
    - SOA Suite 11.1.1.3.0
    - Weblogic Server 10.3.3
    - Windows XP SP3 (german version)
    Now I'm having a BPEL-Process (SOA) Project created in JDeveloper and deployment to the server works fine, i.e. the service can be seen in enterprise manager.
    But if I want to test the service using the webservice tester it get the following error if I copy the URL for getting the WSDL file to another browser tab:
    Cannot Test this Web Service using the Test Page
    Endpoint Name : FabricProvider (Service Description)
    You can test the Web Service using a Java client.
    Failed to Load a composite for composite identified by default/ReisebuchungService!1.0*soa_6aebb5fb-7830-497b-b853-839518d112f0
    Please verify that the composite has been deployed.
    Can you help me with this issue? I have no idea where to start debugging or resolving the problem.
    Thanks in advance

    Heya
    others and I face the same issue, reported here:
    TP4: Cannot Test this Web Service ...
    Oracle is not too responsive on the issue though.... :(
    Cheers Christian.

  • 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 )

  • Create web service using java class

    Hi,
    I created the web service using java class then i deployed this web service in to the weblogic admin server.when i tested this process it is working fine.
    when I tested The generated WSDL to this process in browser(IE). it is not working.
    I need to to invoke this webservice from another BPEL but this WSDL is not working.

    Hi,
    when i created the webservice in jdeveloper by default it is connected to integrated weblogic server and generates this wsdl.
    http://localhost:7101/helloApplication-javaexcel-context-root/MyWebService1Soap12HttpPort?WSDL
    then I deployed this webservice in to the Adminserver.it gives the following URL.
    http://192.168.56.1:7001/extracExcelToCSV-extractExcelToCSV-context-root/ExtractExcelToCSVSoap12HttpPort?wsdl
    This URL is not working but when i tested this process it is working fine.
    It is giving below error when i try to invoke from jdeveloper
    Error while reading wsdl file
    caused by:java.net.connectExcepption :Connection timed out:connect

  • Passing table to web service - using javascript

    Hi All,
    I need to pass table structure to web service using data connection.
    I dont know how to accesss the request node and create table and pass data to it.
    Request you all to help me to achievev this functionality.
    A long needs to split of 50 characters each. Then create a new instance for request node table structure assign the values.
    All this needs to be done using CODE i.e javasript
    how to do this ???
    Regards,
    Aditya Deshpande

    HIi,
    Let me explain the scenario once more:
    Scenario:
    Pdf has two Text edit field and one button. Where the end user would enter the values.
    The PDF is integrated with Web service for Offline scneario.
    Field 1 is a notification number.
    Field 2 is description - unlimited entry into PDF.
    Button: is used to execute the web service.
    It is done using the blog:
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0394564950DB01118597046218481719End?blog=/pub/wlg/7588
    Field1 is mapped to corresponding field in web service by IMPORT/EXPORT bindings.
    Problem:
    Field 2 is a text field. But this data has to be passed to web service as table. The web service has a table structure.
    Hence the text in the Field 2 has to be split into 100 characters each and set into table rows.
    The Strucutre definition in the data connection is:
    - Item
            - TDFORMAT
            - TDLINE
    Since I need to split the text and load.I felt this needs to be done using code ( script ).
    I do NOT know how to do it using CODE. Please help ME!!!!!!!!
    If there any other way please let me know. I am also not sure which would be best way of doing it.
    PLEASE HELP ME!!!
    Regards,
    Aditya Deshpande.

  • Perl based client to access weblogic web services

    Hello All,
    Do we have sample code where Perl (Soap::Lite) client will access weblogic based web services using https protocol?
    Regards,
    ssaxena

    Hello All,
    Do we have sample code where Perl (Soap::Lite) client will access weblogic based web services using https protocol?
    Regards,
    ssaxena

  • 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

  • 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

Maybe you are looking for