Java code to connect to WSDL file with custom header

Hi all,
I am an absolute noob when it comes to Java. I need to write a Java app that can connect to a WSDL file with a custom header. Basically, all I need to do is connect to the web service and pass a username and password.
Any help would be appreciated.
Thanks,
A

Better you use tools which can generate code(interface,proxy and stub classes) which can take care of calling all the WSDL defined methods..i generally use RAD not an open source as per OP use eclipse open source or netbeans which can do the trick

Similar Messages

  • WSDl files with SOPAui

    Team,
    I want to know how i can integrate WSDl files with SOPAui.
    what setting i have to do at Inegration Level.
    Can user integrate from his desktop or he need to login into the server to configure WSDl files with SOPAui.
    =======================
    I also need a doc which will enable my URL into internet enable URL. So, that anyone across the globe can access it.
    ======================

    Just to details more about my requirment,
    So mainly we want to build application that hit data and modify data in ERP/CRM system, via SOAP envelope (first we will construct request in SoapUI and next, move it into MicroStrategy platform). In this particular example we want to build whole functionality on top of Peoplesoft.
    I have given them WSDL files. but when doing he got the message, “Server not found” .
    I think that it could be something with external IP, even developer can't connect to IIS of this machine.
    Can any one tell me what I have to do ?

  • PI does not combine .wsdl file with .xsd files.

    Hi,
    I imported .wsdl file with necessary .xsd files in PI system (7.1).
    PI does not find fields in .wsdl already necessary .xsd files imported with .wsdl file.
    Is there anyone to help me to solve problem with test it in PI system.
    I send .wsdl file and necessary .xsd files as attachment his mail address.
    Thanks.

    Did you try opening the wsdl file in some XML tool...if there is problem in referring the XSD then it will be visible in the tool itself.....even I am working on PI7.1 and some of the WSDLs are referring XSDs...and i had no problem in using them.....dont know what is failing in your case
    Do you want me to send .wsdl and .xsd files zipped into your mail box
    instead you can post your wsdl file and the corresponding XSD here in SDN....even a dummy structure would do....we are not allowed to do personal email comunication
    Regards,
    Abhishek.

  • Create a wsdl file - with schemas inline - in JDeveloper

    Hi,
    We are trying to create a wsdl file using schemas in jdeveloper 11.1.1.3. We could generate the wsdl file using options available in jdeveloper, but the wsdl generated contains <types> element that has schemas referenced by only an "import" statement as below.
    <types>
    <xsd:schema>
    <xsd:import schemaLocation="../../../Test.xsd" namespace="http://www.openuri.org"/>
    </xsd:schema>
    </types>
    But, I would like get the schemas inlined or embedded within the wsdl instead of just an import statement.. This helps me in using the wsdl anywhere (creating webservices or use in my applications or give it to some one to use) without worrying about the actual schema definition files. The <types> element within the wsdl must have the schemas embedded, something like below.
    <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://testWSDLproject/type" elementFormDefault="qualified">
    <xsd:element name="testIn">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="value" type="xsd:integer"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </types>
    Is there any way forward, with the Jdeveloper to create wsdl files with schemas inline ?

    Hi Vohra,
    The schema snippet pasted previously was just a sample.
    In actual, there are mulitple cross referencing xsd files that must be embedded within my wsdl file. Sometimes, such manual editing of wsdl (embedding so many schema definitions) is prone to errors.
    If there is an option in Jdeveloper which automatically does this embedding for us, then it becomes more handy. Have you come across any such options ?

  • Urget Help --- Please give me the core java code that connects to UNIX ser

    Can anyone provide the core java code that connects UNIX server after verifying credentials and allow to implements UNIX commands through java program?

    no, you don't want to do that.
    You want to connect yourself, which Java is quite capable of doing, rather than go through some 3rd party client program that's not only specific to a particular operating system but not guaranteed to be installed at any particular machine or if it is to be installed in such a way that you can start it from your Java program.
    And then there's the little matter of figuring out the external API to use that program in the way you intent to (if it has one).

  • Sample Java  Code to send an HTML mail with embeded image

    Hello,
    Please can I get a sample Java code on sending an HTML mail with embeded image.
    The HTML message and relevant input parameters withhbe supplied from a PL/SQL that will call the class , the class will embed the image and send the mail to the recepient.

    tev wrote:
    Please can I get a sample Java codeNo. This is a forum, not a code mill.
    Recommended reading: How to ask questions the smart way
    db

  • Connect the music file with the artwork file post-computer-crash?

    I want to retrieve artwork after restoring my computer?
    So my computer (where itunes app data was stored) and my external hardrive (where my itunes library was stored) crashed, but luckily I had my itunes library was stored on dropbox so I have that uploading to my revived computer!
    I have access to all my "old computer's" files (via a mounted image file that looks just like an external drive H: )
    The "old computer" itunes used my dropbox folder for the library (J:work\Dropbox\Allen's Transfer Folder\iTunes)
    my "New comuter" uses a local folder but the contents are exactly the same (C:\Companies\Dropbox\Allen's Transfer Folder\iTunes)
    How can I get the artwork data from my "old computer" onto my "new computer" so that itunes will connect the music file with the artwork file?
    is there a data file and will they automatically sync to the artwork if they are in different locations?
    Thank you for your help, Allen

    pfanzier wrote:
    … is there any reason i shouldn't delete the artwork folder?
    All of my music is from CDs, so all of my cover art are scanned images that I added to the music files in iTunes. My Album Artwork folder is heavily populated nonetheless. Thus, it stands to reason that if you delete the folder, just like every other default item in your iTunes folder it will be recreated when you launch iTunes. If I recall correctly, that folder also holds the data files for building your CoverFlow.
    pfanzier wrote:
    itunes only demarcates songs whose files are missing with an exclamation point after i click on the song. otherwise everything appears as normal. if i quit itunes and reopen it, nothing is marked with the exclamation point until i click on it.
    I personally have never had an issue with missing song links, but based on what I had read on the Macworld forums over the years, when links are lost, people start seeing /!\ next to several tracks in their iTunes library. Of course, most of the instances that I have read about have been after iTunes updates so perhaps it is during the library updating after a software update that causes the automatic detection of broken links. Otherwise, it does make sense that iTunes would not check a link until the user selects an unlinked song, because iTunes does not, and should not, scan your entire library for no apparent reason.

  • Re: to create outbound file with multiple header ,detail and trailor in informatica

    Dear Mohan Prakash, Please mentation The Target Which Format you need. Please let me know. Thanks & RegardsKasireddy+966545281845

    hi I want to create a file with muiltple header detail and trailorSample of my file  1F99500094959                    5F99000000999911025F99000000999912025F99000000999913029F99500094959                    1G83341002729803                5G83000000999918020109G83341002729803                1G83910377940                    5G830000009999190201011050003522029G83910377940                    T20110720000000900000006750{  In this file 1 is header and 5 is detail and 9 is trailer and in last T segment is also trailerI have any idea to create seperate 3 files and in lastconcatenate all file with the help of unixbut in my case data is so large (in millions) this approach is not use full please suggest my any ideaHow to create VSAM file

  • How to print jTable with custom header and footer....

    Hello all,
    I'm trying to print a jTable with custom header and footer.But
    jTable1.print(PrintMode,headerFormat,footerFormat,showPrintDialog,attr,interactive)
    does not allow multi line header and footer. I read in a chat that we can make custom header and footer and wrap the printable with that of the jTable. How can we do that..
    Here's the instruction on the chat...
    Shannon Hickey: While the default Header and Footer support in the JTable printing won't do exactly what you're looking for, there is a straight-forward approach. You can turn off the default header/footer and then wrap JTable's printable inside another Printable. This wrapper printable would then render your custom data, and then adjust the size given to the wrapped printable
    But how can i wrap the jTable's Printable with the custom header and footer.
    Thanks in advance,

    I also once hoped for an easy way to modify a table's header and footer, but found no way.
    Yet it is possible.

  • Java Code to Connect to OIM on HTTPS

    Hi All,
    I have recently disabled the HTTP Port for OIM and enabled only HTTPS Port. I have java code that I used to connect to OIM on HTTP Port but that doesn't working anymore.
    I have update the OIM_URL to use t3s but not sure what else in system property I need to add (I think its has to be keystore path). So, i added System Property
    weblogic.security.SSL.trustedCAKeyStore = "Path of Kesytore"
    but I am getting below error:
    javax.security.auth.login.LoginException: java.lang.NoSuchMethodError: com/certicom/net/ssl/SSLContext.getCertificateSupport()Lcom/certicom/tls/interfaceimpl/CertificateSupport;
    at com.bea.sslplus.CerticomSSLContext.setTrustManager(Unknown Source)
    at weblogic.security.utils.SSLContextWrapper.<init>(SSLContextWrapper.java:62)
    at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapper.java:55)
    at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:323)
    Any pointers on what I have to add?
    TIA

    The issue was due to the order of jar files in build path:
    This is the correct order :
    1. Crypto.jar
    2. wlfullclient.jar
    3. wlcipher.jar
    4. webserviceclient+ssl.jar
    I use the JDK Keystore configured with IDE cacerts, import root ca cert and it worked.

  • Cannot generate WSDL file with wscompile

    I get an error while generating the WSDL file using wscompile tool.
    my compile line is "wscompile -gen:server CRAWS.xml -keep" and I get a RmiModeler error with an ClassNotFoundException .
    I have put my jar file in the bin folder (same folder of wscompile) and I've also copied my service build files in the same folder (under the package subfolders).
    Here is the code of the xml configuration:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service name="CraWS_Service" targetNamespace="urn:com.servepath.cra/wsdl/CraService"
          typeNamespace="urn:com.servepath.cra/types/CraService"
          packageName="com.servepath.CraWebService">
        <interface name="com.servepath.CraWebService.CraWSIF" servantName="com.servepath.CraWebService.CraWS_Impl"/>
    </service>
    </configuration> 

    I'm new to Web Services so I'm just guessing, but perhaps you need to add -classpath lib/foo.jar;lib/bar.jar to specify where your class-files are.

  • Java code to connect to unix box(putty)

    i'm having a great problem regarding accessing the putty box from java code.
    I need to read some log files from unix through java code.In my client program when i'm giving hostname and port=22...ssh terminal is getting detected,but i'm confused how to open that unix box by giving the username and password.and how am i goin to embed unix command in it.The entire job i've to do through java code.
    please help!!..Thanks
    Message was edited by:
    liz310
    Message was edited by:
    liz310

    thanks a lot guys for ur time...but i tried in every way..i'm getting hell lot of errors..please help..its really urgent
    /*this is my code:*/
    import com.jcraft.jsch.*;
    import com.jcraft.jsch.Channel;
    import com.jcraft.jsch.JSch;
    import com.jcraft.jsch.JSchException;
    import com.jcraft.jsch.Session;
    import com.jcraft.jsch.UserInfo;
    import java.io.*;
    public class shell_test {
    public static void main(String args[])
    String user="user15";
    String host="punlin040";
    String cmd="ls -l";
    JSch jsch = new JSch();
    try{
    Session session=jsch.getSession(user,host,22);
    session.setPassword("user15");
    //UserInfo usrInfo=new MyUserInfo();
    //session.setUserInfo(usrInfo);
    session.connect();
    Channel channel=session.openChannel("exec");
    ((ChannelExec) channel).setCommand(cmd);
    channel.setXForwarding(true);
    channel.connect();
    //code
    channel.setInputStream(System.in);
    // channel.setOutputStream(System.out);
    //((ChannelExec) channel).setErrStream(System.err);
    InputStream in = channel.getInputStream();
    channel.connect();
    byte[] tmp = new byte[1024];
    while (true)
    while (in.available() > 0)
    int i = in.read(tmp, 0, 1024);
    if (i < 0)
    break;
    System.out.print(new String(tmp, 0, i));
    if (channel.isClosed())
    in.close();
    // System.out.println("JSCH: exit-status: " +
    //channel.getExitStatus());
    break;
    try
    Thread.sleep(1000);
    catch (Exception ee)
    channel.disconnect();
    session.disconnect();
    //code
    //ch.setInputStream(System.in);
    //ch.setOutputStream(System.out);
    }catch(Exception e)
    {e.printStackTrace(); }
    /*public static class MyUserInfo implements UserInfo {
    public String getPassword()
    { return "password"; }
    public String getPassphrase()
    { return ""; }
    public boolean promptPassword(String arg0)
    { return true; }
    public boolean promptPassphrase(String arg0)
    { return true; }
    public boolean promptYesNo(String arg0)
    { return true; }
    public void showMessage(String arg0)
    but i'm getting following errors:
    com.jcraft.jsch.JSchException: java.lang.ClassNotFoundException: com.jcraft.jsch
    .jce.Random
    at com.jcraft.jsch.Session.connect(Session.java:160)
    at com.jcraft.jsch.Session.connect(Session.java:145)
    at shell_test.main(shell_test.java:25)
    Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.jce.Random
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.jcraft.jsch.Session.connect(Session.java:156)
    ... 2 more

  • Java code to connect to remote windows machine from local machine

    Hi,
    I have developed a code to connecting remote windows M/C from local M/C by using SSH2 (ganymed-ssh2-build209.jar) API. when I run the code its giving below error. Can any one please help me how to resolve it. And also please let me know, is there any other way to connect remote windows system using java code.
    Exception.
    java.io.IOException: There was a problem while talking to <host name>:22
      at ch.ethz.ssh2.Connection.connect(Connection.java:642)
      at ch.ethz.ssh2.Connection.connect(Connection.java:460)
      at Connect.RemoteServer.ConnectWindowsServer.runCommand(ConnectWindowsServer.java:55)
      at Connect.RemoteServer.ConnectWindowsServer.main(ConnectWindowsServer.java:27)
    Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at ch.ethz.ssh2.transport.TransportManager.initialize(TransportManager.java:299)
      at ch.ethz.ssh2.Connection.connect(Connection.java:591)
      ... 3 more
    JAVA Code
    import ch.ethz.ssh2.Connection;
    import ch.ethz.ssh2.Session;
    public void setAuthenticationInfo(String hostname, String username,String password) {
           this.host = hostname;
           this.userid = username;
           this.password = password;      
           this.recentCommand = "";     
           System.out.println("setting authentication info completed for host=" + host );
      public void runCommand() throws Exception {
    try{
            // Setup ssh session with endpoint
           System.out.println("starting connection with " + host);
           Connection connection = new Connection(host);
           System.out.println("connection object created..");
           connection.connect();
           System.out.println("Connect to connection");
           connection.authenticateWithPassword(userid,password);
           System.out.println(connection.isAuthenticationComplete());
           Session session = connection.openSession();
          System.out.println("connected");
      }catch (Exception e) {
      e.printStackTrace();
    Regards,
    Praveen

    Hi baftos,
    I tried to telnet remote windows machine from my local machine on port 23, its not connected and given error message like "Connect failed".
    As your response, if we can telnet to remote windows machine from local machine then we can connect from Java. Is it correct ?.
    Can you please help me to resolve this issue. And also please confirm the port (23) is correct, which I was used to connect remote machine from telnet.
    Regards,
    Praveen

  • PI 7.1: Importing a wsdl file with references to other xsd files

    Hi Experts,
    I am trying to import a wsdl file that has got references to other xsd files. When i do this with SOAP UI, i can get the full message structure for the other xsd files. But when i try to import the same wsdl in the ESR, i only get to the messages and not the referenced xsd.
    Any ideas!
    Thank you in Advance,
    Danny

    Hi,
    First convert your main WSDL in to XSD,use Stylus or any XML editors to convert the same,thecn check the genarated XSD refering sun XSD tsrutures.then zip the all xsd in to one File and import in PI,then select you main xsd in the folder,and select root element.
    Normally withour converting in to XSD only if you group al import it in to PI,it wil work.
    or
    if you have some good knowledge about XSD then convert WSDL in to XSD and remove referece tags and include XSD content of sub xsds in to main XSD,and validate that one,and imnprt one XSD.
    Regards,
    Raj

  • Help Editing code from a published html file with flash detection enabled from flash

    hi guys ive publish a html file with flash detection enabled from flash
    heres the code from the publish html:
    <!-- saved from url=(0013)about:internet -->
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>main</title>
    <script language="javascript"> AC_FL_RunContent = 0; </script>
    <script language="javascript"> DetectFlashVer = 0; </script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Revision of Flash required
    var requiredRevision = 45;
    // -->
    </script>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <script language="JavaScript" type="text/javascript">
    <!--
    if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
         alert("This page requires AC_RunActiveContent.js.");
    } else {
         var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
         if(hasRightVersion) {  // if we've detected an acceptable version
              // embed the flash movie
              AC_FL_RunContent(
                   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
                   'width', '800',
                   'height', '600',
                   'src', 'main',
                   'quality', 'high',
                   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                   'align', 'middle',
                   'play', 'true',
                   'loop', 'true',
                   'scale', 'showall',
                   'wmode', 'window',
                   'devicefont', 'false',
                   'id', 'main',
                   'bgcolor', '#ffffff',
                   'name', 'main',
                   'menu', 'true',
                   'allowScriptAccess','sameDomain',
                   'allowFullScreen','false',
                   'movie', 'main',
                   'salign', ''
                   ); //end AC code
         } else {  // flash is too old or we can't detect the plugin
              var alternateContent = 'Alternate HTML content should be placed here.'
                   + 'This content requires the Adobe Flash Player.'
                   + '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
              document.write(alternateContent);  // insert non-flash content
    // -->
    </script>
    <noscript>
         // Provide alternate content for browsers that do not support scripting
         // or for those that have scripting disabled.
           Alternate HTML content should be placed here. This content requires the Adobe Flash Player.
           <a href="http://www.macromedia.com/go/getflash/">Get Flash</a>
    </noscript>
    </body>
    </html>
    now since the default codes places my flash movie on upper left corner, ive made my own tables with the flash on it, how or where do i place this code to the upper codes?
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th valign="middle" scope="col"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <th height="600" bgcolor="#333333" scope="col"><script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','800','height','600','src','main','quality','high','pluginspage','http://www.adobe.com /shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="600">
              <param name="movie" value="main.swf">
              <param name="quality" value="high">
              <embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="600"></embed>
            </object></noscript></th>
          </tr>
        </table></th>
      </tr>
      <tr>
        <td height="30" bgcolor="#990000"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <th scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <th scope="col"><div align="left" class="style1">Copyright 2009 St. Paul of the Cross Parish. All Rights reserved.</div></th>
                <th width="400" scope="col"><div align="right" class="style1">Usage outside our permissions guidelines requires our prior written consent.</div></th>
              </tr>
            </table></th>
          </tr>
        </table></td>
      </tr>
    </table>
    Tnx in advance!

    Hi
    Can you tell me which version of dreamweaver you are using (and flash pro, if you have it), as the code you provided has element of a number of different versions (e.g. your js flash files are reasonably new, but your flash inserted into the html body is old, but with the cs3 version of flash player indicated!). Also the detect flash file is no longer required.
    PZ

Maybe you are looking for

  • How to set up an integrated wired and wireless network

    I have an iMac 17" 1GHz connected to a ethernet hub which in turn is connected to a DSL modem and from there to my ISP. I also have a MacBook Pro wirelessly connected to an AirPort Express; the AE is connected to the same ethernet hub through its eth

  • Illustrator CS2 or CS3  Can't delete print presets

    In File/Print I can save any preset I make with my own options wich is great, but now I want to delete one of this presets but can't find how. Is it possible? b I tried to find via finder where that presets are stored but nothing is retrieved.. see h

  • Over Partition by in OWB 9i

    Hi, I am using OWB V9i. I need to implement an sql statement in a mapping.The statement is CASE WHEN (tr_dt=lead(tr_dt) OVER(PARTITION BY ID ORDER BY ID,tr_dt)) THEN lead(ef_dt) OVER(PARTITION BY ID ORDER BY ID,tr_dt) ELSE tr_dt END I am not able to

  • No Internet conectivity/clock error when installing FB4.7 (trial)

    I follow these steps: Install as trial-> (License) Accept -> Sign In Required (Click Sign In) [here I get the error: "Please connect to the Internet and retry: Either your computer is offline or the clock on your computer is set incorrectly"] I've tr

  • Unrecognized option : jrockit

    Hi All, After the upgrade of jdk 1.6.20 to 1.6.35 version, getting unrecognized option jrockit error while starting the admin server. Please help me on this. Thanks, Varaprasad