Code alteration - Basic problem or XML-RPC?

I'm trying to alter the following client/server code to create an XML-RPC such that when the client offers an argument eg ?John? then the result of the method call returned to the client would be ?John*John? rather than the result of the equation currently shown.
I'm not sure if it's just my lack of knowledge or something in the basic data types in XML-RPC
Any help much appreciated.
Client
[ code ]
import java.util.*;
import org.apache.xmlrpc.*;
//simple XML-RPC client that makes an XML-RPC request to a Server
public class XMLRPCClient {
public static void main(String args[]) {
try {
// Specify the server
XmlRpcClient server = new XmlRpcClient("http://localhost/RPC2");
// Create request
Vector params = new Vector();
params.addElement(new Integer(17));
params.addElement(new Integer(13));
// Make a request and print the result
Object result = server.execute("sample.sum", params);
int sum = ((Integer ) result).intValue();
System.out.println("Response from server: " + sum);
} catch (Exception exception) {
System.err.println("JavaClient: " + exception);
[ /code ]
Server
[ code ]
import org.apache.xmlrpc.*;
//XMLRPCServer is a simple XML-RPC server
public class XMLRPCServer {
//Start up the XMLRPC server and register a handler.
public Integer sum(int x, int y) {
return new Integer(x+y);
public static void main (String [] args) {
try {
System.out.println("Attempting to start XML-RPC Server...");
WebServer server = new WebServer(80);
server.addHandler("sample", new XMLRPCServer());
server.start();
System.out.println("Started successfully.");
System.out.println("Accepting requests. (Halt program to stop.)");
} catch (Exception exception) {
System.err.println("JavaServer: " + exception);
[ /code ]

cause of the error:
After some extensive research on the web, it is found that that you are using an UTF-8 encoded file with byte-order mark (BOM). Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. UTF-8 files with BOMs are commonly generated by tools such as Window's Notepad. This is a known bug in Java, but it still needs fixing after almost 8 years...
There are some hexadecimal character at the begining of the file, which is giving error"content not allowed in prolog". No solution is provided for this till now.
Example: suppose your file start with <?xml version="1.0" encoding="utf-8"?>. you will see this in a editor. But if you open this file with any hexadecimal editor you will find some junk character in the start of the file.that is causing the problem
solution:
1) convert your file into a string and then read the file from the forst character that in my case the first character will be "<".so the junk character will not be there in the string and then again convert it into a file.
2) some people are able to solve this problem by changing the "utf-8" to "utf-16". remember only in some case. some times this problem also exits in "utf-16" file.
3) some are able to solve this problem by changing the LANG to US.en.
4) If the first three bytes of the file have hexadecimal values EF BB BF then the file contains a BOM.so you can also handle by your own.
5)Download a hexadecimal editor and remove the BOM.
6) In case you are not able to think furthe then please to more research in internet may be you find some other solution to this problem. But These solution are some type of hack not exactly a solution.

Similar Messages

  • Problems with XML-RPC

