Can I Include an xml-stylesheet Link in a Java Web-Service?

The ability to easily create a SOAP-based web-service from a Java class using JDev's built in "Java Web Service" wizard is great.
From an "Ajax enablement" perspective, I see tremendous value in having the ability to specify an XSL url in the call to that web-service, so that the server will insert an <?xml-stylesheet .../> link to the specified URL prior to the SOAP message that it returns. That way, different callers to the web-service could render the same SOAP response differently (via an XSL transformation performed on the client-side via the XSL they've specified).
Is there already an undocumented way to do this with an Oracle "Java Web Service" that I am not aware of? If not, adding that capability would be trivial for Oracle, and it would add tremendous value to developers using Oracle's "Java Web Service" capability.

Hi Chris,
I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01​/lvhowto/build_web_service/
I hope this helps.

Similar Messages

  • Java Web Service "clears" sop:Include/ from SOAP Body?

    I have a Java Web Service which processes SOAP Messages with MIME attachments. The references to the attachments are using XOP (XML-binary Optimized Packaging) specification.
    The XML Schema for the SOAP Body content imports the namespace "http://www.w3.org/2004/08/xop/include", but it is not its main target namespace. When I run the service and view the HTTP packet through HTTP Analyzer, the SOAP Envelope looks like this:
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:ns0="http://www.ACORD.org/Standards/AcordMsgSvc/1"
                  xmlns:xop="http://www.w3.org/2004/08/xop/include"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <env:Header>
        </env:Header>
        <env:Body>
            <ac:CallRq xmlns:ac="http://www.ACORD.org/Standards/AcordMsgSvc/1">
                <ac:WorkFolder>
                    <ac:MsgFile>
                        <ac:FileId>
    <sop:Include href="cid:93609df7-d718-4801-bab9-57e3fd9cc5b5"
    xmlns:sop="http://www.w3.org/2004/08/xop/include"
    xsi:schemaLocation="http://www.w3.org/2004/08/xop/include http://www.w3.org/2004/08/xop/include"/>
    </ac:FileId>
                        <ac:FileFormatCd>text/xml</ac:FileFormatCd>
                    </ac:MsgFile>
                </ac:WorkFolder>
            </ac:CallRq>
        </env:Body>
    </env:Envelope>But when I access the java.xml.soap.SOAPMessage object in handleRequest(MessageContext) method of the Web Service's handler I get the following:
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:ns0="http://www.ACORD.org/Standards/AcordMsgSvc/1"
                  xmlns:xop="http://www.w3.org/2004/08/xop/include"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <env:Header>
        </env:Header>
        <env:Body>
            <ac:CallRq xmlns:ac="http://www.ACORD.org/Standards/AcordMsgSvc/1">
                <ac:WorkFolder>
                    <ac:MsgFile>
                        <ac:FileId>
    </ac:FileId>
                        <ac:FileFormatCd>text/xml</ac:FileFormatCd>
                    </ac:MsgFile>
                </ac:WorkFolder>
            </ac:CallRq>
        </env:Body>
    </env:Envelope>As you can see, the <sop:Include/> element has disappeared.
    Does anyone has an idea why this happens?
    Thank you!
    Simeon

    Neither the simple "setter" methods work.. :(
    The php client side:
    $string="aladar";
    $client->setSample($string);
    $return = $client->getSample();
    The server side:
    public String sample;
    public String getSample() {
    return sample;
    public void setSample(String a_sample) {
    sample = a_sample;
    Any ideas?

  • Can we deploy a java web service on OC4J within EBS 12.1.3

    Hi,
    I needed some instructions if this is possible to deploy a java web service on OC4J in EBS 12.1.3.
    We don't have SOA gateway integration. The web service is simple SOAP web service.
    Is there any document that can be referred for this ?
    Thanks

    I would try a number of things:
    1) Try generating the web service artifacts by using the web service assembler tool that comes with oc4j 10.1.3 dp3. You can use either the command line or ant assembly tasks that are available with the download. There are some fairly detailed examples of using the ant tasks for web service generation at http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/index.html (under the "web services" heading).
    2) Try deploying the generated ear file using the admin console. I believe that should work.
    3) If for some reason that doesn't work you can try to use the deployment ant tasks (also detailed in the how to examples).
    I believe the reason you did not deploy successfully is that even though the core service implementation class, SEI, and JAX-RPC descriptor are portable the artifacts generated in order to deploy the service to a particular application server are unique. JWSDP is tailored to the sun platform.
    Hope that helps.
    -- Jon

  • How can I add ?xml-stylesheet to an XML file?

    Hi guys,
    I have a java code that writes out an XML file. I want to specify the name of a stylesheet in the XML file. How can I do that?
    This is the source code I have:
    //---------- Create XML File ------------------
    private void createXMLFile(Document doc) throws Exception
    try
    TransformerFactory tF = TransformerFactory.newInstance();
    Transformer tr = tF.newTransformer();
    FileOutputStream outXml = new FileOutputStream(xmlFile, false);
    tr.transform(new DOMSource(doc), new StreamResult(outXml));
    outXml.close();
    catch (java.io.FileNotFoundException exc)
    throw new Exception(exc.getMessage());
    catch( TransformerConfigurationException exc )
    throw new Exception(exc.getMessage());
    catch( TransformerException exc )
    throw new Exception(exc.getMessage());
    Thank you
    Murat

    The solution from dvohra09 will output a file outXml that uses the format rules from stylesheet.
    But how can I write out the following 2 lines to outXml? contextHandler.startDocument() will only write out the first line, but not the second line...
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="mytest.xsl"?>
    Thanks for all pointers!
    Philip

  • How can I include a url (or Link) in my e-mail

    In previous versions of thunderbird I could just go to "include" and then "Link" and in the drop down box just paste in the url I wanted to include into the field link address.
    If I try doing that now I am told something about there being "no know anchor .... "
    Now I have to type in the url again. Using the paste button does not work! WHY?
    As a work around i just paste the url as text into the mail but then it does not show up as a link (underlined in blue), so that the receiver of the mail now has to copy and paste my link instead of just being able to click on it.

    ''Hormazdyar-Kutar [[#question-1040695|said]]''
    <blockquote>
    In previous versions of thunderbird I could just go to "include" and then "Link" and in the drop down box just paste in the url I wanted to include into the field link address.
    If I try doing that now I am told something about there being "no know anchor .... "
    Now I have to type in the url again. Using the paste button does not work! WHY?
    As a work around i just paste the url as text into the mail but then it does not show up as a link (underlined in blue), so that the receiver of the mail now has to copy and paste my link instead of just being able to click on it.
    </blockquote>
    Yes it does, the conversion is part of the send process. if you look in your sent mail they will be links.

  • Problems sending xml data as string to a web service

    Hello!
    I need to develop a client in order to invoke a web service. I have the WSDL of the web service, so I generate a web service proxy, from that WSDL, using JDeveloper 10.1.3.0.
    Among other things, that web service receive RPC request (binding style is RPC) and the request has only one parameter, which consists of a string. That string must be an XML document (that is, the web service receives one parameter which is a XML document as a String). I generate that parameter, and it looks like the following:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    </inputMessage>
    However, when I send the request and capture it through HTTPAnalyzer, I get the following:
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><MyWebService xmlns="http://soapinterop.org/"><myWebServiceRequest xsi:type="xsd:string" xmlns="">&lt;?xml version = '1.0' encoding = 'UTF-8'?>
    &lt;inputMessage xmlns="http://ws/validacion" xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance" xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws.xsd">
    &lt;request>ServiceRequest&lt;/request>
    &lt;versionMsg>1.0&lt;/versionMsg>
    &lt;data>AAAAAAAAAAAAAA&lt;/data>
    &lt;/inputMessage></myWebServiceRequest></MyWebService></soapenv:Body></soapenv:Envelope>
    As you can see, the symbol '<' y replaced with '&lt;'.
    Why does it happen? Is there a way of avoiding that?
    Could anybody be so kind to help me, please?
    Thank you very much in advance.

    Hello!
    I need to develop a client in order to invoke a web
    service. I have the WSDL of the web service, so I
    generate a web service proxy, from that WSDL, using
    JDeveloper 10.1.3.0.
    Among other things, that web service receive RPC
    request (binding style is RPC) and the request has
    only one parameter, which consists of a string. That
    string must be an XML document (that is, the web
    service receives one parameter which is a XML
    document as a String). I generate that parameter, and
    it looks like the following:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion"
    xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance"
    xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
    .xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    nputMessage>
    However, when I send the request and capture it
    through HTTPAnalyzer, I get the following:
    <?xml version="1.0"
    encoding="UTF-8"?><soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop
    e/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body><MyWebService
    xmlns="http://soapinterop.org/"><myWebServiceRequest
    xsi:type="xsd:string" xmlns=""><?xml version =
    '1.0' encoding = 'UTF-8'?>
    <inputMessage xmlns="http://ws/validacion"
    xmlns:xsi="http://www.w3.o
    rg/2001/XMLSchema-instance"
    xsi:SchemaLocation="http://localhost/ws/xsd/mservic/ws
    .xsd">
    <request>ServiceRequest</request>
    <versionMsg>1.0</versionMsg>
    <data>AAAAAAAAAAAAAA</data>
    ;/inputMessage></myWebServiceRequest></MyWebService></
    soapenv:Body></soapenv:Envelope>
    As you can see, the symbol '<' y replaced with
    '<'. (I hope you can see it now)
    The symbol '<' is replace with '& l t ;' (with no whitespaces)
    >
    Why does it happen? Is there a way of avoiding that?
    Could anybody be so kind to help me, please?
    Thank you very much in advance.

  • Can't re-add printer after removing from eprint center - 'Web Services Problem'

    I have an HP Photosmart Premium C310 series printer (Model Number CN503B) which I have been using with ePrint for about 18 months. Aside from intermittent issues it has worked, I use a chromebook most of the time so rely on the ePrint option via Google Cloud Print.
    Last week it stopped working, with every job in the list showing as cancelled. Following advice on the forum I removed the email address of the printer from the eprint center. I thought it would then be simple to add the printer back. However, I have been unable to connect the printer to the web service so I cannot create the code I need to add the printer back.
    STEPS TO REPRODUCE:
    1. Factory reset printer settings
    2. Factory reset network settings
    3. Restart printer and Reboot router
    3. Settings -> Network -> Wireless Setup Wizard
    4. Choose correct SSID, enter password for WPA
    5. ‘Connected to Network’
    6. Settings -> Web -> Enable Web Services
    7. ‘Accept terms’ screen -> Accept
    8. ‘Checking for product updates’ screen shows briefly then returns to 'accept terms' screen
    9. Next it makes a ping sound and shows ‘Web Services Problem’ ‘Problem connecting to Web Services Server’, it then pings again a few seconds later (which ties in with what I see in the network logs as a second attempt)
    10. Log on to printer via web interface and set IP address of printer to manual IP outside DHCP range (as advice on other threads in this forum). Check DNS setting valid (same as gateway server which all other devices on network are also using successfully as DNS)
    11. Repeat steps 6 and 7 - still same error message
    I consider myself technically savvy and have followed all advice I can find on this forum including the following:
    1. reverting to printer and network defaults
    2. rebooting router
    3. assigning static IP address to printer outside of DHCP range of router
    4. connecting to printer via web interface and setting DNS to variously: same as gateway, google DNS (8.8.8.8), ISP DNS
    5. adjusting firewall settings on router to explicitly allow and log outbound connection on the HP ports (already had a rule allowing all outbound connections)
    As mentioned, the printer worked fine with ePrint previously so I suspect the ePrint server is rejecting a request from my printer for some reason, maybe because there is old / corrupt  data on the server regarding my specific printer.
    I’m logging outbound traffic from the printer and here are what the router logs show me (printer IP replaced with 192.168.x.x below, even though it is not public )
    Thu, 2013-04-11 09:13:42 - TCP Packet - Source:192.168.x.x, 36475 Destination:15.201.202.81,80 - [HTTP rule match]
    Thu, 2013-04-11 09:13:43 - TCP Packet - Source:192.168.x.x, 51463 Destination:15.201.224.79,443 - [HTTPS rule match]
    Thu, 2013-04-11 09:13:44 - TCP Packet - Source:192.168.x.x, 53044 Destination:15.201.224.79,443 - [HTTPS rule match]
    Thu, 2013-04-11 09:13:44 - TCP Packet - Source:192.168.x.x, 51463 Destination:15.201.224.79,443 - [HTTPS rule match]
    Thu, 2013-04-11 09:13:44 - TCP Packet - Source:192.168.x.x, 53044 Destination:15.201.224.79,443 - [HTTPS rule match]
    Thu, 2013-04-11 09:13:51 - TCP Packet - Source:192.168.x.x, 64270 Destination:15.201.224.79,443 - [HTTPS rule match]
    Looks like both are HP sites: first is 'g4t2674.houston.hp.com' and the second secure one is ‘registration-pro-site2eprint.houston.hp.com’ which sound likely to be correct. That suggests the DNS is working but that the registration server doesn’t like the request for some reason.
    I had the printer registered for Google Cloud Print but I have now deleted that also and it doesn’t seem to have made any difference (assume it just formats and forwards to the HP ePrint email anyway).
    One hack that sheds some further light is to switch off wifi on the printer and then switch on ePrint. Eprint gives an error but stays set as 'on'. When I then switch wifi back on I can then at least check for product updates (it tells me I have the latest product updates). However, web services are still a 'no go'. Network traffic for that product update exchange looks like this:
    Thu, 2013-04-11 10:14:51 - TCP Packet - Source:192.168.x.x,63960 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:00 - TCP Packet - Source:192.168.x.x,63938 Destination:15.240.238.56,80 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:00 - TCP Packet - Source:192.168.x.x,63960 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:00 - TCP Packet - Source:192.168.x.x,39054 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:00 - TCP Packet - Source:192.168.x.x,63938 Destination:15.240.238.56,80 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:00 - TCP Packet - Source:192.168.x.x,39054 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:01 - TCP Packet - Source:192.168.x.x,63960 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:01 - TCP Packet - Source:192.168.x.x,63938 Destination:15.240.238.56,80 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:01 - TCP Packet - Source:192.168.x.x,39054 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:01 - TCP Packet - Source:192.168.x.x,63938 Destination:15.240.238.56,80 - [Any(ALL) rule match]
    Thu, 2013-04-11 10:15:01 - TCP Packet - Source:192.168.x.x ,39054 Destination:2.16.226.12,443 - [Any(ALL) rule match]
    So clearly the printer can communicate to those servers well enough to find it has the latest firmware. 
    I realise this is a lot of information but hopefully some of it is helpful for troubleshooting.
    Thank you in advance for any help!

    The issue disappeared this weekend. I didn't change anything so it must have been something server side. I notice others with the same issue have also seen it resolved.
    Thanks to all those who contributed and tried to help out. Although disappointed I went for a long time without ePrint I'm glad that action was apparently taken to resolve in the end.

  • Reading XML file from java web service

    Hi
    I am developing web service using Netbeans and the application server is glassfish.
    but I am facing a problem
    I have folder called "config" which will include the xml files. What I need to do setting path into that folder
    but it will read from another location when I am deploying it
    How to set our own path ?
    Error
    DPL5306:Servlet Web Service Endpoint [NewWebService] listening at address [http://kapila.epic.lk:8080/WebApplication2/NewWebServiceService]
    deployed with moduleid = WebApplication2
    java.io.FileNotFoundException: /root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    My "conifg" folder, i have put in to working directory but it will read from "/root/MyWorks/glassfish-v2/domains/domain1/config/OSconfig/MConfig.xm"
    below method is used for getting its contain value
    public String getMainCofig() {
                String v ="";
            try{
              DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
                        .newInstance();
              DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
              Document doc = docBuilder.parse(new File("OSconfig/MConfig.xml"));
              doc.getDocumentElement().normalize();
              NodeList listOfSPRMs = doc.getElementsByTagName("MainConfig");
              Node firstSPRMNode = listOfSPRMs.item(0);
              if (firstSPRMNode.getNodeType() == Node.ELEMENT_NODE) {
                   Element firstSPRAMElement = (Element) firstSPRMNode;
                   // Getting platform
                   NodeList server_port = firstSPRAMElement
                             .getElementsByTagName("RunningPlatform");
                   Element server_port_el = (Element) server_port.item(0);
                   NodeList server_port_List = server_port_el.getChildNodes();
                    v= ((Node) server_port_List.item(0))
                             .getNodeValue().trim();
            }catch (Exception e){
            e.printStackTrace();
                    return v;
    Regards
       

    I didn't quite get what the problem is but if the the desired file is in custom directory why don't you just use absolute path to reference it?
    Like: "/home/my/OSconfig/MConfig.xml"

  • XML Schema mapping error when generating web service

    I have created a method in java that returns an array of an object type (a user defined class). When tried to generate a web service JDeveloper did not allow me to select the method, giving the following "Why not.." explanation: "One or more parameters did not have an XML Schema mapping and/or serializer specified".
    Can anyone help me in this?
    Thanks
    Alina

    Thanks Mike for your advice it did work when I changed the setters and getters names, and managed to create a web service with Apache Soap profile. I created the client stub and client application to run the web service but it keep coming with soap-env error messages.
    Error message I get when running the client side:
    F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatClient\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatclientpackage.OrbatListArrayClient
    [SOAPException: faultCode=SOAP-ENV:Server.BadTargetObjectURI; msg=Unable to resolve target object(orbatlistarraypackage.OrbatListArray): orbatlistarraypackage.OrbatListArray [java.lang.ClassNotFoundException]]     orbatlistarraypackage.OrbatType[] orbatclientpackage.OrbatListArrayStub.getOrbatListArray()          OrbatListArrayStub.java:63     void orbatclientpackage.OrbatListArrayClient.main(java.lang.String[])          OrbatListArrayClient.java:19Exception in thread main
    Process exited with exit code 1.
    My wsdl file is:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
    <!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
    <definitions
    name="OrbatListArray"
    targetNamespace="http://orbatlistarraypackage/OrbatListArray.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://orbatlistarraypackage/OrbatListArray.wsdl"
    xmlns:ns1="http://orbatlistarraypackage/IOrbatListArray.xsd">
    <types>
    <schema
    targetNamespace="http://orbatlistarraypackage/IOrbatListArray.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <complexType name="ArrayOfOrbatType" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <complexContent>
    <restriction base="SOAP-ENC:Array">
    <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:orbatlistarraypackage_OrbatType[]"/>
    </restriction>
    </complexContent>
    </complexType>
    <complexType name="orbatlistarraypackage_OrbatType" jdev:packageName="orbatlistarraypackage" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="OrbatName" type="string"/>
    <element name="OrbatID" type="int"/>
    </all>
    </complexType>
    </schema>
    </types>
    <message name="getOrbatListArray0Request"/>
    <message name="getOrbatListArray0Response">
    <part name="return" type="ns1:ArrayOfOrbatType"/>
    </message>
    <portType name="OrbatListArrayPortType">
    <operation name="getOrbatListArray">
    <input name="getOrbatListArray0Request" message="tns:getOrbatListArray0Request"/>
    <output name="getOrbatListArray0Response" message="tns:getOrbatListArray0Response"/>
    </operation>
    </portType>
    <binding name="OrbatListArrayBinding" type="tns:OrbatListArrayPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="getOrbatListArray">
    <soap:operation soapAction="" style="rpc"/>
    <input name="getOrbatListArray0Request">
    <soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </input>
    <output name="getOrbatListArray0Response">
    <soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
    </output>
    </operation>
    </binding>
    <service name="OrbatListArray">
    <port name="OrbatListArrayPort" binding="tns:OrbatListArrayBinding">
    <soap:address location="http://192.9.200.200:8888/soap/servlet/soaprouter"/>
    </port>
    </service>
    </definitions>
    My OrbatListArrayDescriptor.dd file:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
    <!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
    <!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
    <isd:service
    id="orbatlistarraypackage.OrbatListArray"
    xmlns:isd="http://xml.apache.org/xml-soap/deployment">
    <isd:provider
    type="java"
    methods="getOrbatListArray"
    scope="Request">
    <isd:java class="orbatlistarraypackage.OrbatListArray" static="false"/>
    </isd:provider>
    <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
    </isd:service>
    My Client Web Service Stub class file:
    package orbatclientpackage;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import java.util.Vector;
    import orbatlistarraypackage.OrbatType;
    import java.util.Properties;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Wed Oct 23 11:19:42 BST 2002
    * WSDL URL: file:/F:/JDev9i-0-3/jdev/mywork/OrbatListArray/OrbatListArrayProject/src/orbatlistarraypackage/OrbatListArray.wsdl
    public class OrbatListArrayStub
    public OrbatListArrayStub()
    m_httpConnection = new OracleSOAPHTTPConnection();
    m_smr = new SOAPMappingRegistry();
    BeanSerializer beanSer = new BeanSerializer();
    m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://orbatlistarraypackage/IOrbatListArray.xsd", "orbatlistarraypackage_OrbatType"), orbatlistarraypackage.OrbatType.class, beanSer, beanSer);
    public String endpoint = "http://192.9.200.200:8888/soap/servlet/soaprouter";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public OrbatType[] getOrbatListArray() throws Exception
    OrbatType[] returnVal = null;
    URL endpointURL = new URL(endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("orbatlistarraypackage.OrbatListArray");
    call.setMethodName("getOrbatListArray");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    call.setParams(params);
    call.setSOAPMappingRegistry(m_smr);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault())
    Parameter result = response.getReturnValue();
    returnVal = (OrbatType[])result.getValue();
    else
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;
    public void setMaintainSession(boolean maintainSession)
    m_httpConnection.setMaintainSession(maintainSession);
    public boolean getMaintainSession()
    return m_httpConnection.getMaintainSession();
    public void setTransportProperties(Properties props)
    m_httpConnection.setProperties(props);
    public Properties getTransportProperties()
    return m_httpConnection.getProperties();
    My Client application main file:
    package orbatclientpackage;
    import java.io.*;
    public class OrbatListArrayClient
    public OrbatListArrayClient()
    public static void main(String[] args) throws Exception
    OrbatListArrayStub s = new OrbatListArrayStub();
    // File xmlFile;
    // BufferedWriter in;
    // xmlFile = new File("f:\\OrbatSoap", "OrbatXMLList.xml");
    // PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(xmlFile)));
    // out.println(s.getOrbatListArray());
    // out.flush();
    System.out.println(s.getOrbatListArray());
    When I deployed it to jar I copied the jar file in the following directory:
    <jdevloper home>\soap\webapps\soap\soap\Web-inf\lib\
    I then tried and created a client stub in the same package using JDeveloper 9.0.3 wizard for creating sample java client and added a line to call my getOrbatListArray method and print it to the screen. I get another soap error message, saying:
    F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatListArrayProject\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdbc\lib\classes12.jar;F:\JDev9i-0-3\jdbc\lib\nls_charset12.jar;F:\JDev9i-0-3\rdbms\jlib\xsu12.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\lib\xmlcomp.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatlistarraypackage.EmbeddedOrbatListArrayStub
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect]     void org.apache.soap.SOAPException.<init>(java.lang.String, java.lang.String, java.lang.Throwable)          SOAPException.java:77     void oracle.soap.transport.http.OracleSOAPHTTPConnection.send(java.net.URL, java.lang.String, java.util.Hashtable, org.apache.soap.Envelope, org.apache.soap.encoding.SOAPMappingRegistry, org.apache.soap.rpc.SOAPContext)          OracleSOAPHTTPConnection.java:765     org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String)          Call.java:253     orbatlistarraypackage.OrbatType1[] orbatlistarraypackage.EmbeddedOrbatListArrayStub.getOrbatListArray()          EmbeddedOrbatListArrayStub.java:70     void orbatlistarraypackage.EmbeddedOrbatListArrayStub.main(java.lang.String[])          EmbeddedOrbatListArrayStub.java:38Process exited with exit code 0.
    Sorry for the length of this message, but I am getting desparate.
    Thanks again for all you help
    Alina

  • Java web service: XML to SQL

    Background: I am a second year degree student currently on placement. The company I am with wants me to design a web service that listens for incoming XML data from an external system and uses this data to update a database.
    Does anyone have any tips as to the best place to start?, what API's will be required? or just general pointers for a newbe tackling this task?
    Any advice greatly apprieciated.

    marekst wrote:
    webservice receives xml data as parameter or webservice use SOAP XML letter to receive data?
    if you get xml as parameter then you have to process XML to get java objects, if it is SOAP letter, then webservice has done job for you and you get set of java objects that should be persisted.
    To persist data easiest way is to use EJB 3.0 and JPA. Webservice create using EJB 3.0 is easy as well.
    to convert data in XML into java objects you can use DOM document + xPath or http://commons.apache.org/digester/ or something else, depending on size of XML doc
    No need to be muddying the waters with such a heavyweight solution at this point. The guy's a relative newbie, and also has stated that the number of messages is very small. The simple APIs suggested above are much more in order, otherwise the guy's got a massive learning curve ahead of him, for no real benefit. Besides, you've not mentioned ESBs, message routing, EIP and the like, so your buzzword-compliance score has dropped dramatically :-)

  • Get error (There is an error in XML document (3, 4)) when consuming web service HelpDesk_QueryList_Service with New-WebServiceProxy

    Dear all,
    I'm using the powershell cmdlt New-WebServiceProxy to query ITSM incidents. I'm able to get the WSDL definition ..
    $uri='http://pitsm/arsys/WSDL/public/pitsmapp/HPD_IncidentInterface_WS'
    $myitsm=New-WebServiceProxy -Uri $uri -Namespace ITSM -Verbose true
    $auth= New-Object ITSM.AuthenticationInfo
    $cred=get-credential
    $auth.username=$cred.username
    $auth.password= [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($cred.password))
    $auth.authentication="Domain Authentication"
    $myitsm.AuthenticationInfoValue=$auth
    $myitsm.RequestEncoding =  [System.Text.Encoding]::UTF8
    $tid="INC000002237910"
    $criteria="'Incident Number' = ""$tid"""
    When i'm consuming now the web service i get back an error messages:
    $answer=$myitsm.HelpDesk_QueryList_Service($criteria,0,100)
    Exception calling "HelpDesk_QueryList_Service" with "3" argument(s): "There is an error in XML document (3, 4)."
    At line:1 char:1
    + $answer=$myitsm.HelpDesk_QueryList_Service($criteria,0,100)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : InvalidOperationException
    Has anybody an idea what could be wrong?
    Any idea how to debug the commandlet New-WebServiceProxy?
    Best Regards
    Chris

    Hello Christian,
     i  know this reply is really late ;) I am actually the author of the blog post mentioned by @AnnaWY, the post she mentioned is in regards of a situation 'where everything' is how it should be. Basically, (i think) sometime administrator, or the
    person who implements ITSM webservices makes an error, hence this script will not run. You will end up with that issue mentioned, in order to fix it, either you should contact the person who is responsible for that service, OR rewrite the wsdl for it yourself.
    It might be a bit problematic, but, it is for sure doable, as in my latest blog post about this issue. 
    I am writing it here, because i also saw this page, while googling for explanation, i guess there are more people who are looking for this so here is the link to the explanation:
    http://wp.me/pAXaY-ht
    I hope that helps !
    Regards,
    Greg

  • How can I open help file (HTML or .chm) from Java Web Start (new to JAVA)

    Hi All,
    Im trying to open the help file of my application.
    When trying to access the help file from the GUI (pressing F1 for launching the help file), I'm geting the an error, something like:
    "Can't show help URL: jar:file:C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart\RMjar-name!/com/resources/helpFiles/MyHelpFile.html"
    It seems that the file which is packed in a jar, was downloaded to the Java Web Start cache directory:
    C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart
    The code which is activated when launching the help file is:
    try
                ResourceBundle resourceBundle = DoubleResourceBundle.getBundle("Resource", "ResourceImpl");
                RuntimeUtil.launchFile(new File(resourceBundle.getString("help.file")));
            } catch (IOException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
            }where the property "help.file" is in some property file in the resource bundle named "Resource", and looks like this :
    help.file="com/trax/docs/help/global/MyHelpFile.html"
    The function "RuntimeUtil.launchFile" knows how to launch any file in its default application, and indeed it does launches the html, when giving it an absolute path to the file on my PC, as "C:\Helpfiles\MyHelpFile.html" as such:
    RuntimeUtil.launchFile("C:\Helpfiles\MyHelpFile.html");My question is :
    The application is going to be deployed on a Customer PC. How can I access the html file from the code, with a relative path and not its absolute path on the customer pc, which I can't know?
    I found these restrictions regarding web start:
    (copied from "http://rachel.sourceforge.net/"):
    *Rule 1: Java Archives only. No loose files.* All your resources have to be packaged in Java Archives (jar) if you want to have
    them delivered to the user's machine and kept up-to-date automatically by Java Web Start.
    *Rule 2: No file paths.* You can't use absolute or relative file paths to locate your
    jars holding your resources (e.g. <code>jar:file:///c:/java/jws/.cache/resources.jar</code>).
    Absolute file paths won't work because you never know where Java Web Start
    will put your jar on the user's machine. Relative file paths won't work because Java Web Start
    mangles the names of your jars (e.g. <code>venus.jar</code> becomes <code>RMvenus.jar</code>)
    and every JNLP client implementation has the right to mangle your names
    in a different way and you, therefore, can't predict the name with
    which your jar will be rechristend and end up on the user's machine in
    the application cache.Seems complex or impossible, to perform a simple task like opening a file.
    Please advise (I'm new to Java and Web Start).
    BTW, I'm working with IntelliJ IDEA 5.0.
    Thanks,
    Zedik.
    {font:Tahoma}{size:26pt}
    {size}{font}

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • How can i request an input of data from a deployed web service via a html

    Hi all, I am currently having trouble with a web service. I want a client to be able to input a numerical value for a control in a deployed VI.
    At present i have one main vi that generates a signal and i've collected waveform data and displayed this data on a a chart. The web service uses a static folder containing html and javascript files. The html file calls the js file which parses the waveform data and returns to html to be stored as a chart_div. I have all the controls and indicators in one VI, connected by terminals using GET method.
    I am looking for a way of scripting a request form so that when called by the html file, the client user can input a control and change the values on the waveform graph. I also have an update button that requests updated data. 
    If anyone could suggest a method of how to accomplish this it would be SO helpful
    Thanks, Chris

    Hi Chris,
    I take it you are using the RESTful API method to GET the data. In that case you shoul be able to perform a http POST from your js code in order to update the controls.
    This could be done as form components are updated, or after a submit button is pressed (I'm sure you are familiar with this part).
    Please see here for more information: http://zone.ni.com/reference/en-XX/help/371361J-01​/lvhowto/build_web_service/
    I hope this helps.

  • How to attach XML file in the response of Web Services

    Hi
    I am new to the WEB SERVICE. this my requirement.
    I need to make a class file a web service. and i need to get data from the data base and attach it in the response. I need to use SOAP MEssaging for this. so how to call the service from the JSP and how to get the data from the response,Before that which technology i need to use for this requirement. Plz let me know how to accomplish this task. I have gone thur lot of tech stuff and i am confused a lot, what to use and how to use. Will any one help me out.
    Thanks
    Vidya

    Hey VP, thanks for replyng.
    I have read the codes from a book and havesome code for client. The server side is yet to be done....but I have problems in compiling them as I am Unable to import javax.xml.soap.*;
    This is basically a request to the Server asking it to find the match of the word "Mickey" from the XMLfile at the server...JAXRPC is involved(I Presume:) There are some supporting files.........hey But it doesn't compile only here. Hope it does in yrs
    *******The client..........**********
    * Client
    package com.aby.jwsdp.soap.client;//the package
    import javax.xml.messaging.URLEndpoint;
    import javax.xml.soap.SOAPConnectionFactory;
    import javax.xml.soap.SOAPConnection;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamResult;
    import com.aby.jwsdp.soap.client.Fault;//supporting file
    import com.aby.jwsdp.soap.client.RequestMessage;//supporting file
    public class Client {
         static final string SERVICE_ENDPOINT="http://localhost:8080/chap/servlet/chap.RecieveServlet";
         public static void main(String args[]) {
              if(1!=args.length) {
                   System.err.println("Usage: java "+"com.aby.jwsdp.soap.client.Client <name>");
              } else {
                   new Client(args[0]);
         public Client(String name) {
              try{
                   URLEndpoint endpoint = new URLEndpoint(SERVICE_ENDPOINT);
                   SOAPConnectionFactory scf=SOAPConnectionFactory.newInstance();
                   SOAPConnection connection = scf.createConnection();
                   RequestMessage reqMsg = new RequestMessage();
                   reqMsg.setName(name);
                   SOAPMessage replySOAP = connection.call(reqMsq.getMessage(),endpoint);
                   if(Fault.hasFault(replySOAP)) {
                        Fault fault = new Fault(replySOAP);
                        System.err.println("Recieved SOAP Fault");
                        System.err.println("Fault Code: "+fault.getFaultCode());
                        System.err.println("Fault string: "+fault.getFaultString());
                        System.err.println("Fault detail: "+fault.getFaultDetail());
                   }else {
                        ResponseMessage respMsg = new ResponseMessage(replySOAP);
                        String responseValue = null;
                        try{
                             responseValue = respMsg.getValue();
                             System.out.println("Response: "+responseValue);
                        }catch(SchemaException e) {
                             System.err.println("Parsing error");
                   connection.close();
              }catch(EXception e) {
                   System.err.println(e/toString());
    /*@author Aby
    *Fault.java
    package com.aby.jwsdp.soap.client;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPFault;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.Detail;
    import javax.xml.soap.DetailEntry;
    import java.util.Iterator;
    public class Fault {
         protected SOAPFault soapFault;
         public Fault(SOAPMessage msg) throws SOAPException {
              SOAPPart soapPart = msg.getSOAPPart();
              SOAPEnvelope envelope = soapPart.getEnvelope();
              SOAPBody soapBody = envelope.getBody();
              soapFault = soapBody.getFault();
         public static boolean hasFault(SOAPMessage msg) throws SOAPException {
              SOAPPart soapPart = msg.getSOAPPart();
              SOAPEnvelope envelop = soapPart.getEnvelop();
              SOAPBody soapBody = envelop.getBody();
              return soapBody.hasFault();
         public String getFault() {
              return soapFault.getFaultCode();
         public String getFaultString() {
              return soapFault.getFaultString();
         public String getFaultDetail() {
              String ret = null;
              Detail detail = soapFault.getDetail();
              if(null!=detail) {
                   Iterator it = detail.getDetailEntries();
                   if(it.hasNext()) {
                        DetailEntry detEntry = (DetailEntry)it.next();
                   ret = detEntry.getValue();
              return ret;
    * RequestMessage.java
    package com.aby.jwsdp.soap.client;
    import com.aby.jwsdp.soap.client.Client;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPException;
    public class RequestMessage {
         protected SOAPMessage soapMessage = null;
         public RequestMessage()
         throws SOAPException {
              MessageFactory mf = MessageFactory.newInstance();
              soapMessage = mf.createMessage();
         public void setName(String name)
         throws SOAPException {
              SOAPPart soapPart = soapMessage.getSOAPPart();
              SOAPEnvelope envelope = soapPart.getEnvelope();
              SOAPBody body = envelope.getBody();
              SOAPElement requestElement;
              requestElement = body.addChildElement(envelope.createName("GetValueByName","myns","www.syngress.com/JWSDP/soap-example"));
              SOAPElement paramElement;
              paramElement = requestElement.addChildElement("name");
              paramElement.addTextNode(name);
         public SOAPMessage getMessage() {
              return soapMessage;
    check this out then we will see

  • Can anybody give me complete guideance & code about using j2me web service?

    Hi to all !
    I have posted problem about using j2me web service ...
    but still nobody have give me at least one response..
    can anybody give me complete example about using webservice in j2me?
    premal

    Hi to all !
    I have posted problem about using j2me web service
    but still nobody have give me at least one
    response..
    can anybody give me complete example about using
    webservice in j2me?
    premal-----------------------------------
    Hi, You may find help using netBean IDE.In netBean IDE help, there you should find step by step solusion for web service as well soap messang technology
    your best regard
    http://www.techbd.com
    [email protected]

Maybe you are looking for

  • Share Specified Calendars in iCal via iCloud

    I have a specific Calendar on my MBP which I want to share with my wife who has an iPad2, We have both upgraded to ios5 on iPad 2 and OSX Lion on my mBP. Any advice on how to share specific calendars over icloud. Thanks Keith

  • JScrollPane now showing up with JList using TableLayout

    Hi, I have JFrame using TableLayout. On this JFrame I have added a JPanel that uses TableLayout too. Now this panel is divided into 4 cells. One each cell I am adding a JList. ALl the lists show up fine on the appropriate cells on the panel, but they

  • I bought a new mac with software installed and my username will not update from another account?

    I recently bought an new power mac with Logic Pro and Final Cut Pro Installed. When I updated to the new OS X operating system, they need to be updated as well. And will no longer work. But it says it is on another account. Not sure what account. How

  • Divide key figures in real time cube by using planning function

    Dear all, I have a real time cube which contains one key figure which is defined by 10 characteristics. For one country, the users types the values fpr the key figure in a wrong format, so I have to divide those values by 1000. I have tried to do thi

  • Why is my text underlined?

    I am not referring to it being formatted that way, it is just appearing that way, as if there is some type of a problem. i was messing around with paragraph and character formatting, trying to understand style sheets, and now i have a headline that j