Java and SOAP

I am trying to use Java and SOAP to call a Coldfusion CFC file. The problem is that I can not figure out how to call the coldfusion function by using a url to direct the SOAP request, within java. The cfc file does sql queries on a separate network so I need to send a string parameter to the function and be able to return one back to the java program.
I have done a lot of internet research and I can not get it to work out right. My coldfusion is working correctly.

But the Coldfusion server would still have to present a "service". This could be using web services or it could be something as simple as a small HTTP based page to take the parameters and pass back results. Somehow the Coldfusion server must present a service for this to work.
Think of a standard HTML page with a form on it. What you're describing is similar to that - you take in parameters (the HTML form) and return results (the result from an HTTP POST). Coldfusion is acting as the web server and your Java client is acting as the browser. Until the Coldfusion server is ready to accept requests (in your case SOAP formatted requests) there is not point worrying about the client side (the Java client in your case).
Is the Coldfusion server presenting something that can run the CFC file and return the results? Again, it could be a web service or even a REST-like service (like I described above) that your client could talk to.

Similar Messages

  • Java Web Service Access SOP Header and SOAP Body

    Hi
    I am newbie to Web Service. I had a Java class and I converted it to Web Service(LoginWebService has methods login, register).
    Now my client is accessing my web services and calling methods login and register.
    Now I want to add few values in SOAP header in client side.
    My Questions:
    1. How can I access the SOAP headers and SOAP Body in my Server Web Service method implementations?
    2. Is there any API that I have to use?
    3. Does anyone have any sample code for these things?
    Thanks

    Seems like the exception handling logic is not sound - but your posting is difficult to read. Please use the *\* tag to mark and end source code snippets.
    Have a look at the sample code in {message:id=4205205} - does a SOAP call using PL/SQL only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • What is the best book on XML and SOAP with Java?

    I need to learn xml and soap. Could someone recommend a book or tutorials on the subject. I have just went through teach yourself java in 21 days.
    Thank you
    Noah

    Well using XML is very easy and I can assure you that a simple tutorial can get you on the right track quickly. A quick google search gave me this one, which looks like a good start: [http://totheriver.com/learn/xml/xmltutorial.html|http://totheriver.com/learn/xml/xmltutorial.html]
    As for SOAP, that is a more complex subject. You are looking for JAX-WS (Java API for XML webservices). I suggest checking out amazon.com searching for "java web services". The user reviews should give you a very good idea which book is good and which one stinks.

  • Xmlrpc and soap, looking for a simple answer to a simple question

    Hello,
    Can someone tell me, are java implementations of web service protocols such as soap and xmlrpc built around servlets (and supporting classes of course) that know how to deal with these specific xml formats? I know there are various libraries for handling these things but on the most basic level it's still using a Servlet as an end point for an http request and then handing out the request to the supporting classes isn't it?
    thanks a bunch
    -seth

    XML-RPC and SOAP were developed outside of Sun, outside of Java. They are uniform international standards of communications developed on top of XML standards to be easily used by applications of different types.
    XML, like Java, is cross-platform, but for applications. XML defines document structure, and because it is an international standard, many people have access to the "format." An application, like Microsoft Word, can read an XML document created by some other Application that is written in XML because both understand XML. Although they can read the document, they may not understand the data. Various other XML technologies enable the application to retrieve another XML document that describes the elements or that defines how the data is to be displayed and/or used. XML Style Sheets and XML Translations are just two such things.
    Not everyone knows the Adobe PDF format, so a program like MS Word is not able to read it, but if it was written in XML, then Word could read the document, get the technology that describes how to handle the data, and then properly display it to the user, allow editing, then save it back into XML format, and then Acrobat could read the edited data and display it correctly as well. Two different applications, one common format.

  • RFC sender and SOAP receiver data is not posting

    Dear Experts,
    we creating one scenario
    R3-PI-Third party(WSDL).so we are creating  RFC as Sender and SOAP as Receiver.in SXMB_MONI no error.Message monitoring also showing delivered and both payloads also showing.but in thirdparty system data is not posting.third party system is handling messages, but not showing any error also.we call the WSDL using WSNAVIGATOR to post data working fine.
    Thnaks,
    ajai

    Dear Stefan,
    we are getting below message in TCP Gateway.
    POST /AdvancedMeteringInfrastructure-UtilitiesDeviceERPSmartMeterBulkCreateRequest-context-root/UtilitiesDeviceERPSmartMeterBulkCreateRequest_OutPort?wsdl HTTP/1.0Accept: /Host: gts-poc1:50081User-Agent: SAP-Messaging-com.sap.aii.af.sdk.xi/1.0505content-id: <soap-00237D5E14C01DEF9BC72C1A7C0FFCA3(at)sap.com>Content-Type: text/xml; charset=utf-8Content-Length: 1746SOAPACTION: "http://sap.com/xi/IS-U/Global2/UtilitiesDeviceERPSmartMeterBulkCreateRequest_Out"<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body><ns1:UtilitiesDeviceERPSmartMeterBulkCreateRequest xmlns:ns1='http://sap.com/xi/SAPGlobal20/Global'><MessageHeader><ID schemeID='Device' schemeAgencyID='www.infotech.com'>4446364533373842</ID><UUID schemeID='Device' schemeAgencyID='www.infotech.com'>DF6E378B-D76E-DDF1-B9A3-0013725B3FAB</UUID><CreationDateTime>2010/06/02 T16:54:17</CreationDateTime><TestDataIndicator>true</TestDataIndicator><ReconciliationIndicator>true</ReconciliationIndicator><SenderBusinessSystemID>SLD_B001</SenderBusinessSystemID><RecipientBusinessSystemID>SLD_B002</RecipientBusinessSystemID></MessageHeader><UtilitiesDeviceERPSmartMeterCreateRequestMessage><MessageHeader><ID schemeID='Device' schemeAgencyID='www.infotech.com' schemeAgencySchemeAgencyID='001'>4446364533373842</ID><UUID schemeID='Device' schemeAgencyID='www.infotech.com'>DF6E378B-D76E-DEF1-B9A3-0013725B3FAB</UUID><CreationDateTime>2010/06/02 T16:54:17</CreationDateTime><TestDataIndicator>true</TestDataIndicator><ReconciliationIndicator>true</ReconciliationIndicator><SenderBusinessSystemID>SLD_B001</SenderBusinessSystemID><RecipientBusinessSystemID>SLD_B001</RecipientBusinessSystemID></MessageHeader><UtilitiesDevice><ID schemeID='DEID' schemeAgencyID='115'>1200000120001556</ID><StartDate>2010.06.02</StartDate><EndDate>9999.12.31</EndDate><SerialID>1200000120001556</SerialID><MaterialID schemeID='MaterialID' schemeAgencyID='MPL_002'>85</MaterialID><ProductUniqueItemID schemeID='Smart Meter' schemeAgencyID='MPL_002'>SM1165HS</ProductUniqueItemID></UtilitiesDevice></UtilitiesDeviceERPSmartMeterCreateRequestMessage></ns1:UtilitiesDeviceERPSmartMeterBulkCreateRequest></SOAP:Body></SOAP:Envelope>
    HTTP/1.1 404 Not Foundconnection: closepragma: no-cachecache-control: no-cacheexpires: 0sap-isc-etag: J2EE//content-type: text/htmlcontent-length: 1571server: SAP NetWeaver Application Server 7.10 / AS Java 7.10date: Wed, 02 Jun 2010 11:24:17 GMT<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>     <title>Error Report</title><style>td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;}A:link A:visited A:active </style></head><body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"><table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"><tr bgcolor="#FFFFFF">    <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>  404 &nbsp Not Found</b></font></td></tr><tr bgcolor="#3F73A3">    <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td>    <td height="23"><img width=1 height=1 border=0 alt=""></td>    <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP NetWeaver Application Server 7.10 / AS Java 7.10 </b></font></td></tr><tr bgcolor="#9DCDFD">    <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td></tr></table><br><br><br><br><br><br><p><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>  The requested resource does not exist.</b></font></p><p><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><table><tr><td valign="top"><b> Details:</b></td><td valign="top"><PRE>Go to <A HREF="/" target="_parent">main page</A> of this application!</PRE></font></td></tr></table></font></p></body></html>
    Thaks,
    Ajai

  • RMI and SOAP

    hai everybody,
    I wanna know the differences in using RMI and SOAP concepts.
    can we use SOAP in place of RMI?
    Im new to SOAP.
    I want use SOAP concept in my project to work with the database by sending data through SOAP messages using xml to remote server.
    there i want call some remote methods to insert data in to database from the SOAP messages.
    Is it necessary to use RMI here or we can manage vth SOAP concepts?
    can any one suggest in such situation?
    Thanks in advance for ur reply

    tjacobs01 wrote:
    They are essentially the same. RMI is a little bit more abstract - SOAP defines one way you can do RMI. Others are things like CORBA and DCOM.RMI and SOAP are not the same at all. RMI is java's remote procedure call (RPC) mechanism and is java to java only. SOAP is used for exchanging XML-based messages and is cross-platform.

  • OTN Live Web Services problem, mismatched WSDLs and Soap RPC reply

    I've tried to connect to all those OTN Live Web Services using webMethods and found there might be a mismatched WSDLs and Soap RPC problem in Oracle side. There is a discussion thread of this: http://www.wmusers.com/wmusers/messages/116/904.shtml
    Is there anyone out there encounters the same problem and agree that Oracle should fix this ? Thanks a lot in advance.

    Hi Mike,
    I've just downloads all 5 WSDL and tried each single one of them again. The following are the results of the test.
    Result (OK): this is the success case
    Result (0): this is the "OTN Authentication Failure" and I cannot tell if it works if input is correct.
    Result (1): this is the error I've mentioned in the previous message and I'll give you more details later.
    Result (2): this is the "No Serializer found" exception:
    java.lang.IllegalArgumentException: No Serializer found to serialize a
    'org.w3c.dom.Element' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
    -- IOTNMobileWrapperPortType
    getStatusByMsgID (OTN Authentication Failure)
    getStatusesByMsgIDs (1)
    getSupportedTransports (1)
    getVersion (1)
    sendText (1)
    sendTextMsg (1)
    -- OTNDeptEmpPortType
    getDeptInfoArray (OK)
    getDeptInfoXML (2)
    getDeptNoArray (OK)
    getDeptXML (2)
    getEmpInfoArray (OK)
    getEmpInfoXML (2)
    getEmpNoArray (OK)
    getEmpXML (2)
    -- IOTNGUIDGeneratorPortType
    getGUID (1)
    -- IOTNHelloWorldPortType
    getAvailableLanguages (1)
    getDefaultHelloWorld (1)
    getHelloWorld (1)
    -- IOTNNewsPortType
    getRss (1)
    Let me explain what happens in error case (1):
    webMethods construct the "targetOutSignature" for the client base on the WSDL.
    After the reply message retrieved, it tries to "conform" (validate) it against the "targetOutSignature".
    Whenever I get this exception, I can open the exception details and actually see that the reply xml has been received but with the error message of "Output parameters do not conform to targetOutputSignature".
    If I manually remove the "targetOutputSignature" from the generated client, so that webMethods won't try to "conform" the reply message against the one described in the original WSDL, it works perfectly.
    I hope this helps. Please let me know if there is any other information I can provide.
    Thanks.
    - Louis

  • How to link java and VB

    hi,
    I have two chat programs written in java and VB.Now i have to chat from the web to the VB application.i need ur ideas of how to do this???if i send a message from client side of the java program i need to get the message in the vb client....how to do this??..Please give ur ideas and suggestions....and it would be a great help if u explain with sample codings.....
    Thanks in advance..
    PadmaPriya.

    Try HTTP requests. Or if you want to do cutting edge stuff try SOAP. Don't have any sample code though.

  • ABAP , JAVA And XSLT Mapping Doc's

    Hi,
    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.
    Regards
    Kiran.B

    Hi
    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm (Java mapping)
    XSLT mapping:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Regards,
    Kumar.
    Reward points if helpful!!

  • BI Java and BI ABAP -RSPLAN issue

    Hi All
    We are working with BI system ,using BI 7.0 Java and BI ABAP as separate systems on same host.
    Already run the template intaller for BI Java and ABAP integration.
    But facing some issue ,when going ot BI ABAP and RSPLAN and clicking the Start Mideller
    it is opening a browser as http://host:8000/sap/public/myssocntl?sap-client-XXX
    Since this is not correct and it should open BI Java portal instead of ABAP stack page.
    Instead this should open a Url like this http://host:5XX00/webdynpro/dispatcher/sap.com/biplanworkbench1/Modeler?
    I check on BI ABAP system under SAP Reference IMG -> SAP Customizing Implementation Guide-> SAP NetWeaver _> Business Intelligence-> BI Integrated Planning -> Settings for Starting the Planning Modeler.
    There the default Url is BEx Portal Server and the url is        
    http://host:5XX00/webdynpro/dispatcher/sap.com/biplanworkbench1/Modeler
    Can anybody let me know why this is going to ABAP server instead it should go to Java.
    Regards
    Ajay
    Edited by: Ajay Sandal on Mar 10, 2009 2:31 PM

    Hi Ajay ..
    Good news that ur issue is resolved ..
    I have somewhat similar issue .. Hopu u can put some light ..
    I have Bi 7.o with Add on java  ,
    In RSPLAN from ABAP system , modular page is not coming . if i click on start moduler button in RSPLAN ..portal page is coming up and i have to give logging details .
    Please suggest .
    Thanks

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Problem with java and javaw

    Hi,
    In running the following simple code, I have gotten different results using java and javaw.
    public class Test {
    public Test() {
    public static void main(String[] args) {
    int x =4;
    System.out.println("The value is "+ ((x > 5)?6.0:4));
    System.out.println("The value is "+ ((false)?6.0:4));
    System.out.println("The value is "+ ((true)?99:9.9));
    Using java, I get the following results:
    The value is 4.0
    The value is 4.0
    The value is 99.0
    But using javaw, I get the following results:
    The value is 4.0
    The value is 4
    The value is 99
    Any ideas why this is so?
    Thanks for any help.
    Gilbert

    I used JBuilder to run the following code and Jbuilder uses javaw.
    By the way, the correct answer is the one using java right?

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

Maybe you are looking for

  • Delete Boot Camp Partition with Lion

    To Delete boot camp partition with lion follow steps below : - • open finder and goto applications folder then open utilities folder ,select Boot Camp Assistance •now  click on continue to go to next screen select "i have already downloaded the windo

  • Fraudulent charges

    When I ordered two phones from VZW online, the invoice said the voice plan monthly charge would be $36.80/mo.   It also stated that the two $35 one time activation fee would be charged then credited on the first bill.   The first bill arrived, and th

  • All invisible items visible now - What to do?

    Greetings everyone, All of a sudden all the invisible items at the root level of my HD have become visible, stuff like "bin", "sbin", "Volumes", "etc", "dev" and so on... are now visible, my guess is they are system files, and not to be tampered with

  • How to spool DBMS_OUTPUT.PUT_LINE from SqlPlus?

    Hi, i have a stored procedure test: procedure test is begin dbms_output.put_line('Test'); dbms_output.put_line('Test2'); dbms_output.put_line('Test3'); dbms_output.put_line('Test4'); dbms_output.put_line('Test5'); end; I start the stored procedure ou

  • Maintaining sales enquiry

    what are the essential steps for maintaining sales inquiry. i use T.C - VA11, after filing all details it flashes a error regarding access sequence. what i do now, please suggest................ thanks in advance