    Hi everybody.
    Sorry, I've got a french accent, then if you don't understand, dont' be worry ^^
    I try using the apache's xmpl-rpc package, and I have got some problems with the xml-rpc client.
    Here my source :
    public interface ICalculator {
         public int add(int i1, int i2);
         public int subtract(int i1, int i2);
    public class Calculator implements ICalculator {
         public int add(int i1, int i2) {
              return i1 + i2;
         public int subtract(int i1, int i2) {
              return i1 - i2;
    import org.apache.xmlrpc.server.PropertyHandlerMapping;
    import org.apache.xmlrpc.server.XmlRpcServer;
    import org.apache.xmlrpc.server.XmlRpcServerConfigImpl;
    import org.apache.xmlrpc.webserver.WebServer;
    public class Server {
    private static final int port = 8080;
    public static void main(String[] args) throws Exception {
    WebServer webServer = new WebServer(port);
    XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();
    PropertyHandlerMapping phm = new PropertyHandlerMapping();
    phm.addHandler(Calculator.class.getName(), Calculator.class);
    phm.addHandler(ICalculator.class.getName(), ICalculator.class);
    xmlRpcServer.setHandlerMapping(phm);
    XmlRpcServerConfigImpl serverConfig =
    (XmlRpcServerConfigImpl) xmlRpcServer.getConfig();
    serverConfig.setEnabledForExtensions(true);
    serverConfig.setContentLengthOptional(false);
    webServer.start();
    System.out.println("Serveur XML-RPC is ready");
    import org.apache.xmlrpc.client.XmlRpcClient;
    import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
    import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;
    import org.apache.xmlrpc.client.util.ClientFactory;
    public class Client {
    public static void main(String[] args) throws Exception {
    // create configuration
    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
    config.setServerURL(new URL("http://127.0.0.1:8080/xmlrpc"));
    config.setEnabledForExtensions(true);
    config.setConnectionTimeout(60 * 1000);
    config.setReplyTimeout(60 * 1000);
    XmlRpcClient client = new XmlRpcClient();
    System.out.println("Connection");
    // use Commons HttpClient as transport
    client.setTransportFactory(
    new XmlRpcCommonsTransportFactory(client));
    // set configuration
    client.setConfig(config);
    ClientFactory factory = new ClientFactory(client);
    ICalculator calc = (ICalculator)factory.newInstance(ICalculator.class); //Problems here !!!
    System.out.println("Calculing");
    System.out.println("Result : " + calc.add(2, 3));
    And the error is:
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpException
         at org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory.getTransport(XmlRpcCommonsTransportFactory.java:31)
         at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
         at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
         at org.apache.xmlrpc.client.util.ClientFactory$1.invoke(ClientFactory.java:104)
         at $Proxy0.add(Unknown Source)
         at projet.Client.main(Client.java:45)
    Can you help please ?

    The problem is not related to your code, but it seems that there is a missing jar which contains the class org.apache.commons.httpclient.HttpException or perhaps the jar isn't included in your CLASSPATH.
    The jar seems to be commons-httpclient.jar you can found at http://jakarta.apache.org/commons/httpclient

  • Web Service Model ---javax.xml.rpc.soap.SOAPFaultException

    Hi Experts,
                     I am working with webservices model Using NWDS 7.013. One application (webservice model) was developed in old portal server after that portal server was scrapped. XI server only available now. Currently i have a new server. I import into that application into My NWDS using the New server.
    Refering the below thread
    Re: Problem calling XI WebServices from WebDynpro Java
    I added following code in the component controller before execute the model
    req._setUser("username"); (eg. user_XI)
    req._setPassword("password"); (eg. password_XI)
    while executing the model in the component controller the following exception will be occured
    javax.xml.rpc.soap.SOAPFaultException
    How can i rectify this? anything i am going to create JCO in SLD or any configuration going to create Visual administrator? Please give me your valuable suggestions....
    Regards,
    P.Manivannan.

    Hi,
    Refer to thread Re: Web Service Error. which may be helpful.
    Kind Regards,
    Nitin

  • Javax.xml.rpc.ServiceException: java.lang.NullPointerException

    Hello! Can somebody help me? I tried to call web service? usimg DII Client. Here is the code:
    String[] res = null;
    String nmsp = "urn:foo";//targetNamespace in WSDL
    String qnameService = "ServiceName";
    String qnamePort = "PortName";//<port name in WSDL
    String urlst = "service?wsdl";
    try {
    URL url = new URL(urlst);
    ServiceFactory factory = ServiceFactory.newInstance();
    javax.xml.rpc.Service serv = null;
    QName qName = null;
    try {
    qName = new QName(nmsp,qnameService);
    if (qName != null) {
    serv = factory.createService(url, qName);
    } else {
    System.out.println("qName = null" );
    } catch (Exception ex) {
    System.out.println("qnameService = " + qnameService);
    ex.printStackTrace();
    Call call = serv.createCall(new QName(nmsp, qnamePort), new QName(nmsp, "whatListsCat "));
    res = ((String[]) call.invoke(new Object[]{}));
    for (int i = 0; i < res.length; i++)
    System.out.println("res = " + res);
    } catch (Exception e) {
    e.printStackTrace();
    return res;
    And I have the Error in this place: serv = factory.createService(url, qName);
    Error is: javax.xml.rpc.ServiceException: java.lang.NullPointerException
    Maybe somebody knows what is the problem?
    Thank you!

    Hi Eric! I realy don't know what's wrong. I have tried to call web-service with XML Spy. When I called it first time everything was
    fine, it worked. But when I tried to invoke it once again and again I had this
    error: "HTTP error: could not POST file
    '/axis/services/VocabServerApi' on server '192.171.196.92'(500)". Here is the link to the wsdl file: http://vocab.ndg.nerc.ac.uk/VocabServerAPI.wsdl . Thank you for your help.
    Regards,
    Kristina

  • Javax.xml.rpc.ServiceException: java.lang.NullPointerExc

    Hello! Can somebody help me? I tried to call web service? usimg DII Client. Here is the code:
    String[] res = null;
    String nmsp = "urn:foo";//targetNamespace in WSDL
    String qnameService = "ServiceName";
    String qnamePort = "PortName";//<port name in WSDL
    String urlst = "service?wsdl";
    try {
    URL url = new URL(urlst);
    ServiceFactory factory = ServiceFactory.newInstance();
    javax.xml.rpc.Service serv = null;
    QName qName = null;
    try {
    qName = new QName(nmsp,qnameService);
    if (qName != null) {
    serv = factory.createService(url, qName);
    } else {
    System.out.println("qName = null" );
    } catch (Exception ex) {
    System.out.println("qnameService = " + qnameService);
    ex.printStackTrace();
    Call call = serv.createCall(new QName(nmsp, qnamePort), new QName(nmsp, "whatListsCat "));
    res = ((String[]) call.invoke(new Object[]{}));
    for (int i = 0; i >< res.length; i++)
    System.out.println("res = " + res);
    } catch (Exception e) {
    e.printStackTrace();
    return res;
    And I have the Error in this place: serv = factory.createService(url, qName);
    Error is: javax.xml.rpc.ServiceException: java.lang.NullPointerException
    Maybe somebody knows what is the problem?
    Thank you!

    Hi Eric! I realy don't know what's wrong. I have tried to call web-service with XML Spy. When I called it first time everything was
    fine, it worked. But when I tried to invoke it once again and again I had this
    error: "HTTP error: could not POST file
    '/axis/services/VocabServerApi' on server '192.171.196.92'(500)". Here is the link to the wsdl file: http://vocab.ndg.nerc.ac.uk/VocabServerAPI.wsdl . Thank you for your help.
    Regards,
    Kristina

  • Package javax.xml.rpc does not exist

    Hi, I'm sure this is probably a basic error, which one of you Java gurus can solve instantly. I haven't used Java since 2001 and my development machine didn't even have a JDK installed until this morning!
    I'm trying to create a Java client for my web service, it's COM/ASP on IIS before you ask how I did it without using Java...
    Basically, I've installed J2SE v1.4.2_02, and also WSDP jwsdp-1.3, and I'm using the tutorial example at:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html#wp79973 to create a dynamic proxy client. I assume this is what I need to do to access an existing web service?
    I've copied and pasted the code into my editor and saved it as HelloClient.java. I will change the URL/URI, service name, port, etc. later on.
    Now, at the cmd prompt...
    D:\source\DCIS\sdk\java\dynamicproxy>javac HelloClient.java
    HelloClient.java:4: package javax.xml.rpc does not exist
    import javax.xml.rpc.Service;
    ^
    HelloClient.java:5: package javax.xml.rpc does not exist
    import javax.xml.rpc.JAXRPCException;
    ^
    HelloClient.java:6: package javax.xml.namespace does not exist
    import javax.xml.namespace.QName;
    ^
    HelloClient.java:7: package javax.xml.rpc does not exist
    import javax.xml.rpc.ServiceFactory;
    I expect this is something to do with environment variables:
    PATH=C:\WINNT\system32;
    C:\WINNT;C:\WINNT\System32\Wbem;
    C:\Program Files\Microsoft SDK\Bin\.;
    C:\Program Files\Microsoft SDK\Bin\WinNT\.;
    d:\j2sdk1.4.2_02\bin\;
    d:\jwsdp-1.3\jwsdp-shared\bin\;
    d:\jwsdp-1.3\apache-ant\bin\
    CLASSPATH=.;
    Is there something I need to set in my classpath for this?
    I know the tutorial suggests using Ant to build the example, but as far as I can tell that uses Tomcat, and I only want to build a client application! There must be a way to get around this...
    TIA for any help you give me!

    Hi,
    I am getting this error message when i try to create the webservice client.
    D:\Sun\AppServer\apps\dynamic-proxy>javac -classpath build -d build MathClient.java
    MathClient.java:4: package javax.xml.rpc does not exist
    import javax.xml.rpc.Service;
    ^
    MathClient.java:5: package javax.xml.rpc does not exist
    import javax.xml.rpc.JAXRPCException;
    ^
    MathClient.java:7: package javax.xml.rpc does not exist
    import javax.xml.rpc.ServiceFactory;
    ^
    MathClient.java:8: cannot find symbol
    symbol : class FirstIF
    location: package dynamicproxy
    import dynamicproxy.FirstIF;
    ^
    MathClient.java:23: cannot find symbol
    symbol : class ServiceFactory
    location: class dynamicproxy.MathClient
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    ^
    MathClient.java:23: cannot find symbol
    symbol : variable ServiceFactory
    location: class dynamicproxy.MathClient
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    ^
    MathClient.java:26: cannot find symbol
    symbol : class Service
    location: class dynamicproxy.MathClient
    Service mathService = serviceFactory.createService(url,
    ^
    7 errors
    After looking at your response to add the classpath to this jar file.
    jaxrpc-spi.jar.
    But when i looked into my folder found that missing this jar file.
    where i can i download this file?
    I would like to know the error message that i have got is because of this missing file?
    Please guide me on this issue.
    Thanks!

  • Javax.xml.rpc.JAXRPCException ???????

    I have deployed a simple web service using Apache Tomcat 6.0 and Axis 1.4 in Windows XP. Now the server is very simple:
    [code]
    import java.io.*;
    import java.util.*;
    HelloWorld.java
    This is our web service
    public class HelloWorld
    public String getHelloWorld(String id)
    String retName="";
    try
                   File indexFile = new File("index.txt");
                   retName=indexFile.getAbsolutePath()+id;
              catch(Exception e)
                   e.printStackTrace();
         return retName;
    [/code]
    Now if the client doesn't send any parameters then everything works well. But as sson as I try to send a parameter to the server, I get the following error:
    "javax.xml.rpc.JAXRPCException: Number of parameters passed in (0) doesn't match the number of IN/INOUT parameters (1) from the addParameter() calls"
    Why is this happening??? My client is also very simple:
    [code]
    package dummyC;
    import java.util.*;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.utils.Options;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.rpc.*;
    public class DummyC {
    @param args
         public static void main(String[] args)
              try
              Service service = new Service();
              Call call = (Call)service.createCall();
              String endpoint ="http://localhost:8081/axis/HelloWorld.jws";
              call.setTargetEndpointAddress(new java.net.URL(endpoint));
              call.setOperationName(new QName("getHelloWorld"));
              call.addParameter("param1",XMLType.XSD_STRING, ParameterMode.IN);
              String output = (String)call.invoke(new Object[]{});
              System.out.println("Got result : " + output);
              catch(Exception e)
                   System.out.print("sssss: "+e.toString());
    [/code]
    Please guys, I need to solve this problem with in the next couple of days.
    Bye.

    Thanks.
    "manoj cheenath" <[email protected]> wrote:
    Next release (JAX-RPC 1.0) is at the end of this month.
    regards,
    -manoj
    "Nick Minutello" <[email protected]> wrote
    in message news:3d0a4b71$[email protected]..
    Great. thanks.
    However, I think you are using a new version of WLS JAX-RPC. The
    javax.xml.rpc.JAXRPCException.getLinkedCause() is not in my version (0.8).Is there
    a new version available.
    Regards,
    Nick
    "manoj cheenath" <[email protected]> wrote:
    Hi Nick,
    set the following system property:
    weblogic.webservice.verbose=true
    while starting the client. This will print the xml soap message
    that is send/received by the client.
    Also you get to the actual exception by calling:
    javax.xml.rpc.JAXRPCException.getLinkedCause()
    regards,
    -manoj
    "Nick Minutello" <[email protected]>
    wrote
    in message news:3d0949cf$[email protected]..
    I get the following error invoking a web service client.
    There is not too much information to go on.
    The exception is happenning somewhere in the Weblogic Code. There islittle information
    given in the error message.
    Is there any debug setting I can set so that I can get more of an idewhat
    is going
    on?
    Cheers,
    Nick
    javax.xml.rpc.JAXRPCException: web service invoke failed
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:188)
    at
    com.x.facade.webservice.ServicePort_Stub.getBondSummaries(ServicePort_Stub.j
    ava:55)
    at TestWebService.doTest(TestWebService.java:94)
    at TestWebService.main(TestWebService.java:28)

  • XML-RPC Service is not available

    I'm experiencing a problem where CF 8.01 will not start. the log shows the message "The XML-RPC service is not available. This exception is usually caused by service startup failure. Check your server configuration."
    I traced this to a corrupted /lib/neo-xmlrpc.xml file; the structures being generated when I consume a local web service are malformed. If I reinitialize this file to its form as created when CF is installed, CF will start.
    Below is an example of the corrupted structure:
    <wddxPacket version='1.0'><header/><data><array length='3'><struct type='coldfusion.server.ConfigMap'><var name='http:// 123.123.123.2<char code='0d'/><char code='0d'/><char code='0a'/>        /common/verifyUser.cfc?wsdl'><string>http:// 123.123.123.2<char code='0d'/><char code='0d'/><char code='0a'/>        /common/verifyUser.cfc?wsdl</string></var></struct><struct type='coldfusion.server.ConfigMap'><var name='http:// 123.123.123.2<char code='0d'/><char code='0d'/><char code='0a'/>        /common/verifyUser.cfc?wsdl'><string></string></var></struct><struct type='coldfusion.server.ConfigMap'><var name='http:// 123.123.123.2<char code='0d'/><char code='0d'/><char code='0a'/>        /common/verifyUser.cfc?wsdl'><string></string></var></struct></array></data></wddxPacket>
    The corruption is occurring on my developer installation on a windows xp machine. If I execute the same code on my standard server edition running on Windows Server, the structure for the same verifyUser web service looks like this:
    <var name='http://123.123.123.1/common/verifyUser.cfc?wsdl'><string></string></var>
    On both machines I'm running CF version 8,0,1,195765 with updates chf8010003.jar and hf801-1875.jar.
    Has anyone else seen this or have any ideas on how to correct?

    You're right. Here's what was happening:
    My cfinvoke included webservice="http://#APPLICATION.server_ip_address#/common/verifyUser.cfc?wsdl".  I was using the same code to extract the IP address, but different operating systems. So when I populated APPLICATION.server_ip_address without trimming, I was getting extraneous trailing garbage on the XP server version.
    Thanks.

  • XML-RPC via HTTPService

    I'm trying to make an XML-RPC call via an HTTPService
    instance. Is that the best way to do it?
    At present I can generate a request to the correct URL, but
    the POST seems to be empty. I think that I don't understand what
    should go in the <mx:request> tag -- I have the literal XML
    which I want sent:
    <mx:HTTPService
    id="loginRequest"
    url="
    http://localhost:8080/rpc/xmlrpc"
    useProxy="false"
    method="POST"
    contentType="application/xml"
    resultFormat="e4x" >
    <mx:request xmlns="" format="xml">
    <methodCall>
    <methodName>confluence1.login</methodName>
    <params>
    <param>
    <value><string>{username.text}</string></value>
    </param>
    <param>
    <value><string>{password.text}</string></value>
    </param>
    </params>
    </methodCall>
    </mx:request>
    </mx:HTTPService>
    Thanks for any advice.
    Tom

    I am having a similar problem, when I tried to read the
    contents of the POST in ASP it is blank.
    i'm sending some xml to asp from flex using the httpservice
    but when I try to parse the xml using the standard Microsoft.XMLDOM
    it always fails to parse the xml regardless of what xml I send.
    This leads me to think that flex is sending the xml incorrectly.
    flex code>
    request = new HTTPService();
    request.url="
    http://127.0.0.1/test.asp";
    request.contentType="application/xml"
    request.method="POST"
    request.resultFormat="text"
    request.request = XML(<test>testingxml</test>);
    request.addEventListener(ResultEvent.RESULT, success);
    request.addEventListener(FaultEvent.FAULT, fault);
    request.send();
    private function success(e:mx.rpc.events.ResultEvent):void {
    trace(e.result);
    private function fault(e:mx.rpc.events.FaultEvent):void {
    trace(e.message);
    my ASP code>
    Dim mydoc
    Set mydoc=Server.CreateObject("Microsoft.XMLDOM")
    mydoc.async=false
    mydoc.load(Request)
    Response.ContentType = "text/xml"
    if mydoc.parseError.errorcode<>0 then
    Response.write "<prob name='fail'>blah</prob>"
    else
    Response.write "<prob name='works'>yay</prob>"
    end if
    The asp script always sends <prob
    name='fail'>blah</prob> back to flex meaning that the xml
    failed to parse correctly. The xml is correct, if I load the same
    xml from a text file it will parse correctly, it only fails when
    the xml is loaded from flex.
    Does anyone know the exact format that the xml is sent in
    using the httpservice.send() method? I tried using Request.Form in
    ASP but it only gives the error printed at the bottom of this post.
    BTW is there anyway to get flex to trace error messages given
    from ASP when a script fails as I can't read them in a browser
    (because the request is sent using POST). When ASP gives an error
    flex either does not respond or gives this error which does not
    help my cause.
    (mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = "DirectHTTPChannel0"
    correlationId = "39CFBD08-1AEC-89B8-EECA-57F7BC922158"
    destination = ""
    extendedData = (null)
    faultCode = "Server.Error.Request"
    faultDetail = "Error: [IOErrorEvent type="ioError"
    bubbles=false cancelable=false eventPhase=2 text="Error #2032:
    Stream Error. URL:
    http://127.0.0.1/test.asp"
    URL:
    http://127.0.0.1/test.asp"
    faultString = "HTTP request error"
    headers = (Object)#2
    messageId = "3AC23FB2-BFB0-AC27-AE06-57F7BCC14B44"
    rootCause = (flash.events::IOErrorEvent)#3
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#4
    bytesLoaded = 0
    bytesTotal = 0
    data = (null)
    dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#4
    text = "Error #2032: Stream Error. URL:
    http://127.0.0.1/test.asp"
    type = "ioError"
    timestamp = 0
    timeToLive = 0
    EDIT:
    I wrote the value of the ASP request (sent from flex) to a
    text file and I ended up getting blank, in other words no XML. Now
    i'm not even sure if flex is sending any xml.

  • Question about building xml-rpc client in swing

    Hi all,
    I'm going to build swing client for simple xml-rpc server, but I've little experience in swing.
    My application should create kind of XmlRpcClient object. It was no problem in console application, there was one client object and that's all. Now in swing I've no idea how to do it when I have more than one frame. Is it ok to create client object in base frame and then pass its reference to other frames in constructor? Maybe there is another/better way to do this?
    Thanks

    First, Dreamweaver is much more than a glorified FTP client! Dreamweaver is a Web site authoring and management application. That is the program you should use to build your HTML, not Fireworks.
    Fireworks is a Web layout/design and graphics production application. Fireworks can export HTML or HTML and CSS, but that export ability is intended to create mockups and prototypes, not live sites. The code Fireworks creates is...well...awful. You need to learn how to write HTML from scratch, not let a graphics program write it for you.
    The single .png file is also not going to work for you. The page you link to has several separate images. You need to create slices on your Fireworks document and export them as individual images, which you then reference in the HTML.
    Here are a couple of good tutorials for beginners:
    http://www.sitepoint.com/article/html-css-beginners-guide/
    http://net.tutsplus.com/tutorials/html-css-techniques/design-and-code-your-first-website-i n-easy-to-understand-steps/
    This tutorial is on the general theory of slicing. As such, it's helpful: http://www.slicingguide.com/
    In Fireworks, you use the slicing tool (looks like a green rectangle), to draw slices over the areas you want to export as individual images. These green rectangles appear in the Web layer. You can set the export properties of each slice separately. When you export, you can export all your images, or just the images from selected slices. And I really haven't said anything, so start with the help files, then post back with specific qustions.
    As to your 403 error problem, it's something with the configuration of the server, it has nothing to do with Fireworks or Dreamweaver. Read these articles:
    http://www.checkupdown.com/status/E403.html
    http://en.wikipedia.org/wiki/HTTP_403

  • Using the fireworks XML RPC server

    Hi, I am trying to use the XML RPC server in fireworks to export pages of a PNG.
    The relevant help url: http://help.adobe.com/en_US/fireworks/cs/extend/WS5b3ccc516d4fbf351e63e3d1183c949219-7ffe. html
    And the pdf version: http://help.adobe.com/en_US/fireworks/cs/extend/fireworks_cs5_extending.pdf (chapter 7)
    All I want to do is open a file, call exportPages(), and close it. So far this has been a very painful experience. I have CS5 Design Premium on a mac (os 10.5) if it matters. But I have the same problem 1 with my copy of CS3.
    Problem 1
    Fireworks never ever returns a document id. It also does not return an error number. The value attribute of the returned obj element and any error attributes are empty. Here are some example calls and responses:
    request: <func name="createDocument" obj="fw"></func>
    response: <return><obj value="" class="DocumentClass"></obj></return>'
    request: <func name="closeDocument" obj="fw"><string order="0" value="0" /><bool order="1" value="false" /></func>
    response: <return error=""></return>
    Note the value of the response is empty. This is always the case, unless I get something back that is not an integer. For instance. I am able to get the path url of the open doc:
    request: <func name="getDocumentPath" obj="fw"></func>
    response: <return><string value="file:///Macintosh%20HD/Users/me/work/somefile.png"></string></return>
    Is anyone else using this with any success? Will a FW dev some here and set me straight? I am opening a socket with python like this:
    import socket
    self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    self._sock.connect(('localhost', 12124))
    It seems like anything that is an int on FW end doesn't come through the response?
    Problem 2
    When I open a file that was created in CS3 with the API, a blocking dialog pops up asking about converting the fonts. FW will not return my request until this dialog is dismissed. Is there any way around this? This pretty much nullifies any automation with fireworks on files create by an older version.
    Any help or insight into either of these would be extraordinarily helpful. Or if you have a way to export pages from a FW PNG without running fireworks, I would love love love to hear it. Judging by the RPC documentation, the availability of info online (virtually none!) and my experience with it, it seems adobe doesn't care about it all that much.

    Hi Priyanka. It seems you are using the JS api? Flash? I am trying to use this via the XML RPC server in fireworks. Those are precisely the calls I am making to the RPC server with no avail: they do not return document ids. If you get a chance, can you (or anyone) run the following python code? Just open fireworks CS5, open a file and run this python code. It should return (print) the document id of the current document in a value="" attribute.
    import socket
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect(("localhost", 12124))
    dom = '<func name="getDocumentDOM" obj="fw"><string order="0" value="document" /></func>\0'
    s.send(dom)
    res = []
    r = s.recv(1)
    while ord(r):
        res.append(r)
        r = s.recv(1)
    print ''.join(res)
    Like I said earlier, this code works for me with CS3, but does not work with CS5; value="" is empty.
    I am not running this on a server. I am just trying to do some batch processing.
    Ben

  • Sun 7410 XML/RPC Java client

    Hi,
    Trying to make use of the XML/RPC which gives through the CLI on Sun 7410.
    raw => Make raw XML-RPC calls
    Again on raw I don't see any commands
    ss_sun:raw> help
    Subcommands that are valid in this context:
    help [topic] => Get context-sensitive help. If [topic] is specified,
    it must be one of "builtins", "commands", "general",
    "help" or "script".
    show => Show information pertinent to the current context
    done => Finish operating on "raw"
    ss_sun:raw>
    I have written a sample java code and using the jar file tried to run.
    But some basic thing I am missing could you please help anyone on it.
    The command I want to execute the command status show.
    I tried many way but I could not do it
    The client code is
    import java.util.Vector;
    import org.apache.xmlrpc.XmlRpcClient;
    public class TestClient {
    public static void main( String args[] ) throws Exception {
    XmlRpcClient client = new XmlRpcClient( "https://x.y.z.a:215/" );
    client.setBasicAuthentication("login", "passwd");
    Vector params = new Vector();
    // params.addElement( "raw" );
    // params.addElement( "status" );
    params.addElement( "show" );
    Object result = client.execute( "status", params );
    if ( result != null )
    System.out.println( "Successfully done." );
    I am using xmlrpc-1.1.jar
    Any help on it I appriciate.
    Thanks & Regds,
    tmohanta

    Hi Satish !!!
    Thanks for your answer!!!
    I add  com.sap.security.api.sda to classpat...is that what you mean with "i.e UME API"???   IF it's so still doesn't  work... do you have any other suggestions?? it's very important, pls...
    Best Regards
    Walex

  • Java.lang.ClassNotFoundException: com.sun.xml.rpc.client.ServiceFactoryImpl

    Hi Forum:
    i want to explain you my problem i created a webservice with JDeveloper 10.1.3, and run perfectly but when i want to run it in another IDE i copied the codes to a another IDE and run perfectly in a simple java project in my different IDE but when i putted the code in a web application in another web server differente to the oracle i got this error message
    vax.xml.rpc.ServiceException: java.lang.ClassNotFoundException: com.sun.xml.rpc.client.ServiceFactoryImpl ------------------------- Loader Info ------------------------- ClassLoader name:
    i don�t know what�s happening and is so strange because i make one simple java project in eclipse and i copied the codes and works fine, but in a web application i can�t run it.
    I also founded it the jar to this class com.sun.xml.rpc.client.ServiceFactoryImpl
    but doesn�t work
    Can somebody help me, please?.. i really need it..
    thnks
    joshua

    It usually means that a JAR in which the class file resides is not included in the web-app or is not on the classpath. Had the same problem with the last Eclipse/WebLogic project where JAR files, in which class files resided on which other class files were dependent, were missing.
    Ronald

  • Javax.xml.rpc.soap.SOAPFaultException: "Server Error" while calling a WSDL

    Hi
    I am using a WSDL in my java code by creating proxy.
    I am getting an exception on below line of code
    XX_RESPONSE res = port.XX_XX_Forecast(req);
    exception :
    javax.xml.rpc.soap.SOAPFaultException: "Server Error"
    hat could be the possibility.
    is it from XI side or Java side.
    Shall I catch a XI person on my floor to solve this !!
    To be more specific :
    Error is
    <detail xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
    <context>XIAdapter</context>
    <code>ADAPTER.JAVA_EXCEPTION</code>
    <text>com.sap.aii.af.service.cpa.CPAException: invalid channel (party:service:channel) = <null>
    at com.sap.aii.af.mp.soap.web.MessageServlet.getChannel(MessageServlet.java:499)
    at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:409)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(AccessController.java:215)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
    </s:SystemError>
    </detail>
    Thanks

    Hi...
    WSDL forwarded by my manager was wong
    I tested it and it threw same exception.
    nyways...1 more help..
    Now, is there any way in NWDS to replace contents of used WSDL.
    Because only 1 "=" is missing in WSDL..
    Thanks

  • Problem with XML in APEX ORA-06502

    i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
    declare
    l_XML varchar2(32767);
    begin
    select xmlElement
    "iva",
    xmlElement("numeroRuc",J.RUC),
    xmlElement("razonSocial", J.RAZON_SOCIAL),
    xmlElement("idRepre", J.ID_REPRE),
    xmlElement("rucContador", J.RUC_CONTADOR),
    xmlElement("anio", J.ANIO),
    xmlElement("mes", J.MES),
    xmlElement
    "compras",
    select xmlAgg
    xmlElement
    "detalleCompra",
    --xmlAttributes(K.ID_COMPRA as "COMPRA"),
    xmlForest
    K.COD_SUSTENTO as "codSustento",
    K.TPLD_PROV as "tpldProv",
    K.ID_PROV as "idProv",
    K.TIPO_COMPROBANTE as "tipoComprobante",
    to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
    K.ESTABLECIMIENTO as "establecimiento",
    K.PUNTO_EMISION as "puntoEmision",
    K.SECUENCIAL as "secuencial",
    to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
    K.AUTORIZACION as "autorizacion",
    to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
    to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
    to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
    to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
    to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
    to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
    to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
    to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
    xmlElement
    "air",
    select xmlAgg
    xmlElement
    "detalleAir",
    xmlForest
    P.COD_RET_AIR as "codRetAir",
    to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
    to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
    to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
    from ANEXO_COMPRAS P
    where P.ID_COMPRA = K.ID_COMPRA
    AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
    xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
    xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
    xmlElement("secRetencion1", K.SEC_RETENCION_1),
    xmlElement("autRetencion1", K.AUT_RETENCION_1),
    xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
    xmlElement("docModificado", K.DOC_MODIFICADO),
    xmlElement("estabModificado", K.ESTAB_MODIFICADO),
    xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
    xmlElement("secModificado", K.SEC_MODIFICADO),
    xmlElement("autModificado", K.AUT_MODIFICADO)
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    AND K.ID BETWEEN 1 AND 25
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    declare
    l_XML CLOB;
    begin
    --Oculta XML
    sys.htp.init;
    wwv_flow.g_page_text_generated := true;
    wwv_flow.g_unrecoverable_error := true;
    --select XML
    select xmlElement
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+

    JohannaCevallos07 wrote:
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
    Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
    Thanks

Maybe you are looking for