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.

Similar Messages

  • How can I use XMLBeans in a Web Services client?

    How can I use XMLBeans in a standalone Java client with a Web Service?
    I posted the message below earlier in the year, but have not yet been successful
    in my
    attempts.
    regards
    Eddie
    Hi,
    I'm trying to using XMLBeans to send a document to a web service from a standalone
    Java client. I'm using the PurchaseOrder (easypo) example document, and the service
    expects a parameter of type PurchaseOrderDocument. The client proxy class generated
    by WebLogic Workshop, however, expects to send a parameter of type PurchaseOrder.
    In the client, I can instantiate a PurchaseOrderDocument, and then obtain a PurchaseOrder
    (e.g. pod.getPurchaseOrder() ), but the returned class is not compatible with
    the PurchaseOrder type that the client proxy expects.
    In a previous attempt (not using Workshop), the client would not compile because
    it expected to send a non-abstract class with a public default constructor (presumably
    a JAX-RPC requirement), and XMLBeans had generated an interface.
    Any help would be greatly appreciated!
    thanks & regards
    Eddie

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • How to access HTTP Header from within Web service?

    Hello,
    Is there a way to access HTTP header variables like CONTENT_TYPE, CONTENT_LENGTH from within Web Logic web service.
    I was able to get the HTTP header variable from within Apache AXIS services by calling context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
    How can i do this from weblogic web service.
    I need this to verify the client SSL_CLIENT_DN
    In access I can get the header as follows.
    HttpServletRequest req = (HttpServletRequest) context
              .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
    clientID = req.getHeader("SSL_CLIENT_S_DN_Email");
    Thanks
    --Arun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    hi
    the following link may helpful to you
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
    Regards
    Prasanna Yalam

  • Weblogic 10.3: web service client enable HTTP/HTTPS connection reuse?

    hi all,
    i am writing an client app to call a web service, through a client proxy generated by jdeveloper/weblogic.
    My question is:
    for the weblogic web service client proxy, is it possible to enable HTTP/HTTPS connection reuse/pooling?
    i see there is many connection created when calling the web service (by command netstat)?
    thank you.
    lsp

    anybody can help?
    thanks

  • How to download a file via web service in Windows Phone 8.1?

    My project just got 2 part.
    1.Pivot app
    2.Webclient server (provide data for pivot app the view the data)
    My concert that how do i do a download button to download a file via web services in to isolated storage.
    urgent!

    something like this:
    public async System.Threading.Tasks.Task DownloadFile()
    using (var client = new Windows.Web.Http.HttpClient())
    var stream = await client.GetInputStreamAsync(new System.Uri("http://urltomyfile"));
    var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myfile.txt", CreationCollisionOption.GenerateUniqueName);
    using (var fileStream = await file.OpenAsync(FileAccessMode.ReadWrite))
    IBuffer buffer = new Windows.Storage.Streams.Buffer(1024);
    while ((buffer = await stream.ReadAsync(buffer, buffer.Capacity, InputStreamOptions.None)).Length > 0)
    await fileStream.WriteAsync(buffer);
    await fileStream.FlushAsync();
    how is your webservices offering the file?
    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

  • How to create Web Service Client from wsdl with digital signature?

    Please, help me to create Web Service Client from wsdl with digital signature. I know create Web Service client from wsdl file and I know how to add digital signature to XML with jwsdp, but I don't know how to do it together.
    Thanks.

    I'm handling security wit JAX-WS handler. So I insert "manually" ws-security tag and I encrypt (and sign) message parts.
    On client side, all works fine, but on server side I obtain:
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Starting decrypt|#]
    . dectypted.!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" 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"><soapenv:Body><ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona></soapenv:Body></soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]If you have any idea for solving my problem, then I can post my simple example :(
    Bye!

  • I have a problem when you run Firefox to download a claim this tool (askToolbarInstaller-1.12.2.0.exe) What is the solution and how to prevent download scent tool.

    I have a problem when you run Firefox to download a claim this tool (askToolbarInstaller-1.12.2.0.exe) What is the solution and how to prevent download scent tool.

    i have the same exact problems too and it's starting to bother me further more...

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

  • Creating And Deploying A JWSDP Web Service Client to Weblogic 8.1

    This setup produces an EAR containing a message driven bean in a jar file. When the MDB receives a message
    it checks to see if there is any data in a database table and if so calls the web service with that data. These instructions
    are for MS-Windows environments.
    In my setup I have:
    the weblogic domain at c:\b2b80
    the jwsdp at c:\apps\jwsdp-1.3
    extra jar files for the app server in c:\b2b80\lib
    the main weblogic installation at c:\apps\weblogic810\
    1> Download the the JWSDP version you wish to use and install it. (In this example I'm using 1.3)
    2> Create a project structure for you client like this:
         /project
              /earbuild
                   /META-INF
              /ejbbuild
                   /META-INF
              /ejbsource
              /wssource
    3> in the /project directory you will need a build.xml file that looks something like this: (the ant build targets are described at the end of this document)
    ==============================================================
    <?xml version="1.0"?>
    <project name="svcowner" default="buildall" basedir=".">
         <property file="classpath.settings"/>
         <property name="wssource" value="wssource"/>
         <property name="ejbsource" value="ejbsource"/>
         <property name="compileejbdest" value="ejbbuild"/>
         <property name="earbuilddest" value="earbuild"/>
         <property name="jarfilename" value="svcownerejb.jar"/>
         <property name="earfilename" value="svcowner.ear"/>
         <property name="debug" value="true"/>
         <property name="deprecation" value="true"/>
         <!-- this runs the create.bat which has all of the wscompile parameters -->
         <target name="cmdline_wscompile">
              <exec executable="wssource/create.bat"/>
         </target>
         <target name="compileejb" depends="cmdline_wscompile">
              <javac debug="${debug}" srcdir="${wssource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
              <javac debug="${debug}" srcdir="${ejbsource}" classpath="${BUILD_CLASSPATH}"
                   destdir="${compileejbdest}" includes="**/*.java" deprecation="${deprecation}"/>
         </target>
         <target name="buildejbjar" depends="compileejb">
              <jar jarfile="${earbuilddest}/${jarfilename}" manifest="${compileejbdest}/META-INF/MANIFEST.txt">
                   <fileset dir="${compileejbdest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="buildear" depends="buildejbjar">
              <jar jarfile="${earfilename}">
                   <fileset dir="${earbuilddest}">
                        <include name="**/*.*"/>
                   </fileset>
              </jar>
         </target>
         <target name="deploy">
              <copy file="${earfilename}" todir="../../config/domain/applications"/>
         </target>
         <target name="buildall" description="build everything" depends="buildear, deploy">
         </target>
    </project>
    ==============================================================
    4> You need a matching classpath.settings file in the same directory, something like this:
    ==============================================================
    BUILD_CLASSPATH=/b2b80/lib/saaj-impl.jar;/b2b80/lib/saaj-api.jar;/b2b80/lib/jaxrpc-api.jar;/b2b80/lib/jaxrpc-impl.jar;c:/b2b80/lib/jaxrpc-spi.jar/b2b80/classes/;/b2b80/classes;/apps/weblogic810/server/lib/weblogic.jar;/apps/weblogic810/server/lib/weblogic_sp.jar;/apps/weblogic810/server/lib/xmlx.jar;/apps/weblogic810/server/ext/weblogic-tags.jar;/apps/weblogic810/server/ext/jdbc/oracle/920/ojdbc14_g.jar;/b2b80/lib/log4j.jar
    ==============================================================
    5> In the /project/earbuild/META-INF directory you need an application.xml file:
    ==============================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
    <application>
    <display-name>svcownerb2b</display-name>
    <description>Application description</description>
    <module>
    <ejb>svcownerejb.jar</ejb>
    </module>
    </application>
    ==============================================================
    6> The /project/ejbsource directory contains the source for the client application. In my case this is a message driven bean (note that code below isn't complete). The most important part of the code below is the setting of the javax.xml.soap.MessageFactory system property.
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    If you don't do this a weblogic class will be used and the code will fail.
    ==============================================================
    package com.svcclient.ejb.svcownershipment;
    import java.text.*;
    import java.io.*;
    import java.sql.*;
    import java.util.Properties;
    import javax.ejb.*;
    import javax.jms.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    import com.svcclient.util.*;
    import org.w3c.dom.*;
    import com.svcclient.websvc.svcowner.*;
    import javax.xml.rpc.Stub;
    public class SvcOwnerShipmentSubscriberMDB implements MessageDrivenBean, MessageListener
    private transient MessageDrivenContext mdc = null;
    private static Context context;
    private final static String CLASSNAME = "SvcOwnerShipmentSubscriberMDB";
    private String DATASOURCE_JNDI = "svcclient.b2b";
    private static DataSource mDS = null;
    private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
    public SvcOwnerShipmentSubscriberMDB()
    System.getProperties().put("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
    try
    if (context == null)
    context = new InitialContext() ;
    if (mDS == null)
    mDS = (DataSource)context.lookup(DATASOURCE_JNDI);
    catch (NamingException ex)
    ex.printStackTrace();
    catch(Exception ex)
    ex.printStackTrace();
    public void onMessage(javax.jms.Message message)
    TextMessage msg = null;
    String ordernumber = null;
    String lineid = null;
    try
    if (message instanceof TextMessage)
    msg = (TextMessage) message;
    ordernumber = msg.getStringProperty("ordernumber");
                   // the JMS message contains a property that is an order number
    createAndSendXML(ordernumber);
    catch (Throwable ex)
    ex.printStackTrace();
    private void createAndSendXML(String ordernumber)
    if(ordernumber==null)
    return;
    PreparedStatement statement = null;
    ResultSet rset = null;
    java.sql.Connection conn = null;
    try
    conn = DBHelper.getConnection(mDS,"SvcOwnerShipmentSubscriberMDB.createAndSendXML");
    statement = conn.prepareStatement("select * from ..."); // you SQL here
    statement.setString(1,ordernumber);
    rset = statement.executeQuery();
    StringBuffer data = new StringBuffer();
    data.append("<? version=\"1.0\"?>\n");
    data.append("<shippingRequest>\n");
    while(rset.next())
    data.append("\t<order_date>"+dateFormat.format(new java.util.Date(rset.getTimestamp("SCHEDULE_SHIP_DATE").getDate()))+"</order_date>\n");
    data.append("\t<brand_name>svcclient</brand_name>\n");
    data.append("\t<shipRequestType>Sale</shipRequestType>\n");
    data.append("</shippingRequest>\n");
              // call the web service with the data from the database
    DataExchanger_Impl impl = new DataExchanger_Impl();
    Stub stub = (Stub)(impl.getDataExchangerSoap());
    DataExchangerSoap dx = (DataExchangerSoap)stub;
    String resp = dx.exchangeData("svcclient", "mypassword", "Sales", data.toString());
    catch(SQLException sqle)
    sqle.printStackTrace();
    catch(Exception e)
    e.printStackTrace();
    finally
    try
    if (rset != null)
    rset.close();
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch(Exception x){}
    public void ejbCreate() { System.out.println("In SvcOwnerShipmentSubscriberMDB.ejbCreate()"); }
    public void setMessageDrivenContext(MessageDrivenContext mdc) { this.mdc = mdc; }
    public void ejbRemove() throws javax.ejb.EJBException { System.out.println("In SvcOwnerShipmentSubscriberMDB.remove()"); }
    ==============================================================
    7> The /project/ejbbuild/META-INF directory needs a MANIFEST.txt file.
    Manifest-Version: 1.0
    8> The /project/ejbbuild/META-INF directory needs a ejb-jar.xml file. This just sets up the MDB which is the client.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>SvcOwnerShipmentSubscriberMDB</display-name>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <ejb-class>com.svcclient.ejb.svcownershipment.SvcOwnerShipmentSubscriberMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    <subscription-durability>NonDurable</subscription-durability>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <method-name>onMessage</method-name>
    <method-params>
    <method-param>javax.jms.Message</method-param>
    </method-params>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ==============================================================
    9> The /project/ejbbuild/META-INF directory needs a weblogic-ejb-jar.xml file.
    ==============================================================
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>SvcOwnerShipmentSubscriberMDB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>5</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <!-- JNDI Name of the Topic that the SvcOwnerShipmentSubscriberMDB listens for messages on -->
    <destination-jndi-name>jms.svcownerShipmentsTopic</destination-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ==============================================================
    10> The /project/wssource directory needs a dataexchange.wsdl file. This is the WSDL describing the web service
    we want to connect to with our client.
    ==============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified"
    targetNamespace="https://www.svcowner.com/mfg/DataExchange/">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="exchangeDataResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://www.svcowner.com/mfg/DataExchange/exchangeData"
    style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://svc.svcowner.com/mfg/dataexchange.php" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ==============================================================
    10> The /project/wssource directory needs a websvc_config.xml file. This file tells wscompile where
    to find the WSDL file and the package name for the generated classes.
    ==============================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
         <wsdl location="wssource/dataexchange.wsdl" packageName="com.svcclient.websvc.svcowner"/>
    </configuration>
    ==============================================================
    11> The /project/wssource directory needs a create.bat file. This just sets up the environment
    and calls the wscompile batch file in the JWSDP. I had to tweak the wscompile.bat file to match
    my environment as well.
    ==============================================================
    SETLOCAL
    SET WSDP=C:\apps\jwsdp-1.3\
    SET ANT_HOME=%WSDP%;apache-ant
    SET PATH=%ANT_HOME%\bin;%WSDP%jaxrpc\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call wscompile -gen:client -s ./wssource -keep -g -d ejbbuild wssource/websvc_config.xml
    ==============================================================
    12> The /project directory needs a build.bat file. Just a way for me to make sure my
    environment is set up right before doing the build.
    ==============================================================
    SETLOCAL
    SET ANT_HOME=c:\apps\jakarta-ant-1.4.1
    SET PATH=%ANT_HOME%\bin;%PATH%
    SET JAVA_HOME=c:\apps\weblogic810\jrockit81sp2_141_05
    call ant -buildfile build.xml %1 %2 %3 %4 %5 %6 %7 %8 %9
    ==============================================================
    13> You need to copy the following jar files from the JWSDP into a location they can be used by the
    app server during run time and also for the build process. In my set up this is c:\b2b80\lib. Note that
    these are pointed to by the file in step 4.
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-api.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-impl.jar
    c:\apps\jwsdp-1.3\jaxrpc\lib\jaxrpc-spi.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-api.jar
    c:\apps\jwsdp-1.3\saaj\lib\saaj-impl.jar
    14> You must make sure that the jar file in step 13 are at the front of the classpath for the
    weblogic server. WL comes with classes that conflict with these jars.
    15> I also had to add the root ssl certificate from the partners certificate authority to the java keystore
    using the keytool because this service uses SSL:
    C:\apps\weblogic810\jrockit81sp2_141_05\jre\bin>keytool -import -keystore ..\lib\security\cacerts -alias svcownerroot -keypass password -file c:\temp\svcownerroot.cer
    ==============================================================
    So the idea is this, you run the /project/build.bat file from within the /project directory. This
    calls ant which uses the build.xml file to create everything and copy the EAR to the weblogic deployment
    directory. The default ant target is buildall.
    The cmdline_wscompile target runs the /project/wssource/create.bat file which in turn runs the wscompile.bat
    file from the jwsdp. This causes the dataexchange.wsdl file to processed and the client files to be generated.
    The generated java files go into the /project/wssource directory. The generated class files go into the
    /project/ejbbuild directory. They need to be there so the MDB can use them.
    Next the compileejb ant target compiles the MDB java file and places the resulting class file into the
    /project/ejbbuild directory.
    Next the buildejbjar ant target takes everything in the /project/ejbbuild directory and creates the ejb jar
    file that will be included in the EAR. This file is placed in the /project/earbuild directory.
    Finally the buildear ant target takes everything in the /project/ejbbuild directory and produces the EAR
    file for deployment. The EAR file is placed in the /project directory.
    The deploy task simply copies the EAR file into the weblogic domain applications directory.

    It's really the web service that determines what kind of authentication is required. You can't just use any old strategy. If the web service isn't expecting it in that form, it won't work. Typically, either HTTP BASIC Auth or WS-Security is used. You'd have to contact the people responsible for the web service to know what kind of auth it requires.

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

  • 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

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

  • How can I create a query with web service data control?

    I need to create a query with web service data control, in WSDL, it's query operation, there is a parameter message with the possible query criteria and a return message contains the results. I googled, but cannot find anything on the query with web service. I cannot find a "Named Criteria" in web service data control like normal data control. In Shay's blog, I saw the topics on update with web service data control. How can I create a query with web service data control? Thanks.

    Hi,
    This might help
    *054.     Search form using ADF WS Data Control and Complex input types*
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

  • Error creating a web service client from th WSDL document (soamanager)

    Hello everyone,
    we have generate with the wizard a web-service using the function module BAPI_CONTROL_RECIPE_GET_LIST. Then we have generated with SOAMANAGER the end point. As test, we have used a web-service explorer of Eclispe and we can retrieve without problems the data.
    Then we wanted to generate the web-servcie client with Eclipse Galileo (3.5.0) wiith the server GlassFish v2.1 Java EE 5 we first installed the WSIT jars, in order to support WS-RM protocol
    We have started the generation based on the document obtainend within the soamanager under the "Open WSDL document for selected binding" link.
    We have tried it several times and we always got the following error is:
    IWAB0399E Error in generating Java from WSDL: WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy):
    faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.: <br>
        WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
    at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Unknown Source)
    Do you know if we took the right document in order to generate the web-service client? Do we need to have some specifics settings in the configurations of th endpoint? (provider security, transport settings, etc...?)
    If needed, or if someone would be nice enough to try to generate it on its side, I can post here the whole wsdl document, but due to its length, I first wait your comments.
    Thanks a lot in advance for your feed-back
    best regards
    Pierre-André
    addtions:
    maybe this should have been better posted within the forum Service-Oriented Architecture than standards?
    I forgot to mention the following threads, which seems to me to be somehow in this direction. But I do not get really how I could use them, or how is is releated.
    Edited by: Pierre-andre Jacquod on Sep 23, 2009 4:02 PM

    Hi,
    I am facing the same issue while generating the client java class from IBM RAD 6.0.
    Here is the error I am getting.
    WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
         [java] at com.ibm.wsdl.util.xml.DOMUtils.throwWSDLException(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
         [java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
         [java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
         [java] at java.lang.Thread.run(Thread.java:571)
    Please guide me to resolve this issue.
    Thanks & Regards,
    Vijay

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

Maybe you are looking for

  • Computer Locks up/hangs in various scenarios

    So, I just built this computer a few months ago. As soon as I started using it, I was getting hangs/lock ups and random reboots. At first it was quite random, but as time progressed, it seems to only be affected by some certain actions. What I've fou

  • Basic functions not working in Acrobat Pro X...

    Hi, I'm finding that basic functions are not working properly. I tried re-launching the application as well to determine if a technical glitch or not. Control + Shift + R is not allowing me to rotage a page. Control + or - is not letting me zoom in &

  • Illustrator CS4 The hidden tools palette

    For some reason when I hold down the right hand side on my mouse pad to access the hidden tools in the tools palette in illustrator, it shows the alternative tools but wont let me switch to them eg I hold down the right hand pad and can see the smoot

  • Audio/Bass Control For Mac Mini

    Recently bought a new Mac Mini and I have an old Logitech Z-5300 speakers attached to it. Is there anyway to turn the bass down through the OS? I have the bass turned down to 0 on the speaker unit itself and the bass volume is still coming through ve

  • Multicam Editing Problem during Export Pr CC

    Hey guys, first post. i have been working on a pretty long multicam project (About 1h45m) in Premiere Pro CC I was all done, and during export in Media Encoder i noticed that after about 45m of rendering, the preview window was still showing the begi